Skip to main content
When a call ends, Lokutor can post it to an address of yours: what came of it, what was collected, how it was evaluated and what it cost. Phone, web and SDK calls of your agents all count, and so do phone calls no agent took (outside opening hours, or past your concurrent calls). It is off until you set an address.

Set it up

  1. 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.
  2. An agent can have an address of its own, in its Analysis → Webhook (or webhook_url in the API). Its calls go there instead.
  3. Make a signing secret and copy it: it is shown once. Without it you cannot tell our requests from anybody else’s.
  4. Send a test. It posts a made-up call, with "test": true, and shows how your system answered.
Admins and owners set the workspace’s address and the secret; members change their agents’ addresses, send tests and send deliveries again. The agent’s options are 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 whose analysis 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

A POST with a JSON body.
Every key is always there, 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_.
To check your own code: the secret whsec_test, the timestamp 1764064000 and the body {"event":"conversation.completed"} sign as

Answer, and what happens when you don’t

Answer with any 2xx 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.