RCS Webhook Overview

Fast2SMS can send real-time RCS delivery updates and incoming customer messages as a POST request (JSON or URL-encoded) or GET request to your configured webhook URL.

Webhook Formats

When creating a webhook, you can select one of the following formats under Select Format:

  1. Standard Webhook (custom): Fully customizable. Allows configuration of Select Event, Method, Content-Type, and Body (payload). X-Payload-Transform is shown only when Content-Type is Form URL Encoded.
  2. CleverTap (RCS) (clevertap_rcs): Integrates directly with CleverTap's webhook callback structure. Select Event, Method, Content-Type, and Body are locked (read-only) when this template is selected.

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 & Visibility Rules
Webhook NamenameFriendly name for internal tracking.
Select ServiceserviceChoose RCS to configure RCS webhooks.
Select FormattemplateChoose Standard Webhook or CleverTap (RCS).
Select EventeventFilter trigger events (e.g. Default All Events, On Sent, On Delivered, On Read, On Failed, Incoming Messages). Locked if format is not Standard Webhook.
Bot Ididentity_idOptional RCS Bot ID. Defaults to "Default All". Only shown when Service is RCS.
MethodmethodHTTP method (POST, GET, PUT). Locked if format is not Standard Webhook.
URLurlDestination URL to receive payloads.
Content-Typecontent_typeTarget encoding format (JSON, Form URL Encoded, XML). Locked if format is not Standard Webhook.
X-Payload-Transformpayload_transformTransform level (Standard, Raw JSON). Shown only when Content-Type is Form URL Encoded.
Webhook Status (Active)statusSwitch to enable/disable webhook triggers (active/inactive).
BodypayloadCustom payload structure text. Locked if format is not Standard Webhook.

Standard Webhook Payload

Payload Variables

VariableTypeDescription
request_idStringUnique request identifier for the message
routeStringThe service route (e.g., response or rcs)
sender_idStringThe Sender ID / Bot ID
delivery_attemptIntegerNumber of delivery attempts
character_countIntegerCharacter count of the message text
mobileStringRecipient 10-digit mobile number
statusStringDelivery status (e.g., delivered, failed, received)
status_descriptionStringDetailed status text
udf1StringUser Defined Field 1 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking.
udf2StringUser Defined Field 2 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking.
udf3StringUser Defined Field 3 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking.
bot_idStringRCS Bot identifier
error_messageStringDetails of the error if delivery failed
fromStringSender phone number (for incoming messages)
message_typeStringMessage type (e.g., text)
bodyStringMessage text body (for incoming messages)
post_attemptIntegerWebhook retry attempt count
webhook_typeStringEvent type (e.g., status_update, incoming_message)
tsStringUnix timestamp reference
failure_reasonStringFailure reason description
descriptionStringEvent status overview
mime_typeStringMIME type for media
media_urlStringURL to media files
captionStringCaption for media messages
timestampIntegerTimestamp of the event

Example JSON Payload (Status Update)

{
  "request_id": "Rabcdef12345678",
  "route": "response",
  "sender_id": "GLOBAL",
  "delivery_attempt": 1,
  "character_count": 120,
  "mobile": "9999999999",
  "status": "delivered",
  "status_description": "Delivered successfully",
  "udf1": "TEST-CLIENT-ID",
  "udf2": "TEST-CRQID",
  "udf3": "TEST-UUID-1234",
  "bot_id": "test_rcs_bot",
  "error_message": "Test error message",
  "post_attempt": 1,
  "webhook_type": "status_update",
  "ts": "1718712002",
  "failure_reason": "",
  "description": "Delivered successfully",
  "timestamp": 1718712002
}

CleverTap (RCS) Webhook Payload

If you select the CleverTap (RCS) format, the payload will be structured as follows:

Example JSON Payload (CleverTap RCS)

{
  "payloadVersion": "1",
  "statuses": [
    {
      "msgId": "Rabcdef12345678",
      "status": "delivered",
      "timestamp": "1718712002",
      "description": "Delivered successfully"
    }
  ]
}