Campaign Webhook

Fast2SMS sends every step result of a Campaign Builder run (one message or call to one number) and every run change (started, paused, finished ...) to your webhook URL as a POST request (JSON or URL-encoded) or GET request. Step events are sent as soon as the result lands; a result that arrives after the contact moved on is still sent but never changes the journey.

Create the webhook on the dashboard (Webhooks > Create Webhook, service Campaign), on the campaign's Start step (webhook URL for that campaign only) or with the API calls in this section.

Webhook Panel Form Options

When configuring a webhook in the Fast2SMS Dashboard under CREATE WEBHOOK, the fields correspond to the API parameters as follows:

Field Label in UIAPI ParameterDescription
Webhook NamenameFriendly name for internal tracking.
Select ServiceserviceChoose Campaign to configure Campaign webhooks.
Select Campaignidentity_idall (every campaign) or one campaign id (from Campaign API > List Campaigns).
Select FormattemplateStandard Webhook (custom).
Select EventeventDefault All Events (all), or one of sent, delivered, read, failed, not_delivered, answered, not_answered, started, scheduled, resumed, paused, paused_balance, stopped, finished.
MethodmethodHTTP method (POST, GET, PUT).
URLurlDestination URL to receive payloads (public https:// or http:// address).
Content-Typecontent_typeJSON, Form URL Encoded or XML.
X-Payload-Transformpayload_transformStandard or Raw JSON. Shown only when Content-Type is Form URL Encoded.
Webhook Status (Active)statusEnable / disable (active / inactive).
BodypayloadCustom payload with the variables below.

Standard Webhook Payload

Payload Variables

VariableTypeDescription
webhook_typeStringcampaign.step.<result> for a step event (e.g. campaign.step.delivered), campaign.<event> for a run event (e.g. campaign.finished)
request_idStringRun request id (15 characters, starts with C), as returned by Start Campaign
campaign_idStringCampaign id (the Campaign Builder campaign)
campaign_nameStringRun name (the campaign name, <campaign> · API for API runs)
step_idStringStep id inside the campaign (empty on run events)
step_nameStringStep name as shown on the canvas
channelStringsms, whatsapp, rcs or voice; campaign on run events
mobileString10-digit mobile number (empty on run events)
statusStringStep result: sent, delivered, read, failed, not_delivered, answered, not_answered; run event: started, scheduled, paused, paused_balance, resumed, stopped, finished, failed
channel_statusStringThe channel's own status code or text (e.g. SMS D, WhatsApp read)
failure_reasonStringPlain reason when failed or not delivered, e.g. DND number, Sent, no delivery report within the wait time
message_idStringThe channel's message id
amount_debitedStringAmount charged for this step after refunds (₹, 4 decimals); on run events the run's net cost so far
sent_timeStringWhen the channel accepted the message, YYYY-MM-DD HH:MM:SS IST
sent_timestampIntegerSame as Unix time
delivery_timeStringWhen the result landed, YYYY-MM-DD HH:MM:SS IST
delivery_timestampIntegerSame as Unix time
next_stepStringName of the step the contact moves to on this result (empty when the journey ends)
total_contactsStringRun events only: contacts in the run
reachedStringRun events only: contacts reached so far
unreachedStringRun events only: contacts that ended without a delivered, read or answered result
timestampStringWhen the webhook was sent, YYYY-MM-DD HH:MM:SS IST

Default Payload

{
  "event": "{{webhook_type}}",
  "campaign_id": "{{campaign_id}}",
  "campaign_name": "{{campaign_name}}",
  "request_id": "{{request_id}}",
  "step_id": "{{step_id}}",
  "step_name": "{{step_name}}",
  "channel": "{{channel}}",
  "mobile": "{{mobile}}",
  "status": "{{status}}",
  "channel_status": "{{channel_status}}",
  "reason": "{{failure_reason}}",
  "message_id": "{{message_id}}",
  "cost": "{{amount_debited}}",
  "sent_time": "{{sent_time}}",
  "result_time": "{{delivery_time}}",
  "next_step": "{{next_step}}",
  "timestamp": "{{timestamp}}"
}

Example (step event)

{
  "event": "campaign.step.not_delivered",
  "campaign_id": "11",
  "campaign_name": "Payment Due",
  "request_id": "CEjOA8jbzjwRuNn",
  "step_id": "sms_1",
  "step_name": "Reminder SMS",
  "channel": "sms",
  "mobile": "9999999999",
  "status": "not_delivered",
  "channel_status": "n",
  "reason": "Sent, no delivery report within the wait time",
  "message_id": "f2s-7f3a...",
  "cost": "0.2500",
  "sent_time": "2026-11-18 10:30:05",
  "result_time": "2026-11-18 12:30:06",
  "next_step": "WhatsApp",
  "timestamp": "2026-11-18 12:30:08"
}

Example (run event)

{
  "event": "campaign.finished",
  "campaign_id": "11",
  "campaign_name": "Payment Due",
  "request_id": "CEjOA8jbzjwRuNn",
  "step_id": "",
  "step_name": "",
  "channel": "campaign",
  "mobile": "",
  "status": "finished",
  "channel_status": "",
  "reason": "",
  "message_id": "",
  "cost": "206.2000",
  "sent_time": "",
  "result_time": "",
  "next_step": "",
  "timestamp": "2026-11-18 14:02:31"
}

Opted-out numbers (blocked on WhatsApp, unsubscribed on RCS, voice opt-out) get a failed step event with the reason and the journey ends. Each delivery is listed under Webhooks > Logs in the dashboard, channel CAMPAIGN.