Push Notifications BETA

Description #

Conferencing details are assigned to events asynchronously and in certain workflows it is desirable to know that has been completed and what the details are, or respond to an error.

This is an extension to the Upsert Event API payload, where a subscriptions object is added to the event to with an interactions array containing the interactions you are interested in. See interaction types below.

Example Request #

POST /v1/calendars/cal_n23kjnwrw2_jsdfjksn234/events HTTP/1.1
Host: api.cronofy.com
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json; charset=utf-8

{
  "event_id": "qTtZdczOccgaPncGJaCiLg",
  "summary": "Board meeting",
  "description": "Discuss plans for the next quarter.",
  "start": "2020-10-22T15:30:00Z",
  "end": "2020-10-22T17:00:00Z",
  "conferencing": {
    "profile_id": "default"
  },
  "subscriptions": [
    {
      "type": "webhook",
      "uri": "https://example.com/notification",
      "interactions": [
        {
          "type": "conferencing_assigned"
        },
        {
          "type": "conferencing_failing"
        }
      ]
    }
  ]
}

Parameters #

subscriptions optional  #

Object containing an array of subscriptions.

subscriptions[].type optional  #

Only one value of webhook is supported.

subscriptions[].uri optional  #

The URI within your application you want Cronofy to send notifications to when the interaction is triggered. Must be an externally accessible HTTP or HTTPS URI.

subscriptions[].interactions optional  #

An array of interactions that should trigger a call to the uri.

subscriptions[].interactions[].type optional  #

The type of interaction. Currently supported are:

  • conferencing_assigned - sent when conferencing details are successfully generated for an event. The event will have been given a conferencing.join_url value at this point.
  • conferencing_failing - sent when errors from the conferencing service are preventing conferencing details from being assigned (e.g. the API for a conferencing provider is down or the users credentials have expired). In this situation, the event is added or updated in the target calendar without conferencing while conferencing creation is retried periodically. If conferencing is successfully created, the event will be updated with the conference details and a conferencing_assigned notification will be sent as normal.

Example Callback #

POST /notification HTTP/1.1
Host: example.com
Content-Type: application/json; charset=utf-8
Cronofy-HMAC-SHA256: {Base64(HmacSHA256(body_bytes, CLIENT_SECRET))}

{
  "notification": {
    "type": "event_subscription",
    "interactions": [
      {
        "type": "conferencing_assigned"
      }
    ]
  },
  "event": {
    "event_id": "qTtZdczOccgaPncGJaCiLg",
    "summary": "Board meeting",
    "description": "Discuss plans for the next quarter.",
    "start": "2020-10-22T15:30:00Z",
    "end": "2020-10-22T17:00:00Z",
    "conferencing": {
      "provider_name": "zoom",
      "join_url": "https://zoom.us/00001111-222"
    }
  }
}
Search