You can specify a callback URL to retrieve delivery receipts from the HTTP server. By setting up a callback URL, you can ensure that you receive timely and accurate information about the status of your SMS messages.
Protocol
Parameter | Description |
---|---|
Protocol | HTTP + JSON |
Encoding | UTF-8 |
Request parameters
The data of a POST request is in the JSON Array format. Multiple delivery receipts may be pushed to the HTTP server at a time.Parameter | Type | Example | Description |
---|---|---|---|
To | String | 8521234**** | The mobile phone number that receives delivery receipts. |
Status | String | 1 | The status of the message.
|
MessageId | String | 123456789**** | The ID of the delivery receipt. |
TaskId | String | 123456 | The ID of the task. |
SendDate | String | Thu, 25 Nov 2021 10:27:00 +0800 | The time when the message was sent to the carrier. |
ReceiveDate | String | Thu, 25 Nov 2021 10:27:33 +0800 | The time when the delivery receipt was received from the carrier. |
ErrorCode | String | success | The error code. |
ErrorDescription | String | success | The error message. |
[{
"To" : "8521111****",
"SendDate" : "Thu, 25 Nov 2021 10:25:00 +0800",
"ReceiveDate" : "Thu, 25 Nov 2021 10:25:33 +0800",
"Status" : "1",
"ErrorCode" : "success",
"ErrorDescription" : "success",
"TaskId" : "67890",
"MessageId" : "123450000****"
},{
"To" : "8521234****",
"SendDate" : "Thu, 25 Nov 2021 10:27:00 +0800",
"ReceiveDate" : "Thu, 25 Nov 2021 10:27:33 +0800",
"Status" : "1",
"ErrorCode" : "success",
"ErrorDescription" : "success",
"TaskId" : "67890",
"MessageId" : "123456789****"
}]
Response parameters
If a delivery receipt is pushed to your HTTP server, 200 is returned. Otherwise, the system tries to push the delivery receipt again.- Sample response
{ "code" : 0, "msg" : "The message is received." }
- Response parameters
Parameter Type Required Example Description code Number Yes 0 The code of the response. msg String No Received The error message.
Retries
After the system fails to push a delivery receipt, it tries to push the delivery receipt again 1 minute or 5 minutes later until the delivery receipt is pushed. If the system fails to push a delivery receipt for three consecutive times, it stops pushing the delivery receipt.