Campaigns webhook payload

The payload Sarvam POSTs to your webhook after every campaign call attempt.
View as Markdown

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

FieldTypeDescription
app_idstring (required)ID of the agent.
app_versioninteger (required)Version of the agent.
attempt_idstring (required)Unique identifier for this call attempt.
campaign_idstring (required)Campaign this attempt belongs to.
cohort_idstring (required)Cohort this attempt belongs to.
completion_statusstring (required)Outcome of the call. One of completed, partial, failed.
connectivity_statusstring | nullWhether the call connected. One of connected, busy, no_answer, failed, or null.
next_action_statusstring | nullNext action for the retry engine (retry, reschedule, business_retry, short_duration_retry, provider_error_retry, internal_error_retry), or null if terminal.
failure_reasonstring | nullReason for failure, if applicable.
user_identifierstring (required)Unique identifier for the user (from cohort transformation config).
user_phone_numberstring (required)Phone number of the user in E.164 format.
agent_phone_numberstring | nullPhone number used by the agent for the call.
durationnumber | nullCall duration in seconds. null if the call did not connect.
interaction_idstring | nullUnique interaction ID for retrieving transcripts and recordings. null if the call did not connect.
retry_attemptinteger (required)Which attempt this is (0 = first attempt, 1 = first retry, and so on).
executed_atstring | nullTimestamp when the call was executed (ISO 8601).
start_datetimestring | nullCall start timestamp (ISO 8601 UTC). null if the call did not connect.
end_datetimestring | nullCall end timestamp (ISO 8601 UTC). null if the call did not connect.
initial_agent_variablesobject | nullAgent variables passed to the call from the cohort.
final_agent_variablesobject | nullAgent variables at the end of the conversation. null if the call did not connect.
output_agent_variablesobject | nullVariables collected by the agent during the call. null if the call did not connect.
interaction_transcriptarray | nullTranscript 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.
metadataobject | nullCustom metadata from the webhook configuration.

Examples

Connected attempt

{
"app_id": "my-agent-app",
"app_version": 1,
"attempt_id": "019d392a-4f5a-7db3-904a-6ecebb9aac96",
"campaign_id": "welcome-campaign-2026",
"cohort_id": "cohort-batch-01",
"completion_status": "completed",
"connectivity_status": "connected",
"next_action_status": null,
"failure_reason": null,
"user_identifier": "user-1001",
"user_phone_number": "+919876543210",
"agent_phone_number": "+91804XXXXXXX",
"duration": 42.5,
"interaction_id": "20260329/a1b2c3d4-10:30:00-e5f6a7b8",
"retry_attempt": 0,
"executed_at": "2026-03-29T10:30:45+05:30",
"start_datetime": "2026-03-29T05:00:32Z",
"end_datetime": "2026-03-29T05:01:15Z",
"initial_agent_variables": {
"customer_name": "Rahul Kumar",
"outstanding_amount": "1500"
},
"final_agent_variables": {
"payment_confirmed": "yes",
"sentiment": "positive"
},
"output_agent_variables": {
"payment_confirmed": "yes"
},
"interaction_transcript": [
{ "role": "agent", "en_text": "Hello Rahul, I'm calling about your pending payment of 1500 rupees." },
{ "role": "user", "en_text": "Yes, I'll pay today." }
],
"metadata": { "team": "collections" }
}

Not connected attempt

{
"app_id": "my-agent-app",
"app_version": 1,
"attempt_id": "019d392a-11c6-72bd-8eb7-c37e84bbd1f3",
"campaign_id": "welcome-campaign-2026",
"cohort_id": "cohort-batch-01",
"completion_status": "failed",
"connectivity_status": "failed",
"next_action_status": "retry",
"failure_reason": "TelephonyProvider: Rate Limit Exceeded",
"user_identifier": "user-1002",
"user_phone_number": "+919876543211",
"agent_phone_number": "+91804XXXXXXX",
"duration": null,
"interaction_id": null,
"retry_attempt": 1,
"executed_at": "2026-03-29T10:40:26+05:30",
"start_datetime": null,
"end_datetime": null,
"initial_agent_variables": {
"customer_name": "Priya Sharma",
"outstanding_amount": "2500"
},
"final_agent_variables": null,
"output_agent_variables": null,
"interaction_transcript": null,
"metadata": { "team": "collections" }
}