Webhooks
Kesru sends every call and website chat of an agent to your own server as a signed webhook.
What it does
Kesru sends a POST request with JSON to the agent's webhook URL. The field type names the event:
- post_call_transcription after each call: the call ID, the agent, both numbers, the start time, the duration, the outcome, the sentiment, the tags, the summary, the transcript and the details your agent collected.
- chat_started when a visitor starts a website chat.
- chat_ended when the chat ends, with its messages.
- chat_analyzed once Kesru has summarized the chat, with the messages, the summary and the tags.
Kesru signs every webhook with your workspace's signing secret, so your server can check it comes from Kesru.
Set up a webhook
In your dashboard, open Agents and choose your agent. Under Advanced, paste your URL in Webhook URL and choose Save.

Choose signing secret under Webhook URL. Copy the secret under Signing secret and store it securely on your server.

Check the signature of every request as described below.
Place a test call or write a test chat. Under Logs, Webhook deliveries lists each delivery with its status and duration.

Verify a webhook
Read the Kesru-Signature header, such as t=1792929600,v0=9b2e4f…. After t= comes the time it was sent in Unix seconds, after v0= the signature.
Compute the HMAC-SHA256 of the timestamp, a period and the raw request body, with the signing secret exactly as shown in your dashboard as the key. Write the result as hex.
Compare it with the signature. If they match, the webhook comes from Kesru.
Reject requests whose timestamp is more than 30 minutes old.
Use the raw request body, not JSON you parsed and serialized again. That can change whitespace or key order, and then the signature doesn't match.
Check deliveries
Under Logs, Webhook deliveries shows every webhook Kesru sent to your agents' webhook URLs over the past 30 days, with its status and duration. Succeeded and Failed filter the list. If an agent's Data storage is Everything, the log also keeps the content, and Resend sends it again.
Example
Maria Lopez calls about a leaking water heater, and the agent Front Desk takes the call. When it ends, your server gets a body with type post_call_transcription, event_timestamp and the call under data:
- agent_name: Front Desk, direction: inbound, external_number: +19545550148, call_duration_secs: 192.
- call_successful: success, termination_reason: user_hangup.
- transcript_summary: Maria Lopez called because her water heater is leaking. She wants a technician tomorrow morning and asked for a call back to confirm the time.
- transcript: each turn with role, message and time_in_call_secs.
- custom_analysis_data: the details your agent collected, like name, email address and address.
Good to know
Respond within 10 seconds
Respond with a 2xx status within 10 seconds. Otherwise Kesru sends the same body again, up to 3 times, each time with a new signature.
Public URLs only
Kesru only sends to public servers. A URL that points to localhost or a private network shows Not public under Webhook deliveries.
A new signing secret
One secret signs the webhooks of all your agents. After Create new secret, Kesru signs with the new secret, and the old one stops working right away. Update it on your server.
Who can see the secret
Owners, admins and developers.
Your data
What Kesru sends to webhooks, and who keeps copies, is described in the Privacy Notice.
Related integrations
Questions about Webhooks?
Write to us at support@kesru.com, or start free and set up a webhook for your agent in your dashboard.