Skip to main content
GET
/
reports
/
mdrs
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.reports.listMdrs();

console.log(response.data);
{
  "data": [
    {
      "created_at": "2020-07-01T00:00:00-06:00",
      "profile_name": "configured-profile-name",
      "direction": "outbound",
      "parts": 2,
      "status": "DELIVERED",
      "cld": "+1555123456",
      "cli": "+1555123456",
      "rate": "0.05",
      "cost": "0.1",
      "currency": "USD",
      "id": "99b637f3-07fd-45ac-b9ca-b87208c24650",
      "message_type": "SMS",
      "record_type": "mdr_report"
    }
  ],
  "meta": {
    "total_pages": 3,
    "total_results": 55,
    "page_number": 2,
    "page_size": 25
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

start_date
string

Pagination start date

end_date
string

Pagination end date

id
string

Message uuid

Example:

"e093fbe0-5bde-11eb-ae93-0242ac130002"

direction
enum<string>

Direction (inbound or outbound)

Available options:
INBOUND,
OUTBOUND
Example:

"INBOUND"

profile
string

Name of the profile

Example:

"My profile"

cld
string

Destination number

Example:

"+15551237654"

cli
string

Origination number

Example:

"+15551237654"

status
enum<string>

Message status

Available options:
GW_TIMEOUT,
DELIVERED,
DLR_UNCONFIRMED,
DLR_TIMEOUT,
RECEIVED,
GW_REJECT,
FAILED
Example:

"DELIVERED"

message_type
enum<string>

Type of message

Available options:
SMS,
MMS
Example:

"SMS"

Response

Successful

data
object[]
meta
object