Campaigns webhook payload
The payload Sarvam POSTs to your webhook after every campaign call attempt.
After each call attempt completes — whether or not it connected — Sarvam sends a POST request to your webhook URL with the attempt result. Configure the webhook URL in the campaign’s app_config.webhook_config.
Payload schema
| Field | Type | Description |
|---|---|---|
app_id | string (required) | ID of the agent. |
app_version | integer (required) | Version of the agent. |
attempt_id | string (required) | Unique identifier for this call attempt. |
campaign_id | string (required) | Campaign this attempt belongs to. |
cohort_id | string (required) | Cohort this attempt belongs to. |
completion_status | string (required) | Outcome of the call. One of completed, partial, failed. |
connectivity_status | string | null | Whether the call connected. One of connected, busy, no_answer, failed, or null. |
next_action_status | string | null | Next action for the retry engine (retry, reschedule, business_retry, short_duration_retry, provider_error_retry, internal_error_retry), or null if terminal. |
failure_reason | string | null | Reason for failure, if applicable. |
user_identifier | string (required) | Unique identifier for the user (from cohort transformation config). |
user_phone_number | string (required) | Phone number of the user in E.164 format. |
agent_phone_number | string | null | Phone number used by the agent for the call. |
duration | number | null | Call duration in seconds. null if the call did not connect. |
interaction_id | string | null | Unique interaction ID for retrieving transcripts and recordings. null if the call did not connect. |
retry_attempt | integer (required) | Which attempt this is (0 = first attempt, 1 = first retry, and so on). |
executed_at | string | null | Timestamp when the call was executed (ISO 8601). |
start_datetime | string | null | Call start timestamp (ISO 8601 UTC). null if the call did not connect. |
end_datetime | string | null | Call end timestamp (ISO 8601 UTC). null if the call did not connect. |
initial_agent_variables | object | null | Agent variables passed to the call from the cohort. |
final_agent_variables | object | null | Agent variables at the end of the conversation. null if the call did not connect. |
output_agent_variables | object | null | Variables collected by the agent during the call. null if the call did not connect. |
interaction_transcript | array | null | Transcript of the conversation as a list of turns. Each turn has role ("agent" or "user") and en_text. null if the call did not connect. |
metadata | object | null | Custom metadata from the webhook configuration. |
Examples
Connected attempt
1 { 2 "app_id": "my-agent-app", 3 "app_version": 1, 4 "attempt_id": "019d392a-4f5a-7db3-904a-6ecebb9aac96", 5 "campaign_id": "welcome-campaign-2026", 6 "cohort_id": "cohort-batch-01", 7 "completion_status": "completed", 8 "connectivity_status": "connected", 9 "next_action_status": null, 10 "failure_reason": null, 11 "user_identifier": "user-1001", 12 "user_phone_number": "+919876543210", 13 "agent_phone_number": "+91804XXXXXXX", 14 "duration": 42.5, 15 "interaction_id": "20260329/a1b2c3d4-10:30:00-e5f6a7b8", 16 "retry_attempt": 0, 17 "executed_at": "2026-03-29T10:30:45+05:30", 18 "start_datetime": "2026-03-29T05:00:32Z", 19 "end_datetime": "2026-03-29T05:01:15Z", 20 "initial_agent_variables": { 21 "customer_name": "Rahul Kumar", 22 "outstanding_amount": "1500" 23 }, 24 "final_agent_variables": { 25 "payment_confirmed": "yes", 26 "sentiment": "positive" 27 }, 28 "output_agent_variables": { 29 "payment_confirmed": "yes" 30 }, 31 "interaction_transcript": [ 32 { "role": "agent", "en_text": "Hello Rahul, I'm calling about your pending payment of 1500 rupees." }, 33 { "role": "user", "en_text": "Yes, I'll pay today." } 34 ], 35 "metadata": { "team": "collections" } 36 }
Not connected attempt
1 { 2 "app_id": "my-agent-app", 3 "app_version": 1, 4 "attempt_id": "019d392a-11c6-72bd-8eb7-c37e84bbd1f3", 5 "campaign_id": "welcome-campaign-2026", 6 "cohort_id": "cohort-batch-01", 7 "completion_status": "failed", 8 "connectivity_status": "failed", 9 "next_action_status": "retry", 10 "failure_reason": "TelephonyProvider: Rate Limit Exceeded", 11 "user_identifier": "user-1002", 12 "user_phone_number": "+919876543211", 13 "agent_phone_number": "+91804XXXXXXX", 14 "duration": null, 15 "interaction_id": null, 16 "retry_attempt": 1, 17 "executed_at": "2026-03-29T10:40:26+05:30", 18 "start_datetime": null, 19 "end_datetime": null, 20 "initial_agent_variables": { 21 "customer_name": "Priya Sharma", 22 "outstanding_amount": "2500" 23 }, 24 "final_agent_variables": null, 25 "output_agent_variables": null, 26 "interaction_transcript": null, 27 "metadata": { "team": "collections" } 28 }