Every request carries your subscription key in the Ocp-Apim-Subscription-Key header. The key identifies your subscription and its plan.
# Create an event curl -X POST \ https://tp-apim-int.azure-api.net/calendar/v1/$CALENDAR_ID/events \ -H "Ocp-Apim-Subscription-Key: $KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Weekly sync", "startDate": "2026-10-12T09:00:00", "endDate": "2026-10-12T09:30:00" }'
// Create an event using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", key); var response = await http.PostAsJsonAsync( $"https://tp-apim-int.azure-api.net/calendar/v1/{calendarId}/events", new { title = "Weekly sync", startDate = "2026-10-12T09:00:00", endDate = "2026-10-12T09:30:00" }); response.EnsureSuccessStatusCode();
// Create an event const response = await fetch( `https://tp-apim-int.azure-api.net/calendar/v1/${calendarId}/events`, { method: "POST", headers: { "Ocp-Apim-Subscription-Key": key, "Content-Type": "application/json" }, body: JSON.stringify({ title: "Weekly sync", startDate: "2026-10-12T09:00:00", endDate: "2026-10-12T09:30:00" }) });
# Create an event import requests response = requests.post( f"https://tp-apim-int.azure-api.net/calendar/v1/{calendar_id}/events", headers={"Ocp-Apim-Subscription-Key": key}, json={"title": "Weekly sync", "startDate": "2026-10-12T09:00:00", "endDate": "2026-10-12T09:30:00"}) response.raise_for_status()
# Create an event Invoke-RestMethod -Method Post ` -Uri "https://tp-apim-int.azure-api.net/calendar/v1/$calendarId/events" ` -Headers @{ "Ocp-Apim-Subscription-Key" = $key } ` -ContentType "application/json" ` -Body (@{ title = "Weekly sync" startDate = "2026-10-12T09:00:00" endDate = "2026-10-12T09:30:00" } | ConvertTo-Json)
“TeamsPro APIs drive our digital transformation with Microsoft Teams. They are highly reliable and blazingly fast.”