The DLR Push API allows the delivery report of a sent message to be sent to the client’s specified Webhook URL using the POST
method create here. You can create the Webhook URL by following the instructions below:
id
for the newly created Webhook.To request delivery reports, include the webhook_id
parameter and its corresponding value in your API Request. Once the request is made, you will receive the delivery report as shown below.
curl -X POST \
https://www.domain.com/ack/receive \
-H 'content-type: application/json' \
-H "Authorization: Bearer %token%", \
-d '{
"id": "b34e35ad-fe34-4a8b-977c-b21cd76cd7d6:1",
"mobile": "918921269xxx",
"status": "DELIVRD",
"credits": "2.0000",
"units": 2,
"deliv_at": "1701086585",
"sent_at": "1701063180",
"submit_at": "1701059582",
"deliv_time": "2021-04-09 16:27:51",
"sent_time": "2021-04-09 16:27:35",
"submit_time": "2021-04-09 16:27:39",
"cid": "1234444XXXX",
"custom": "9882XXXX",
}'
The response codes other than 200 or 202 are not taken into consideration and requests for such response codes are considered as failed.
The method used for sending the delivery report onto the client’s URL is POST
.
We retry 3 times with an interval of 30 minutes for failed requests. Continued failure requests will be ignored.
For users seeking enhanced customization, compose webhook will help to receive the customized webhook payload to precisely match your preferences and requirements.
https://www.domain.com/ack/receive?id={{id}}&mobile={{mobile}}&status={{status}}
https://www.domain.com/ack/receive?message_id={{id}}&mobile_number={{mobile}}&message_status={{status}}
id
for the newly created Webhook.webhook_id
parameter and its corresponding value in your API Request. Once the request is made, you will receive the delivery report as you configured.Ex: {{status}}
. curl -X POST \
https://www.domain.com/ack/receive?id={{id}} \
-H 'content-type: application/json' \
-H "Authorization: Bearer %token%", \
-d '{
"id": "{{id}}",
"mobile": "{{mobile}}",
"message_status": "{{status}}",
"credits": "{{credits}}",
}'
Name | Description |
---|---|
id | Message Id generated by us |
mobile | Mobile number with country code |
status | Message Status |
credits | Credits charged per sms |
units | Number of sms parts |
deliv_time | Delivery time in date format (yyyy-mm-dd H:i:s) |
sent_time | Request received time in date format (yyyy-mm-dd H:i:s) |
submit_time | Sent to operator time in date format (yyyy-mm-dd H:i:s) |
deliv_at | Delivery time in unixtimestamp |
sent_time | Request received time in unixtimestamp |
submit_time | Sent to operator time in unixtimestamp |
custom | Your custom id |