Tonedocs
API referenceWebhooks

Add a webhook endpoint

Must be a public https:// URL — private and link-local addresses are refused at save time rather than discovered at delivery time. The signing secret is returned once, here. Subscribe only to what you consume: every delivery is retried up to 14 times over roughly a day. Add conditions to send only some events (the rest are logged skipped), bodyTemplate to send your own JSON, and auth when the URL is your own API. 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.

POST
/v1/integrations/webhooks
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

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

curl -X POST "https://example.com/v1/integrations/webhooks" \  -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",    "secret": "whsec_3f1a7f6e2b4c4d1e9a8b5c6d7e8f9a0b",    "url": "https://hooks.acme.example/tone"  }}
Was this page helpful?