Inbound call webhook payload for voice agent deployments
After an inbound call finishes, Sarvam sends a POST request to your webhook with the call result. Set the target in the deployment’s webhook_config either as an inline url or as a webhook_id referencing a stored webhook config — see Create deployment and Update deployment. Deliveries that use a stored webhook config are signed — see Verifying the delivery.
Payload schema
Example
Verifying the delivery
When the deployment’s webhook_config references a stored webhook config (webhook_id), every delivery is authenticated with an HMAC signature. The signing secret is returned once, in the response when you create the webhook config — it is never shown again, so store it immediately.
Each signed delivery carries two headers:
Verify the delivery by recomputing the HMAC over the raw request body (do not re-serialize parsed JSON) and comparing it with the header:
Notes:
- Reject deliveries whose
Sarvam-Timestampis older than five minutes to guard against replay. - Custom headers set on the webhook config are sent with every delivery. The signature and timestamp headers always win over custom headers with the same name.
- If the deployment uses an inline
urlinstead of awebhook_id, deliveries are not signed.