Set it up
- In the dashboard, open Developers → Webhooks and set the Address:
https, public, without a user and password in it. Every agent’s calls go there. - An agent can have an address of its own, in its Analysis → Webhook (or
webhook_urlin the API). Its calls go there instead. - Make a signing secret and copy it: it is shown once. Without it you cannot tell our requests from anybody else’s.
- Send a test. It posts a made-up call, with
"test": true, and shows how your system answered.
webhook_transcript (adds what was said) and webhook_staging (staging calls are sent too, marked as such).
When it arrives
Once the call has been saved and analysed, usually a few seconds after it ends. An agent whoseanalysis is off is not analysed: its call is sent at once, with null where the analysis would be.
Nothing is sent for simulated tests, for a web session in which nothing was said, for a dialled call nobody answered, or for a session that is not one of your saved agents.
What arrives
APOST with a JSON body.
null where there is nothing to say, except test and transcript. New keys may be added.
What is sent is read when it is sent. A conversation you delete before that is not sent.
Check that it is us
Anyone can post to your address. Each request carries:
Use the body exactly as it arrived, before any JSON parsing, and the secret whole, with its
whsec_.
whsec_test, the timestamp 1764064000 and the body {"event":"conversation.completed"} sign as
Answer, and what happens when you don’t
Answer with any2xx within 10 seconds, and do the slow work afterwards. Anything else is tried again: after 30 seconds, 2, 10 and 30 minutes, 1, 2 and 4 hours and 8 hours twice, ten attempts over a day. 410 stops at once. Redirects are not followed, the certificate must be valid, and an address that resolves to a private network is refused.
A call can arrive twice, when your answer got lost on the way: ignore an id you already have. Calls are not sent in order.
Developers → Webhooks lists the last deliveries (two weeks, a month when they failed): how each was answered, when it is tried again, and Send again, which sends the call as it is now to the address it would go to today.
A new secret does not interrupt anything: requests are signed with both for a day. Put the new one in your system within it.
In a demo workspace nothing is sent.