Webhooks
Each agent can have one webhook URL that receives all of that agent’s events as signed JSON POSTs. Delivered types arecall.received (inbound
answer), call.utterance, call.completed, call.owner_task, call.failed,
call.busy, call.no-answer, call.canceled, sms.received, and
webhook.test. See Events. For local agents without a public
URL, prefer the persistent Agent Relay.
JavaScript examples call https://api.agentline.cloud with fetch and a
Bearer al_live_... key. The Node package is not on npm. The signature check
below is local and does not call the API.
Configure a webhook
Verify the signature
Each delivery includes an HMAC-SHA256 signature of the raw request body in a header (defaultX-Webhook-Signature). Verify it before trusting the
payload:
You can set a custom signature header (e.g.
X-Hub-Signature-256 for
GitHub-style verification) via the signature_header field when configuring
the webhook.Manage & test
test fires a webhook.test event through the exact same pipeline as real
events — a successful delivery confirms the whole chain is wired correctly.