Skip to content
Start here

Replace a webhook

PUT/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}

Replace all details for the given webhook ID.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Realtime AdminRealtime
Path ParametersExpand Collapse
account_id: string

The account identifier tag.

maxLength32
app_id: string

The app identifier tag.

webhook_id: string
formatuuid
Body ParametersJSONExpand Collapse
events: array of "meeting.started" or "meeting.ended" or "meeting.participantJoined" or 6 more

Events that this webhook will get triggered by

One of the following:
"meeting.started"
"meeting.ended"
"meeting.participantJoined"
"meeting.participantLeft"
"meeting.chatSynced"
"recording.statusUpdate"
"livestreaming.statusUpdate"
"meeting.transcript"
"meeting.summary"
name: string

Name of the webhook

url: string

URL this webhook will send events to

formaturi
enabled: optional boolean

Set whether or not the webhook should be active when created

ReturnsExpand Collapse
data: object { id, created_at, enabled, 4 more }
id: string

ID of the webhook

formatuuid
created_at: string

Timestamp when this webhook was created

formatdate-time
enabled: boolean

Set to true if the webhook is active

events: array of "meeting.started" or "meeting.ended" or "meeting.participantJoined" or 6 more

Events this webhook will send updates for

One of the following:
"meeting.started"
"meeting.ended"
"meeting.participantJoined"
"meeting.participantLeft"
"meeting.chatSynced"
"recording.statusUpdate"
"livestreaming.statusUpdate"
"meeting.transcript"
"meeting.summary"
name: string

Name of the webhook

updated_at: string

Timestamp when this webhook was updated

formatdate-time
url: string

URL the webhook will send events to

formaturi
success: boolean

Replace a webhook

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/realtime/kit/$APP_ID/webhooks/$WEBHOOK_ID \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "events": [
            "meeting.started"
          ],
          "name": "My Webhook",
          "url": "https://example.com/webhook"
        }'
{
  "data": {
    "created_at": "2023-07-15T07:08:26.634Z",
    "enabled": true,
    "events": [
      "meeting.started"
    ],
    "id": "b6e0fd13-d7f4-4122-9ad5-7994b35d24b8",
    "name": "My Webhook",
    "updated_at": "2023-07-15T07:08:26.634Z",
    "url": "https://example.com/webhook"
  },
  "success": true
}
{
  "error": {
    "code": 400,
    "message": "BAD_REQUEST: \"id\" must be a valid GUID"
  },
  "success": false
}
"{\n  message: \"Unauthorized\"\n}\n"
Returns Examples
{
  "data": {
    "created_at": "2023-07-15T07:08:26.634Z",
    "enabled": true,
    "events": [
      "meeting.started"
    ],
    "id": "b6e0fd13-d7f4-4122-9ad5-7994b35d24b8",
    "name": "My Webhook",
    "updated_at": "2023-07-15T07:08:26.634Z",
    "url": "https://example.com/webhook"
  },
  "success": true
}
{
  "error": {
    "code": 400,
    "message": "BAD_REQUEST: \"id\" must be a valid GUID"
  },
  "success": false
}
"{\n  message: \"Unauthorized\"\n}\n"