Check out our upcoming events and meetups! View events →
Fetch all Mdr records
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
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
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pagination start date
Pagination end date
Message uuid
"e093fbe0-5bde-11eb-ae93-0242ac130002"
Direction (inbound or outbound)
INBOUND, OUTBOUND "INBOUND"
Name of the profile
"My profile"
Destination number
"+15551237654"
Origination number
"+15551237654"
Message status
GW_TIMEOUT, DELIVERED, DLR_UNCONFIRMED, DLR_TIMEOUT, RECEIVED, GW_REJECT, FAILED "DELIVERED"
Type of message
SMS, MMS "SMS"
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
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
}
}