(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TT9ZP96');

Knowledge Base

SMS MT Postback V2

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 CodePostback Status
N201Sent
N202Delivered
E201Failed
E202Rejected

SMS MT Postback Nodes

Postback ParameterPostback Parameter Description
originSMS_MT
codePostback Notification code to identify the postback.
sent-asSMS
statusStatus of the SMS MT transaction. Example: Sent, Delivered, Failed, Rejected.
toDestination phone number with country code.
fromThe shortcode or longcode sender.
timestampThe timestamp of the SMS MT transaction.
operator-idCarrier ID for the Phone Number.
operator-nameCarrier Name for the Phone Number.
tracking-idTracking ID generated in the API Response passed back in the postback to link API Request to Postback.
campaign-refMessaging Campaign Reference ID from the API Request.
from-maskSender Mask for the Shortcode used to send the message. Sent in the postback only if it exists.

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",
          "operator-id":"CARRIER_ID",
          "operator-name":"CARRIER_NAME",
          "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",
          "operator-id":"0001470",
          "operator-name":"AT&T",
          "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",
          "operator-id":"0001470",
          "operator-name":"AT&T",
          "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",
          "operator-id":"0001470",
          "operator-name":"AT&T",
          "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",
          "operator-id":"0001470",
          "operator-name":"AT&T",
          "timestamp":"2021-01-26T18:00:07.990498+00:00"
      }’ \
  "POSTBACK_ENDPOINT_URL"
Go to Top