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:
- 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. - 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 UI | API Parameter | Description & Visibility Rules |
|---|---|---|
| Webhook Name | name | Friendly name for internal tracking. |
| Select Service | service | Choose RCS to configure RCS webhooks. |
| Select Format | template | Choose Standard Webhook or CleverTap (RCS). |
| Select Event | event | Filter 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 Id | identity_id | Optional RCS Bot ID. Defaults to "Default All". Only shown when Service is RCS. |
| Method | method | HTTP method (POST, GET, PUT). Locked if format is not Standard Webhook. |
| URL | url | Destination URL to receive payloads. |
| Content-Type | content_type | Target encoding format (JSON, Form URL Encoded, XML). Locked if format is not Standard Webhook. |
| X-Payload-Transform | payload_transform | Transform level (Standard, Raw JSON). Shown only when Content-Type is Form URL Encoded. |
| Webhook Status (Active) | status | Switch to enable/disable webhook triggers (active/inactive). |
| Body | payload | Custom payload structure text. Locked if format is not Standard Webhook. |
Standard Webhook Payload
Payload Variables
| Variable | Type | Description |
|---|---|---|
request_id | String | Unique request identifier for the message |
route | String | The service route (e.g., response or rcs) |
sender_id | String | The Sender ID / Bot ID |
delivery_attempt | Integer | Number of delivery attempts |
character_count | Integer | Character count of the message text |
mobile | String | Recipient 10-digit mobile number |
status | String | Delivery status (e.g., delivered, failed, received) |
status_description | String | Detailed status text |
udf1 | String | User Defined Field 1 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking. |
udf2 | String | User Defined Field 2 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking. |
udf3 | String | User Defined Field 3 – Optional custom value passed via API and returned in the webhook for your internal reference or tracking. |
bot_id | String | RCS Bot identifier |
error_message | String | Details of the error if delivery failed |
from | String | Sender phone number (for incoming messages) |
message_type | String | Message type (e.g., text) |
body | String | Message text body (for incoming messages) |
post_attempt | Integer | Webhook retry attempt count |
webhook_type | String | Event type (e.g., status_update, incoming_message) |
ts | String | Unix timestamp reference |
failure_reason | String | Failure reason description |
description | String | Event status overview |
mime_type | String | MIME type for media |
media_url | String | URL to media files |
caption | String | Caption for media messages |
timestamp | Integer | Timestamp 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"
}
]
}