v1

latestOpenAPI 3.0.02026-07-17121287546.7 KB
Deprecated: Platform / Webhooks

Update a webhook

<Warning>These endpoints are deprecated and will be removed in the future.</Warning>

patch/v2/oauth-clients/{clientId}/webhooks/{webhookId}

Path parameters

webhookIdstring required
clientIdstring required

Headers

x-cal-secret-keystring required

OAuth client secret key

Request body

payloadTemplatestring

The template of the payload that will be sent to the subscriberUrl, check cal.com/docs/core-features/webhooks for more information

activeboolean
subscriberUrlstring
triggersstring[]
secretstring
version'2021-10-20'

The version of the webhook

Example request

{
  "payloadTemplate": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}",
  "triggers": [
    "BOOKING_CREATED",
    "BOOKING_RESCHEDULED",
    "BOOKING_CANCELLED",
    "BOOKING_CONFIRMED",
    "BOOKING_REJECTED",
    "BOOKING_COMPLETED",
    "BOOKING_NO_SHOW",
    "BOOKING_REOPENED"
  ],
  "version": "2021-10-20"
}

Response

status'success' | 'error' required

Example response

{
  "status": "success",
  "data": {
    "payloadTemplate": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}"
  }
}