Table of Contents
Synopsis
When the SMS is sent we will generate a Postback notification. When we receive an SMS delivery receipt we will generate another Postback notification. Not all carriers provide SMS delivery receipts.
SMS MT Success/Failure Status Codes
| Postback Code | Postback Status |
| N201 | Sent |
| N202 | Delivered |
| E201 | Failed |
| E202 | Rejected |
SMS MT Postback Nodes
| Postback Parameter | Postback Parameter Description |
| origin | SMS_MT |
| code | Postback Notification code to identify the postback. |
| sent-as | SMS |
| status | Status of the SMS MT transaction. Example: Sent, Delivered, Failed, Rejected. |
| to | Destination phone number with country code. |
| from | The shortcode or longcode sender. Alphanumeric sender supported only for carriers in certain countries; not supported in the USA. |
| timestamp | The timestamp of the SMS MT transaction. |
| tracking-id | Tracking ID generated in the API Response passed back in the postback to link API Request to Postback. |
| campaign-ref | Messaging Campaign Reference ID from the API Request. |
POSTBACK: N201/N202/E201/E202 Request
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"SMS_MT",
"code":"STATUS_CODE",
"sent-as":"SMS",
"status":"STATUS",
"from":"SENDER_NUMBER",
"to":"RECEIVER_PHONE_NUMBER_WITH_COUNTRY_CODE",
"tracking-id":"TRACKING_ID",
"timestamp":"SENT_TIMESTAMP"
}’ \
"POSTBACK_ENDPOINT_URL"
POSTBACK: N201 Example (SMS MT Sent)
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"SMS_MT",
"code":"N201",
"sent-as":"SMS",
"status":"Sent",
"from":"000000",
"to":"10000000000",
"tracking-id":"xxxxxxxxxxxx",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"POSTBACK_ENDPOINT_URL"
Alphanumeric Sender
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"SMS_MT",
"code":"N201",
"sent-as":"SMS",
"status":"Sent",
"from":"Dunder Mifflin",
"to":"10000000000",
"tracking-id":"xxxxxxxxxxxx",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"POSTBACK_ENDPOINT_URL"
POSTBACK: N202 Example (SMS MT Delivered)
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"SMS_MT",
"code":"N202",
"sent-as":"SMS",
"status":"Delivered",
"from":"000000",
"to":"10000000000",
"tracking-id":"xxxxxxxxxxxx",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"POSTBACK_ENDPOINT_URL"
Alphanumeric Sender
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"SMS_MT",
"code":"N202",
"sent-as":"SMS",
"status":"Delivered",
"from":"Dunder Mifflin",
"to":"10000000000",
"tracking-id":"xxxxxxxxxxxx",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"POSTBACK_ENDPOINT_URL"
POSTBACK: E201 Example (SMS MT Failed)
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"SMS_MT",
"code":"E201",
"sent-as":"SMS",
"status":"Failed",
"from":"00000",
"to":"10000000000",
"tracking-id":"xxxxxxxxxxxx",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"POSTBACK_ENDPOINT_URL"
POSTBACK: E202 Example (SMS MT Rejected)
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"SMS_MT",
"code":"E202",
"sent-as":"SMS",
"status":"Rejected",
"from":"000000",
"to":"10000000000",
"tracking-id":"xxxxxxxxxxxx",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"POSTBACK_ENDPOINT_URL"