Replace a webhook
realtime_kit.webhooks.replace_webhook(strwebhook_id, WebhookReplaceWebhookParams**kwargs) -> WebhookReplaceWebhookResponse
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:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Replace a webhook
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
response = client.realtime_kit.webhooks.replace_webhook(
webhook_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="14a396e7-ca44-4937-bf1f-050a69118543",
events=["meeting.started"],
name="My Webhook",
url="https://example.com/webhook",
)
print(response.data){
"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"