Three ways to subscribe
| Mode | When to use |
|---|---|
Agent webhook_url | Every call that agent handles (inbound or outbound) delivers to this URL. Set it on the agent once. |
Per-call webhook_url | Override for a single outbound call, decided at dispatch time. |
| Account endpoints | One or more stable endpoints that receive events for every call on the org. |
Agent-level inline webhook
Setwebhook_url on the agent when you create or update it. Every call that agent handles emits events to that URL, signed with the organization’s default signing secret.
Per-call inline webhook override
Passwebhook_url on POST /v1/calls to override the agent’s default for a single call.
Account-wide endpoints
For production setups, register endpoints throughPOST /v1/webhook_endpoints
and subscribe each endpoint to the events you care about. Every call on the
org fans out to every matching endpoint.
cURL
signing_secret one time only. Store it in
your secrets manager before closing the response.
Use enabled_events: ["*"] to subscribe to everything (default if you omit
the field).
What CallingBox sends
CallingBox POSTs a JSON envelope to your URL. The body looks like this:| Header | Value |
|---|---|
Content-Type | application/json |
CallingBox-Signature | t=<unix_ts>,v1=<hex_hmac>; see Security |
CallingBox-Event-Id | UUID unique to this delivery attempt. Use as an idempotency key. |
CallingBox-Event-Type | Same as type in the body, for easy routing without parsing JSON. |
X-CallingBox-Event | Legacy alias of CallingBox-Event-Type. |
X-CallingBox-Call-Id | Convenience copy of data.call.id. |
Respond fast
Your endpoint must return a 2xx within 10 seconds. Do the minimum amount of work necessary and enqueue the rest of the processing on your side. Any non-2xx response or timeout triggers a retry; see the retry policy.Next steps
Event catalog
Every event type and its payload.
Security
Verify
CallingBox-Signature.Retries
Delivery schedule, idempotency, and replay.