Campaign webhook payload for AI calling attempts
After each call attempt completes — whether or not it connected — Sarvam sends a POST request to your webhook with the attempt result. Set the target in the campaign’s app_config.webhook_config either as an inline url or as a webhook_id referencing a stored webhook config. Deliveries that use a stored webhook config are signed — see Verifying the delivery.
Payload schema
Examples
Connected attempt
Experiment attempt
When the campaign runs an experiment, experiment identifies the arm that was dialed. app_id and app_version are that variant’s agent version. A later retry of the same contact can carry a different variant_id.
Not connected attempt
Verifying the delivery
When the campaign’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 campaign uses an inline
urlinstead of awebhook_id, deliveries are not signed.