curl --request POST \
--url https://api.cal.com/v2/oauth-clients/{clientId}/webhooks \
--header 'Content-Type: application/json' \
--header 'x-cal-secret-key: <x-cal-secret-key>' \
--data '{
"payloadTemplate": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}",
"active": true,
"subscriberUrl": "<string>",
"triggers": [
"BOOKING_CREATED",
"BOOKING_RESCHEDULED",
"BOOKING_CANCELLED",
"BOOKING_CONFIRMED",
"BOOKING_REJECTED",
"BOOKING_COMPLETED",
"BOOKING_NO_SHOW",
"BOOKING_REOPENED"
],
"secret": "<string>"
}'
{
"status": "success",
"data": {
"payloadTemplate": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}",
"oAuthClientId": "<string>",
"id": 123,
"triggers": [
{}
],
"subscriberUrl": "<string>",
"active": true,
"secret": "<string>"
}
}
curl --request POST \
--url https://api.cal.com/v2/oauth-clients/{clientId}/webhooks \
--header 'Content-Type: application/json' \
--header 'x-cal-secret-key: <x-cal-secret-key>' \
--data '{
"payloadTemplate": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}",
"active": true,
"subscriberUrl": "<string>",
"triggers": [
"BOOKING_CREATED",
"BOOKING_RESCHEDULED",
"BOOKING_CANCELLED",
"BOOKING_CONFIRMED",
"BOOKING_REJECTED",
"BOOKING_COMPLETED",
"BOOKING_NO_SHOW",
"BOOKING_REOPENED"
],
"secret": "<string>"
}'
{
"status": "success",
"data": {
"payloadTemplate": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}",
"oAuthClientId": "<string>",
"id": 123,
"triggers": [
{}
],
"subscriberUrl": "<string>",
"active": true,
"secret": "<string>"
}
}
OAuth client secret key
The response is of type object
.
Was this page helpful?