Tonedocs
API referenceWebhooks

Update a webhook endpoint

Change the URL, the subscribed events, the conditions, the body, the headers or the credential, or disable it. Disabling stops delivery without losing the endpoint, its secret or its history. Send null for conditions, bodyTemplate, headers or auth to clear it. A live key or the dashboard only: a test key gets 403, because an endpoint receives live events too.

Requires the admin scope. A key with less gets 403 insufficient_scope.

PATCH
/v1/integrations/webhooks/{id}
AuthorizationBearer <token>

Authorization: Bearer tone_live_… or tone_test_…. The prefix IS the environment: a test key reaches only the sandbox, and no request field bridges the two.

In: header

Path Parameters

id*string

The webhook endpoint's id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/integrations/webhooks/string" \  -H "Content-Type: application/json" \  -d '{    "agentIds": [      "9f1c2d84-4e3a-4f6c-b902-7d1e8a33c451"    ],    "auth": {      "header": "x-api-key",      "secretId": "3f1a7f6e-2b4c-4d1e-9a8b-5c6d7e8f9a0b",      "type": "bearer"    },    "bodyTemplate": "{\\"order_id\\": \\"{{variables.order_number}}\\", \\"status\\": \\"cancelled\\", \\"reason\\": {{outputs.cancellation_reason}}, \\"tone_call_id\\": \\"{{call.id}}\\"}",    "conditions": [      {        "field": "outputs.order_confirmed",        "op": "eq",        "value": "cancelled"      }    ],    "description": "Production CRM sync",    "enabled": true,    "events": [      "call.completed",      "call.failed"    ],    "headers": {      "x-source": "tone"    },    "url": "https://hooks.example.com/tone"  }'
{  "data": {    "agentIds": null,    "auth": {      "header": null,      "secretId": "9f1c2d84-4e3a-4f6c-b902-7d1e8a33c451",      "type": "bearer"    },    "bodyTemplate": null,    "conditions": [      {        "field": "outputs.order_confirmed",        "op": "eq",        "value": "cancelled",        "values": null      }    ],    "consecutiveFailures": 0,    "createdAt": "2026-08-25T09:14:22Z",    "description": "Production — order service",    "disabledReason": null,    "enabled": true,    "events": [      "call.completed",      "campaign.finished"    ],    "headers": null,    "id": "9f1c2d84-4e3a-4f6c-b902-7d1e8a33c451",    "url": "https://hooks.acme.example/tone"  }}
Was this page helpful?