Msg91 Help Doc
Webhook (New)

Webhook (New)

What is a Webhook?

A webhook is a way for one application to automatically send real-time data to another when a specific event occurs. It works by making an HTTP POST request to a predefined URL (called a webhook endpoint). This allows systems to stay updated without manual checks. Webhooks are commonly used for sending message delivery updates.

At MSG91, you can add your webhook URL and receive real-time delivery reports for your SMS, WhatsApp, and RCS messages, as well as emails and voice calls.

Why Choose Webhook (New) Over Webhook (Old)?

The Webhook (New) option offers greater flexibility, control, and efficiency compared to the older version. Key advantages include:

  1. Customizable Parameters: Choose only the specific parameters you want to receive, reducing payload size and eliminating unnecessary data.

  2. Event Type Filtering: Select the exact event types you want to monitor, no more clutter from irrelevant events.

  3. Unified Management: Manage webhooks for all services (SMS, WhatsApp, RCS, Email, Voice) from a single interface, streamlining configuration and maintenance.

How to set up your Webhook on MSG91

  1. Go to the MSG91 Dashboard.

  2. Open the microservice (SMS/Email/WhatsApp/Voice/RCS).

  3. Go to Webhook (New) from the Left Sidebar.

Refer to the articles below to set up the Webhook for your desired service.

For SMS: https://msg91.com/help/webhook-new/how-to-receive-sms-delivery-reports-via-webhook-new

For WhatsApp: https://msg91.com/help/webhook-new/how-to-receive-whatsapp-delivery-reports-via-webhook-new

Please follow the steps below to configure the Webhook to receive real-time delivery reports (logs) on your Webhook (callback URL).

1. Go to MSG91 Dashboard » WhatsApp » Click on Webhook (New) » Click on Create Webhook.

image

2. Configure Your Webhook.

image

Step 1: Give your webhook a name for easy identification.

Step 2: Select WhatsApp Service & Event Type

On Request Received: Triggers when a message request is sent from your account. Includes "Sent" status logs, but does not share any data on delivery/failure status.

On Report Received: Sends real-time delivery reports, including delivery status (Sent, Failed, Delivered, and Read) and other details.

Note: Both event types send data for inbound and outbound messages.

Step 3: Enter Your Webhook (Callback) URL

  • When you send bulk WhatsApp messages, the webhook will still send one log (payload) per recipient number. This means for each mobile number, you will receive a separate webhook event, even if all messages are sent in a single batch.

  • The value of a few parameters ( such as messages, content, button etc)  is a stringified JSON array so make sure your Webhook is capable of receiving such data.

Step 4: The content type will be JSON. Make sure your endpoint can parse JSON data.

Step 5. Customize Parameters

Include only the fields that you want to receive on your Webhook. Below is the sample payload, which has all the parameters; you can remove the parameters that are not of your use.

{

  "CRQID": "{{CRQID}}",

  "companyId": "{{companyId}}",

  "requestedAt": "{{requestedAt}}",

  "mobile": "{{mobile}}",

  "content": "{{content}}",

  "requestId": "{{requestId}}",

  "failureReason": "{{failureReason}}",

  "status": "{{status}}",

  "uuid": "{{uuid}}",

  "integratedNumber": "{{integratedNumber}}",

  "messageType": "{{messageType}}",

  "direction": "{{direction}}",

  "templateName": "{{templateName}}",

  "campaignName": "{{campaignName}}",

  "campaignRequestId": "{{campaignRequestId}}",

  "nodeId": "{{nodeId}}",

  "templateLanguage": "{{templateLanguage}}",

  "replyMsgId": "{{replyMsgId}}",

  "accountManagerEmailId": "{{accountManagerEmailId}}",

  "oneApiRequestId": "{{oneApiRequestId}}",

  "emailId": "{{emailId}}",

  "conversationExpTimestamp": "{{conversationExpTimestamp}}",

  "moengageMsgId": "{{moengageMsgId}}",

  "webengageMsgId": "{{webengageMsgId}}",

  "clevertapMsgId": "{{clevertapMsgId}}",

  "telecomCircle": "{{telecomCircle}}",

  "circleDescription": "{{circleDescription}}",

  "customerName": "{{customerName}}",

  "contentType": "{{contentType}}",

  "text": "{{text}}",

  "latitude": "{{latitude}}",

  "longitude": "{{longitude}}",

  "caption": "{{caption}}",

  "filename": "{{filename}}",

  "url": "{{url}}",

  "button": "{{button}}",

  "contacts": "{{contacts}}",

  "reaction": "{{reaction}}",

  "interactive": "{{interactive}}",

  "order": "{{order}}",

  "messages": "{{messages}}",

  "price": "{{price}}",

  "origin": "{{origin}}",

  "statusUpdatedAt": "{{statusUpdatedAt}}"

}

Description of the parameters:

  • requestId
    Unique ID generated for each message request.
    Example: "requestId": "87b3c7e4d9914fffa8ccb85ca13e6c8e"

  • mobile
    User’s mobile number.
    Example: "mobile": "91774884090"

  • status
    Message status – Sent / Delivered / Failed / Read.
    Example: "status": "delivered"

  • content
    Content of the message.

    • Inbound: You will receive the complete message text.
      Example: "content": "{\"text\":\"Hi, I have a query\"}"

    • Outbound: You will receive the data you passed in the variables.
      Example: "content": "{\"header_1\":{\"type\":\"document\",\"document\":{\"link\":\"

      https://files.msg91.com/377775/nronwttaaa\",\"filename\":\"Test1\"}},\"body_1\":{\"type\":\"text\",\"text\":\"Test2\"},\"body_2\":{\"type\":\"text\",\"text\":\"Test3\"},\"body_3\":{\"type\":\"text\",\"text\":\"Test4\"}

      }"

  • messages
    Provides inbound message details such as the sender number, WhatsApp message ID, content type, and actual text received. It will be blank for outbound messages.
    Example: "messages": "[{\"context\":{\"from\":\"917316914325\",\"id\":\"wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAERgSQ0Q1MDZGMDQ4OEZBNjRGRTE5AA==\"},\"from\":\"917748847990\",\"id\":\"wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAEhggN0M0MzBBRTg3NjAyQ0E4RDhDQTU5MDA1QkJFQzI2NEMA\",\"timestamp\":\"1751878238\",\"type\":\"button\",\"button\":{\"payload\":\"Stop\",\"text\":\"Stop\"}}]"

  • failureReason
    If a message fails, this field shows the reason including error code and description.
    Example: "failureReason": "131049: This message was not delivered to maintain healthy ecosystem engagement."

  • button
    Response text for quick reply buttons.
    Example: "button": "{\"payload\":\"Stop\",\"text\":\"Stop\"}"

  • integratedNumber
    Your integrated WhatsApp business number.
    Example: "integratedNumber": "917316914325"

  • direction
    Message direction – 1 for Outbound, 0 for Inbound.
    Example: "direction": "0"

  • templateName
    Name of the WhatsApp message template used.
    Example: "templateName": "order_status"

  • CRQID
    A custom parameter you can pass in the API payload. You will receive the same value in the webhook.
    Example: "CRQID": "Inactive_users"

  • companyId
    Unique ID of your company for identifying your MSG91 account.
    Example: "companyId": "384905"

  • requestedAt
    Timestamp of when the message request was initiated from your end.
    Example: "requestedAt": "2025-07-08 08:20:26.259000"

  • statusUpdatedAt
    Timestamp of the latest message status update.

    • If the status is Delivered, this is the delivery time.

      Example: "statusUpdatedAt": "2025-07-08 07:41:13"

    • If the status is Sent, this reflects the sent time.
      Example: "statusUpdatedAt": "2025-07-08 07:41:13"

  • messageType
    Type of message received – text, interactive, or template.
    Example: "messageType": "text"

  • Uuid
    Unique ID for every message generated by Meta.
    Example: "Uuid": "wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAERgSMEE4MjFCNkI5QkU4RTY5NEM5AA=="

  • campaignName
    Name of your campaign if sent via MSG91’s Campaign service.
    Example: "campaignName": "jul8test1"

  • campaignRequestId
    Unique request ID of your campaign.
    Example: "campaignRequestId": "1751960463_0b863cfb12a2293657f1f46ebf1cc546"

  • templateLanguage
    Language of your WhatsApp template.
    Example: "templateLanguage": "en_US"

  • accountManagerEmailId
    Email ID of your MSG91 account manager.
    Example: "accountManagerEmailId": "

    [email protected]

    "

  • telecomCircle
    The telecom circle of the customer’s mobile number.
    Example: "telecomCircle": "Madhya Pradesh & Chhattisgarh"

  • circleDescription
    Description of the telecom circle.
    Example: "circleDescription": "State of Madhya Pradesh and State of Chhattisgarh"

  • customerName
    Name of the customer who has sent the message.
    Example: "customerName": "Manas"

  • price
    Charge deducted for sending the template.
    Example: "price": "0.115"

  • origin
    Category of your WhatsApp template.
    Example: "origin": "utility"

  • replyMsgId
    Unique WhatsApp message ID of the template the user replied to or interacted with.
    Example: "replyMsgId": "wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAERgSRUJGN0JCOTBBMUY5RUJGMEY3AA=="

  • contentType
    Type of content received in inbound messages – text, image, interactive, etc.

  • contacts
    Contact details of the user stored in your Segmento phonebook.
    Example: "contacts": "[{\"profile\":{\"name\":\"Manas\"},\"wa_id\":\"91774884730\"}]"

  • text
    Exact text of the message received on your number.
    Example: "text": "Contact store"

  • latitude
    Latitude of the location shared in an inbound message.
    Example: "latitude": "22.7252947"

  • longitude
    Longitude of the location shared in an inbound message.
    Example: "longitude": "75.8905714"

  • filename
    The file name of the attachment.
    Example: "filename": Invoice June 2025"

  • nodeId
    Node ID of your MSG91 campaign.
    Example: "nodeId": "88353"

  • reaction
    The user’s reaction to your message or template.

    The Emoji will be sent in Unicode, so please ensure your webhook is capable of receiving

    such data.
    Example: "reaction": "👍🏻"

  • emailId
    Registered email ID of your MSG91 account
    Example: ”emailId": "

    [email protected]

    "

  • oneApiRequestId
    Request ID if you sent it via One API.

  • webengageMsgId
    Unique ID of the message if the message was sent via WebEngage

  • clevertapMsgId
    Unique ID of the message if the message was sent via Clevertap.

  • moengageMsgId:
    Unique ID of the message if the message was sent via MoEngage.

Sample Webhook payload of an Outbound message:

{

  "CRQID": "",

  "companyId": "384905",

  "requestedAt": "2025-07-08 07:41:12.697000",

  "mobile": "9179993700",

  "content": "{\"body_1\":{\"type\":\"text\",\"text\":\"Aniket\"}}",

  "requestId": "e0168ppab9e4c80b7bbb7705ad915c5",

  "failureReason": "",

  "status": "Delivered",

  "uuid": "wamid.HBgMOTE3OTk5MzcwODU4FQIAERgSNkI2RjBCQTk1QTc5Mjc0N0U5AA==",

  "integratedNumber": "917316914325",

  "messageType": "template",

  "direction": "1",

  "templateName": "order_status",

  "campaignName": "jul8test1",

  "campaignRequestId": "1751960463_0b863cfb12a2293657f1f46ebf1cc546",

  "nodeId": "88353",

  "templateLanguage": "en_US",

  "replyMsgId": "",

  "accountManagerEmailId": "

[email protected]

",

  "oneApiRequestId": "",

  "emailId": "

[email protected]

",

  "conversationExpTimestamp": "",

  "moengageMsgId": "",

  "webengageMsgId": "",

  "clevertapMsgId": "",

  "telecomCircle": "Madhya Pradesh & Chhattisgarh",

  "circleDescription": "State of Madhya Pradesh and State of Chhattisgarh",

  "customerName": "",

  "contentType": "",

  "text": "",

  "latitude": "",

  "longitude": "",

  "caption": "",

  "filename": "",

  "url": "",

  "button": "",

  "contacts": "",

  "reaction": "",

  "interactive": "",

  "order": "",

  "messages": "",

  "price": "0.115",

  "origin": "utility",

  "statusUpdatedAt": "2025-07-08 07:41:13"

}

Sample Webhook payload for an Inbound message:

{

  "CRQID": "",

  "companyId": "384905",

  "requestedAt": "2025-07-08 08:06:38.064000",

  "mobile": "91774841190",

  "content": "{\"button_reply\":\"Contact store\"}",

  "requestId": "87b3c7e4d9914fffa8ccb85ca13e6c8e",

  "failureReason": "",

  "status": "delivered",

  "uuid": "wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAEhggNENGQzYxMDk5NTg2MUQ5NjQ1REMzQzNBODRBMDM1RkMA_hello",

  "integratedNumber": "917316914325",

  "messageType": "interactive",

  "direction": "0",

  "templateName": "",

  "campaignName": "",

  "campaignRequestId": "",

  "nodeId": "",

  "templateLanguage": "",

  "replyMsgId": "wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAERgSNDQ1N0RCRjJGRTA3NThEMzE3AA==",

  "accountManagerEmailId": "",

  "oneApiRequestId": "",

  "emailId": "",

  "conversationExpTimestamp": "",

  "moengageMsgId": "",

  "webengageMsgId": "",

  "clevertapMsgId": "",

  "telecomCircle": "Madhya Pradesh & Chhattisgarh",

  "circleDescription": "State of Madhya Pradesh and State of Chhattisgarh",

  "customerName": "Manas ",

  "contentType": "interactive",

  "text": "Contact store",

  "latitude": "",

  "longitude": "",

  "caption": "",

  "filename": "",

  "url": "",

  "button": "",

  "contacts": "[{\"profile\":{\"name\":\"Manas \"},\"wa_id\":\"917748847990\"}]",

  "reaction": "",

  "interactive": "",

  "order": "",

  "messages": "[{\"context\":{\"from\":\"917316914325\",\"id\":\"wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAERgSNDQ1N0RCRjJGRTA3NThEMzE3AA==\"},\"from\":\"917748847990\",\"id\":\"wamid.HBgMOTE3NzQ4ODQ3OTkwFQIAEhggNENGQzYxMDk5NTg2MUQ5NjQ1REMzQzNBODRBMDM1RkMA\",\"timestamp\":\"1751961996\",\"type\":\"interactive\",\"interactive\":{\"type\":\"button_reply\",\"button_reply\":{\"id\":\"0670fbb8-46c7-4bca-9c2f-687243ee751c\",\"title\":\"Contact store\"}}}]",

  "price": "",

  "origin": "",

  "statusUpdatedAt": ""

}

You can also add the Headers in the key-value pairs, and then we will send all the reports including these Headers:

Headers In Webhook.png

Step 6: Click Create to save your webhook configuration.

Still have questions?

Feel free to reach us at +91 8818888733 via call or WhatsApp or drop an email to

[email protected]

.

How to Receive WhatsApp Delivery Reports via Webhook (New)
Webhook configurationreal-time delivery reportsMSG91 WhatsAppcallback URLWebhooks payload
Jul 9, 2025

To receive delivery reports for your SMS, you can use the Webhook (New) feature on the MSG91 platform. Follow the steps below to set it up.

1. Log in to your MSG91 Dashboard » SMS » Webhook (New) » Click on Create Webhook.

Mystic2-MSG91-07-09-2025_01_11_PM.png

2. Configure Your Webhook.

WebhookSMS1 (1).png

Step 1: Provide a name to your webhook.

Step 2: Select SMS and the event type you wish to receive:

On Request Received: Triggers when an SMS request is sent from your account.

Provides logs, but does not include delivery status.

On Report Received: Provides real-time delivery reports, including success/failure status and additional details.

Note: To receive both event types, you must create two separate webhooks.

Step 3: Enter your Webhook URL (Callback URL) where data should be sent.

  • When you send bulk messages, the webhook will still send one log (payload) per recipient number. This means for each mobile number, you will receive a separate webhook event, even if all messages are sent in a single batch.

  • The value of a few parameters is a stringified JSON array, so make sure your Webhook is capable of receiving such data.

Content-Type: Only JSON is supported. Ensure your endpoint can parse JSON data in any format.

Step 4. Customize Data Parameters

Use { to add fields/ parameters you want to receive.

You can include or exclude fields as needed. Ensure parameters follow valid JSON formatting.

Below is the sample payload, which has all the fields:

{

  "requestedAt": "{{requestedAt}}",

  "status": "{{status}}",

  "deliveryTime": "{{deliveryTime}}",

  "requestId": "{{requestId}}",

  "telNum": "{{telNum}}",

  "credit": "{{credit}}",

  "senderId": "{{senderId}}",

  "campaignName": "{{campaignName}}",

  "scheduleDateTime": "{{scheduleDateTime}}",

  "msgData": "{{msgData}}",

  "route": "{{route}}",

  "DLT_TE_ID": "{{DLT_TE_ID}}",

  "campaign_pid": "{{campaign_pid}}",

  "nodeId": "{{nodeId}}",

  "userIp": "{{userIp}}",

  "clientId": "{{clientId}}",

  "UUID": "{{UUID}}",

  "INMSID": "{{INMSID}}",

  "CRQID": "{{CRQID}}",

  "countryName": "{{countryName}}",

  "failureReason": "{{failureReason}}",

  "smsLength": "{{smsLength}}",

  "telecomCircle": "{{telecomCircle}}",

  "circleDescription": "{{circleDescription}}",

  "user_pid": "{{user_pid}}"

}

Description of the parameters:

  • requestId
    Unique ID generated for each message request.
    Example: "requestId": "686e0471d6fc0577de5d4462"

  • telNum
    The user’s mobile number.
    Example: "telNum": "91774884090"

  • deliveryTime
    Timestamp of when the SMS was delivered from your end.
    Example: "deliveryTime": "2025-07-09 11:29:46"

  • requestedAt
    Timestamp of when the message request was initiated from your end.
    Example: "requestedAt": "2025-07-08 08:20:26.259000"

  • status
    Message status – Sent / Delivered / Failed / Read.

0 = Sent

1 = Delivered

2 = Failed
Example: "status": "1"

  • credit
    Total charges deducted for the SMS sent.
    Example: "credit": "0.20"

  • senderId
    Sender ID used to send the SMS.
    Example: "senderId": "txtapi

  • campaignName
    Name of your campaign. It will show the Sender ID if there is no campaign name.
    Example: "campaignName": "TXTAPI"

  • scheduleDateTime
    The date and time of the message when it was scheduled. You will receive this field only when the message has been scheduled.
    Example: "scheduleDateTime": "2025-07-09 11:57:34"

  • route
    The route of the message through which the message was sent. 4 is for Transactional and 1 for Promotional
    Example: "route": "4"

  • DLT_TE_ID
    DLT Template ID of your message.
    Example: "DLT_TE_ID": "1748558999665865"

  • clientId
    Type of message received – text, interactive, or template.
    Example: "messageType": "text"

  • CRQID
    A custom parameter you can pass in the API payload. You will receive the same value in the webhook.
    Example: "CRQID": "Inactive_users"

  • failureReason
    The reason for the failure of your SMS.
    Example: "failureReason": "Template Id not found on DLT"

  • smsLength
    Number of credits deducted based on the character count of your SMS
    Example: "smsLength": "2"

  • telecomCircle
    The telecom circle of the customer’s mobile number.
    Example: "telecomCircle": "Madhya Pradesh & Chhattisgarh"

  • circleDescription
    Description of the telecom circle.
    Example: "circleDescription": "State of Madhya Pradesh and State of Chhattisgarh"

  • countryName
    Name of the country to which the SMS was sent.
    Example: "countryName": "India"

  • user_pid
    Unique company ID of your MSG91 account.
    Example: "user_pid": "390635"

  • campaign_pid
    Unique ID generated at our end for every campaign name.
    Example: "campaign_pid": "63ede36abb011b34dd35800c"

  • msgData
    It is only for the event type “Request Received” (Request Sent), it will show all the details related to the message.
    Example: "msgData": "{\n  \"requestedAt\": \"\",\n  \"status\": \"1\",\n  \"deliveryTime\": \"2025-07-09 11:27:17\",\n  \"requestId\": \"686e04777d6fc0577de5d4462\",\n  \"telNum\": \"91774817990\",\n  \"credit\": \"0.01\",\n  \"senderId\": \"txtapi\",\n  \"campaignName\": \"\",\n  \"scheduleDateTime\": \"\",\n  \"msgData\": \"\",\n  \"route\": \"931\",\n  \"DLT_TE_ID\": \"\",\n  \"campaign_pid\": \"\",\n  \"nodeId\": \"\",\n  \"userIp\": \"\",\n  \"clientId\": \"\",\n  \"UUID\": \"0\",\n  \"INMSID\": \"0\",\n  \"CRQID\": \"0\",\n  \"countryName\": \"India\",\n  \"failureReason\": \"\",\n  \"smsLength\": \"1\",\n  \"telecomCircle\": \"Madhya Pradesh & Chhattisgarh\",\n  \"circleDescription\": \"State of Madhya Pradesh and State of Chhattisgarh\",\n  \"user_pid\": \"390635\"\n}"

  • UUID
    It’s a custom parameter; whatever data you pass in the API under this field, we will deliver the same key-value pair on the webhook.
    Example: "UUID": "Campaign_July"

  • INMSID
    This parameter is for back-end tracking on our end; kindly ignore this parameter.
    Example: "INMSID": ""

  • nodeId
    Node ID of the campaign if you used the Campaign service to launch the campaign.
    Example: "nodeId": "88449"

  • userIp
    IP address from which the request was sent.
    Example: "userIp": "2600:1700:0:3002::900"

Sample payload of the data received on Webhook:

{

  "requestedAt": "",

  "status": "1",

  "deliveryTime": "2025-07-09 11:21:54",

  "requestId": "686e0376d6fc0523f4226eb2",

  "telNum": "917748847990",

  "credit": "0.25",

  "senderId": "txtapi",

  "campaignName": "",

  "scheduleDateTime": "",

  "msgData": "",

  "route": "4",

  "DLT_TE_ID": "17558945588965886",

  "campaign_pid": "",

  "nodeId": "",

  "userIp": "",

  "clientId": "",

  "UUID": "0",

  "INMSID": "0",

  "CRQID": "0",

  "countryName": "India",

  "failureReason": "",

  "smsLength": "1",

  "telecomCircle": "Madhya Pradesh & Chhattisgarh",

  "circleDescription": "State of Madhya Pradesh and State of Chhattisgarh",

  "user_pid": "390635"

}

Headers:

You can also add the Headers in the key-value pairs, and then we will send all the reports including these Headers. You can also filter the data on your webhook based on a Header.

Headers.png

3. Click Create to save your Webhook configuration.

Still have questions?

Call or WhatsApp: +91 8818888733
Email:

[email protected]

How to Receive SMS Delivery Reports via Webhook (New)
SMS delivery reportsSMS webhook configurationMSG91Callback URLMSG91 SMS Webhook Set up
Jul 9, 2025