Create Callback Profile for Outgoing WhatsApp Messages

You must configure the Callback Profile for WhatsApp Outgoing Messages to receive notifications regarding the WhatsApp message status (sent, delivered, read, and failed) for all the messages sent using your registered business WhatsApp number. You need to first create a Callback Profile and then add the Callback Profile ID to the WhatsApp Number.

Creating a Callback Profile for WhatsApp OutgoingMessages

To create a Callback Profile for Outgoing WhatsApp messages:

  1. Follow the instructions given in Callback Profiles.

  2. Select the required HTTP method:
    i. GET and in the Endpoint field, enter the endpoint and the query parameters as shown in the following example:

    https://webhook.site/7ef1e66d-4231-46f7-907a-75dXXXXXf0dc?id=<id>&custom_response=<custom_response>&timestamp=<timestamp>&mobile=<mobile>&message=<message>&status=<status>&phone_number=<phone_number>&error=<error>&error_code=<error_code>&ref=<ref>&ref1=<ref1>&ref2=<ref2>&price=<price>
    

    πŸ“˜

    Note:

    • You need to add your own endpoint where you want to receive notifications (the one here is just an example).
    • You MUST add all the query parameters in order to get the information about the incoming message.

ii. POST and
a. In the Endpoint field, enter the endpoint (as shown in the following example) where you want to receive notifications as shown:

https://webhook.site/7ef1e66d-4231-46f7-907a-75df0df6357c

b. Enter the following POST Method in the Endpoint field:

{
"id": "<id>",
"custom_response": "<custom_response>",
"timestamp": "<timestamp>",
"mobile": "<mobile>",
"message": "<message>",
"status": "<status>",
"phone_number": "<phone_number>",
"error": "<error>",
"error_code": "<error_code>",
"ref": "<ref>",
"ref1": "<ref1>",
"ref2": "<ref2>",
"price": "<price>"
}

Sample Response

The following is an example of a callback received due to an outgoing text message received by a customer:

status	delivered
price	0.01
custom_response	false 
id	ad97eXXX-c923-4XXX-b3a3-0b1XXXXXXd97:0
message	Message delivered
phone_number	91XXXXXXXX83
mobile	91XXXXXXXX83
whatsapp_number	91XXXXXXXX80
timestamp	1710000042

The following table displays the parameter used in the sample response:

πŸ“˜

Note:

All these parameters are supported for both callback_url and callback profile_id.

ParameterDescription
statusMessage delivery status.
pricePrice of the conversation opened by the delivered message. Shown only when billed.
custom_responseThe static field is always set to false.
idThe unique API message ID shared with the customer in the callback.
messageMessage delivery information.
phone_numberThe phone number of the recipient.
mobileThe mobile number of the recipient.
whatsapp_numberThe registered WhatsApp number is in E164 format.
timestampThe time at which the callback is received.

πŸ“˜

Note:

  • For the postpaid account type, the price value exists in the callbacks for Delivered status whenever that message opens a conversation and hence it is charged.
  • For the Tech Provider account type, the price parameter is not supported.

Limitations

  • The callback about the delivered messages that opened any of the first 1000 free service conversations will have a price value pair shown in the callbacks even though the price will not be actually charged.