Message Detail Record field descriptions

Follow

Katherine Childers

Updated

What is a Message Detail Record?

A Message Detail Record (MDR) is a report that documents the details of the SMS and MMS messages you send and/or receive.

How do I download MDRs?

You can download MDRs in the Bandwidth App or via the API.

What data is provided in MDRs?

MDR fields and their descriptions are listed in the table below. Feel free to download a sample MDR if you'd like to follow along! 

Note: All times are in UTC (Coordinated Universal Time)

Field

Description

Detailed Description

Example Value

AccountId

Customer Service Account ID

This is the Account ID associated with your Bandwidth App service account. MDRs are aggregated by individual service accounts.

200001

MessageType

Type of message

This is the type of messaging channel being used. This will be populated as SMS or MMS as Bandwidth currently supports SMS and MMS messaging.

sms, mms

MessageID

Message Identifier

This is a unique identifier given to a message. All segments in a message will have the same MessageID. This ID may be used during troubleshooting to identify the message throughout Bandwidth’s systems.

00000000-0000-0000-000000000000

CallDirection

Message Direction

You'll see two values here to represent the direction of the messaging: inbound or outbound.

INBOUND, OUTBOUND

SourceTn

From Number

The number that initiated the message. It'll follow E.164 format.

15555551234

DestinationTn

To Number

The number that is receiving the message. It'll follow the E.164 format.

525556667777

TimeStamp

Time Bandwidth Received the Message

Date and time the message was received by Bandwidth.

2018-11-01T00:07:45.622Z

ErrorCode

Success Error Code

This is a historical field used to reflect the success response code, you'll see either a blank or 200 here. Please reference the MessageStatus attribute for a concise friendly status description of the success or failure of the message.

200

IntlZone

Zone Reach

This is the Zone associated with the reach of your message.  

Based on the Destination Carrier and Country, SMS messages reach to the specific zone listed in this field. For more information about Bandwidth’s Messaging Reach, visit this support article.

0 - 5

MessageDate

Message Date

This date is used for billing purposes to associate a given message to a particular service period based on the date listed here.  

Since each record represents a segment, a segmented message could have different service periods for billing.

12/1/2019

GlobalAccountID

Global Customer Account Number

This is the Global Account Number associated with you as the customer. If you have multiple service accounts (AccountId), this allows you to be identified as a single customer.

BW-0000000

ReceivedTimeStamp

Time Bandwidth Received the Message

This represents the date and time a message was received by Bandwidth. 

2018-11-01T00:07:45.622Z

SentTimestamp

Message Sent Time (Initial)

This represents the date and time the message was first attempted to be sent by Bandwidth.

2018-11-01T00:07:45.622Z

CompletedTimeStamp

Time of Final Acceptance of Message

When Bandwidth sends a message, it may not always succeed on the first attempt. This is the date and time when a message has finally been accepted or a timeout has occurred.

2018-11-01T00:07:45.622Z

MessageSegments

Message Segments

The quantity of segments the long message is broken into when sent or received.

A single message may be broken into multiple segments for delivery as dictated by the underlying messaging protocol. The number of characters at which segmentation occurs is variable depending upon the type of characters used in the message body.

See this support article for information on character encoding.

1

SegmentNumber

Segment Number

This is the segment number of the long message.

You can use this field and the attribute MessageSegments to determine which segment this record represents. For example: 1 of 2, 2 of 2.

1

MessageLength

 

Length of Message sent

This is the length of the messages sent. If the message is across segments, it will show the length of each segment. 

80

Billable

Message Billed

The field reflects if the message will be considered for billing by the Bandwidth billing system. These records show all messages associated with your account and depending on the status of the message, Bandwidth may not charge you for that message.

Bandwidth bills for Outbound Messaging on the successful attempt to deliver your message. For Inbound Messaging, Bandwidth bills on a successful attempt to deliver the message to you.

Y, N

SourceCountry

Source Country

The country of the text message sender. This is the country of the “from” number or the message sender.

US

SourceState

Source State

The state of the text message sender. This is the state of the “from” number or the message sender.

NC

SourceLATA

Source LATA

The Local Access Transport Area (LATA) of the "Source" number. This is the LATA of the “from” number or the message sender.

426

DestinationCountry

Destination Country

This is the country of the “to” number or the message recipient. The “to” number is the DestinationTN.

United States

DestinationState

Destination State

This is the state of the “to” number or the message recipient.

NC

DestinationLATA

Destination LATA

The Local Access Transport Area (LATA) of the "Destination" number. This is the LATA of the “to” number or the message recipient.

426

MessageClass

Message Class

This field is internal to Bandwidth and specific to long code A2P and P2P messaging. If you're contracted and approved to run Local A2P or P2P campaigns, this is the message class that’s assigned to your campaign.

A, P

CampaignClass

Campaign Class

This is the AT&T campaign class assigned to your campaign.

A, B, C, D, E, F, T, G, P, Q, X, Z

CampaignID

Campaign ID

This field is specific to A2P messaging. If you are contracted and approved to run Local A2P campaigns, this is the CampaignID that’s assigned to your campaign. This field will be blank if it doesn't apply to you.

user-specific

DLRCode

Delivery Receipt Response Code

This is a code returned in a delivery receipt (DLR) by the Bandwidth platform. It provides information describing the success or failure of delivering the message to the end user or downstream system. This attribute is applicable to outbound messages only.

Note: DLRs are always requested for Messaging API users, but SMPP customers must request them. For more information, please see our HTTP error codes, SMPP error codes, and MM4 error codes.

0 - Success

902 - Timeout

770 - SPAM Detected

MdrId

MDR Identifier

This is a unique identifier for each segment of a message which aids in the identification of the message segment if needed.

Note: Each segment of a message has an individual MDR.

00000000-0000-0000-000000000000

MessageStatus

Message Status

This field shows the summary status of a message. Each status has a Y or N to designate whether it's considered billable.  

Outbound message statuses:

  • SENT: The message was successfully sent from Bandwidth. This becomes a terminal status when a delivery receipt (DLR) wasn't received from the upstream provider because it either wasn't requested by the customer, wasn't sent by the upstream provider, or wasn't received by Bandwidth during the open window. (Y)
  • FAILED: The message failed within Bandwidth. For outbound messages, this indicates the message failed to send. For inbound messages, this indicates the message failed to be accepted by the customer. The error code associated with the message indicates the specific issue. (N)
  • DELIVERED: Bandwidth received a DLR that indicates the message was delivered successfully. (Y)
  • UNDELIVERED: Bandwidth received a DLR that indicates the message failed or was rejected. The error code associated with the message indicates the specific issue. (Y)

Inbound message statuses:

  • DELIVERED: DLR is received to indicate the message was delivered successfully. (Y)
  • ACCEPTED: The message was accepted by the customer. (Y)
  • FAILED: The message failed to send to the customer. (N)

SENT

FAILED

DELIVERED

UNDELIVERED

CarrierName Carrier Name

This field helps understand which carrier the message was sent to. CarrierName only applies to outbound messages that leave Bandwidth's system and are sent to Tier 1 US and Canadian Wireless Carriers - CarrierName may not be present if Bandwidth rejects the message.

Any carriers not specifically called out to the right will be marked as Other in the MDRs. 

AT&T
Bell & Virgin
Cellular South
Claro
Digicel Caribbean
Eastlink
FIDO
Freedom Mobile
Rogers
Sasktel
T-Mobile
Telus
TextNow
US Cellular
Verizon
Videotron
Other

LocationId Location ID This field explains which of your locations the message was associated with.  536863

Article is closed for comments.