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

ParameterDescription
ProtocolHTTP + JSON
EncodingUTF-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.
ParameterTypeExampleDescription
ToString8521234****The mobile phone number that receives delivery receipts.
StatusString1The status of the message.
  • 1: The message was sent.
  • 2: The message failed to be sent.
  • 6: The message expired.
MessageIdString123456789****The ID of the delivery receipt.
TaskIdString123456The ID of the task.
SendDateStringThu, 25 Nov 2021 10:27:00 +0800The time when the message was sent to the carrier.
ReceiveDateStringThu, 25 Nov 2021 10:27:33 +0800The time when the delivery receipt was received from the carrier.
ErrorCodeStringsuccessThe error code.
ErrorDescriptionStringsuccessThe error message.
Example
[{
    "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
    ParameterTypeRequiredExampleDescription
    codeNumberYes0The code of the response.
    msgStringNoReceivedThe 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.