import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const detailRecords = await client.detailRecords.list();
console.log(detailRecords.data);{
"data": [
{
"record_type": "message_detail_record",
"uuid": "3ca7bd3d-7d82-4e07-9df4-009123068320",
"user_id": "3ca7bd3d-7d82-4e07-9df4-009123068320",
"completed_at": "2020-07-01T00:00:00Z",
"created_at": "2020-07-01T00:00:00Z",
"updated_at": "2020-07-01T00:00:00Z",
"sent_at": "2020-07-01T00:00:00Z",
"carrier": "T-Mobile USA",
"carrier_fee": "0.003",
"cld": "+1555123456",
"cli": "+1555123456",
"country_code": "US",
"delivery_status": "success: webhook succeeded",
"delivery_status_failover_url": "https://api.example.com/sms/telnyx/inbound",
"delivery_status_webhook_url": "https://api.example.com/sms/telnyx/inbound",
"direction": "outbound",
"fteu": false,
"mcc": "204",
"mnc": "01",
"message_type": "SMS",
"on_net": true,
"profile_id": "30ef55db-c4a2-4c4a-9804-a68077973d07",
"profile_name": "My Messaging Profile",
"source_country_code": "US",
"status": "delivered",
"tags": "tag1,tag2,tag3",
"rate": "0.003",
"currency": "USD",
"cost": "0.003",
"errors": [
"40001"
],
"parts": 2
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}Search for any detail record across the Telnyx Platform
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const detailRecords = await client.detailRecords.list();
console.log(detailRecords.data);{
"data": [
{
"record_type": "message_detail_record",
"uuid": "3ca7bd3d-7d82-4e07-9df4-009123068320",
"user_id": "3ca7bd3d-7d82-4e07-9df4-009123068320",
"completed_at": "2020-07-01T00:00:00Z",
"created_at": "2020-07-01T00:00:00Z",
"updated_at": "2020-07-01T00:00:00Z",
"sent_at": "2020-07-01T00:00:00Z",
"carrier": "T-Mobile USA",
"carrier_fee": "0.003",
"cld": "+1555123456",
"cli": "+1555123456",
"country_code": "US",
"delivery_status": "success: webhook succeeded",
"delivery_status_failover_url": "https://api.example.com/sms/telnyx/inbound",
"delivery_status_webhook_url": "https://api.example.com/sms/telnyx/inbound",
"direction": "outbound",
"fteu": false,
"mcc": "204",
"mnc": "01",
"message_type": "SMS",
"on_net": true,
"profile_id": "30ef55db-c4a2-4c4a-9804-a68077973d07",
"profile_name": "My Messaging Profile",
"source_country_code": "US",
"status": "delivered",
"tags": "tag1,tag2,tag3",
"rate": "0.003",
"currency": "USD",
"cost": "0.003",
"errors": [
"40001"
],
"parts": 2
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Filter records on a given record attribute and value. <br/>Example: filter[status]=delivered. <br/>Required: filter[record_type] must be specified.
Show child attributes
Filter by the given record type.
ai-voice-assistant, amd, call-control, conference, conference-participant, embedding, fax, inference, inference-speech-to-text, media_storage, media-streaming, messaging, noise-suppression, recording, sip-trunking, siprec-client, stt, tts, verify, webrtc, wireless Filter by the given user-friendly date range. You can specify one of the following enum values, or a dynamic one using this format: last_N_days.
yesterday, today, tomorrow, last_week, this_week, next_week, last_month, this_month, next_month Specifies the sort order for results. <br/>Example: sort=-created_at
Successful
An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records
Show child attributes
Identifies the record schema
"message_detail_record"
Unique identifier of the message
"3ca7bd3d-7d82-4e07-9df4-009123068320"
Identifier of the Telnyx account who owns the message
"3ca7bd3d-7d82-4e07-9df4-009123068320"
Message completion time
"2020-07-01T00:00:00Z"
Message creation time
"2020-07-01T00:00:00Z"
Message updated time
"2020-07-01T00:00:00Z"
Time when the message was sent
"2020-07-01T00:00:00Z"
Country-specific carrier used to send or receive the message
"T-Mobile USA"
Fee charged by certain carriers in order to deliver certain message types. Telnyx passes this fee on to the customer according to our pricing table
"0.003"
The recipient of the message (to parameter in the Messaging API)
"+1555123456"
The sender of the message (from parameter in the Messaging API). For Alphanumeric ID messages, this is the sender ID value
"+1555123456"
Two-letter representation of the country of the cld property using the ISO 3166-1 alpha-2 format
"US"
Final webhook delivery status
"success: webhook succeeded"
Failover customer-provided URL which Telnyx posts delivery status webhooks to
"https://api.example.com/sms/telnyx/inbound"
Primary customer-provided URL which Telnyx posts delivery status webhooks to
"https://api.example.com/sms/telnyx/inbound"
Logical direction of the message from the Telnyx customer's perspective. It's inbound when the Telnyx customer receives the message, or outbound otherwise
inbound, outbound "outbound"
Indicates whether this is a Free-To-End-User (FTEU) short code message
false
Mobile country code. Only available for certain products, such as Global Outbound-Only from Alphanumeric Sender ID
"204"
Mobile network code. Only available for certain products, such as Global Outbound-Only from Alphanumeric Sender ID
"01"
Describes the Messaging service used to send the message. Available services are: Short Message Service (SMS), Multimedia Messaging Service (MMS), and Rich Communication Services (RCS)
SMS, MMS, RCS "SMS"
Indicates whether both sender and recipient numbers are Telnyx-managed
true
Unique identifier of the Messaging Profile used to send or receive the message
"30ef55db-c4a2-4c4a-9804-a68077973d07"
Name of the Messaging Profile used to send or receive the message
"My Messaging Profile"
Two-letter representation of the country of the cli property using the ISO 3166-1 alpha-2 format
"US"
Final status of the message after the delivery attempt
gw_timeout, delivered, dlr_unconfirmed, dlr_timeout, received, gw_reject, failed "delivered"
Comma-separated tags assigned to the Telnyx number associated with the message
"tag1,tag2,tag3"
Currency amount per billing unit used to calculate the Telnyx billing cost
"0.003"
Telnyx account currency used to describe monetary values, including billing cost
"USD"
Amount, in the user currency, for the Telnyx billing cost
"0.003"
Telnyx API error codes returned by the Telnyx gateway
Number of message parts. The message is broken down in multiple parts when its length surpasses the limit of 160 characters
2
Was this page helpful?