# Status and delivery report postbacks
Get delivery status reports for each message that's sent through the XML or JSON API.
## MMS MT Delivery Report Postbacks Overview
The MMS MT postback API notifies you of the delivery status of each message you send. There are two methods for delivering content; Binary and HTML. Below are postback notification formats depending on which method is used.
## MMS MT Postback Types
- MMS Delivery status
- saveMMS Encoding Status
## MMS MT Delivery Status
A postback notification called N101 is immediately sent after we begin to process the MMS. Upon receiving Delivery Report (DLR) from the carrier, the system generates postback notification N102 with the handset information. The N101 and N102 notifications are linked by tracking-id.
When the mobile network operator doesn't support MMS or the destination handset doesn't support the size of the content within the MMS, in case of Optimized MMS we fall back to SMS/HTML to deliver the message. In this method we deliver the MMS as an SMS containing a link to an HTML page with the content.
The fallback-sms-text is included in the SMS message text. The possible MMS status code that you may receive for the delivery status is one of following: N101, N102, E101, E102.
If you specified to send a Device Discovery Message then you may receive one of the following status codes regarding the delivery status of the Device Discovery Message: N501, N502, E501, E502.
div
div
table
thead
tr
th
Variable
th
Description
tbody
tr
td
origin
td
The notification origin, for example, MMS_MT means an MMS terminated on a mobile.
tr
td
code
td
The postback notification code.
tr
td
sent-as
td
Indicates if the MMS was delivered as MMS (binary) or SMS (HTML).
tr
td
mms-id
td
The id of the MMS template.
tr
td
status
td
For N101 and N501, notification status can be “Message Sent”.
For N102 and N502, notification status can be “Message Sent/Delivered”.
For E101 and E501, notification status can be “Message Failed”.
For E102 and E502, notification status can be “Message Sent/Expired”, “Message Sent/Rejected”, “Message Sent/Failed” or, “Message Sent/Not Supported”.
tr
td
from
td
The shortcode the message is sent from
tr
td
handset
td
Handset profile returned inside Delivery Receipt. This is present only in N102 notification.
tr
td
to
td
The recipient of the message.
tr
td
tracking-id
td
The ID to correlate API requests, and delivery receipts.
tr
td
operator-id
td
Carrier Identification.
tr
td
timestamp
td
The timestamp the MMS was sent (N101) or when the MMS was delivered (N102).
tr
td
status-details
td
Any additional information passed back from the carrier.
tr
td
client-reference
td
Customer transaction id for the request. Passed back in all the postbacks for this transaction. Accepts max length of 64 characters.
tr
td
operator-name
td
Carrier Name for the phone number.
## Postback Schema
### N101 Status Code Examples
**N101 (Binary)**
```xml
MMS_MT
N101
MMS
Message Sent
39597
28444
12399471613
TU1TXzU5Nzg3OQ==
31003
2014-06-07T07:27:29-05:00
```
```json
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"MMS_MT",
"code":"N101",
"sent-as":"MMS",
"status":"Sent",
"status-details":"Forwarded",
"mms-id":"123456",
"from":"00000",
"to":"11111111111",
"tracking-id":"EMWMzE-iwGY-Bew",
"operator-id":"0001470",
"operator-name": "AT&T",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"{Postback Endpoint URL}"
```
**N101 (HTML)**
```xml
MMS_MT
N101
SMS
Message Sent
39755
28444
12399471613
TU1TXzU5Nzg3Nw==
31004
2014-06-07T07:27:34-05:00
Handset setting: mms with pass via HTML
```
```json
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"MMS_MT",
"code":"N101",
"sent-as":"SMS",
"status":"Sent",
"status-details":"Forwarded",
"mms-id":"123456",
"from":"00000",
"to":"11111111111",
"tracking-id":"EMWMzE-iwGY-Bew",
"operator-id":"0001470",
"operator-name": "AT&T",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"{Postback Endpoint URL}"
```
### N102 Status Code Examples
**N102 (Binary)**
```xml
MMS_MT
N102
MMS
Message Sent/Delivered
39597
28444
12399471613
TU1TXzU5Nzg3OQ==
31003
2014-06-07T07:27:34-05:00
moto17c
```
```json
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"MMS_MT",
"code":"N102",
"sent-as":"MMS",
"status":"Delivered",
"status-details": "Success",
"mms-id":"123456",
"from":"00000",
"to":"11111111111",
"tracking-id":"EMWMzE-iwGY-Bew",
"operator-id":"0001470",
"timestamp":"2021-01-26T18:00:07.990498+00:00",
"handset":"iosmms2.0"
}’ \
"{Postback Endpoint URL}"
```
**N102 (HTML)**
```xml
MMS_MT
N102
SMS
Message Sent/Delivered
28444
12399471613
TU1TXzU5Nzg3Nw==
31004
2014-06-07T07:28:09-05:00
```
```json
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"MMS_MT",
"code":"N102",
"sent-as":"SMS",
"status":"Delivered",
"status-details": "Success",
"mms-id":"123456",
"from":"00000",
"to":"11111111111",
"tracking-id":"EMWMzE-iwGY-Bew",
"operator-id":"0001470",
"timestamp":"2021-01-26T18:00:07.990498+00:00",
"handset":"iosmms2.0"
}’ \
"{Postback Endpoint URL}"
```
### N103 Status Code Example
```json
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"MMS_MT",
"code":"N103",
"sent-as":"MMS",
"status":"Expired",
"status-details": "Message Expired",
"mms-id":"123456",
"from":"00000",
"to":"11111111111",
"tracking-id":"EMWMzE-iwGY-Bew",
"operator-id":"0001470",
"operator-name": "AT&T",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"{Postback Endpoint URL}"
```
### Error Status Code Examples
#### E101
> When the system is unable to send an MMS we return a postback E101
#### E102
> When the MMS delivery fails due to various reasons we return a postback E102
**E101**
```xml
MMS_MT
E101
Message Failed
39755
28444
12399471613
TU1TXzU5Nzg3Nw==
31004
Error fetching dynamic content
```
```json
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"MMS_MT",
"code":"E101",
"status":"Failed",
"status-details":"MMS is too big",
"mms-id":"123456",
"from":"00000",
"to":"11111111111",
"tracking-id":"EMWMzE-iwGY-Bew",
"operator-id":"0001470",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"{Postback Endpoint URL}"
```
**E102**
```xml
MMS_MT
E102
Message Sent/Rejected
39755
28444
12399471613
TU1TXzU5Nzg3Nw==
31004
Recipient blocked by mobile operator
```
```json
curl -X POST \
-H "content-type: application/json" -d '
{
"origin":"MMS_MT",
"code":"E102",
"sent-as":"MMS",
"status":"Rejected",
"status-details":"Message Rejected",
"mms-id":"123456",
"from":"00000",
"to":"11111111111",
"tracking-id":"EMWMzE-iwGY-Bew",
"operator-id":"0001470",
"timestamp":"2021-01-26T18:00:07.990498+00:00"
}’ \
"{Postback Endpoint URL}"
```
### Device Discovery Message Status Code Examples
**N501**
```xml
MMS_MT
N501
MMS
Message Sent
39755
28444
12399471613
TU1TXzU5Nzg3Nw==
31004
2014-06-07T07:27:34-05:00
```
**N502**
```xml
MMS_MT
N502
MMS
Message Sent/Delivered
39597
28444
12399471613
TU1TXzU5Nzg3OQ==
31003
2014-06-07T07:27:34-05:00
moto17c
```
## saveMMS Encoding status
When MMS is saved, we generate postback notification. When saving and encoding of the content is successful we generate N003. If encoding of the content failed we generate postback E002 containing mms-id and audio-name/video-name pointing to the content that failed to encode properly. When E002 is returned the mms-id should be considered corrupted. Note: The image-name is not included since image encoding is not supported.
| Variable | Description |
| --- | --- |
| code | N003 or E002 based on the success of the content coding. |
| origin | MMS_MT for saving MMS content. |
| mms-id | The id of the MMS. |
| audio-name | URL to audio content that failed to encode properly. |
| video-name | URL to video content that failed to encode properly. |
### Status code examples
**N003 (Success)**
```xml
MMS_MT
N003
35674
```
```json
curl -X POST \
-H "content-type: application/json"
-d '{
"origin": "MMS_MT",
"code": "N003",
"audio-name": "35674"
}'
```
**E002 (Failure)**
```xml
MMS_MT
E002
35674
http://www.yoursite.com/audio/1.mp3
```
```json
curl -X POST \
-H "content-type: application/json"
-d '{
"origin": "MMS_MT",
"code": "E002",
"audio-name": "http://www.yoursite.com/audio/1.mp3"
}'
```