SMS Detail Record Object
This section outlines the SMS Detail Record object. It displays detailed information for both sent and received SMS and MMS messages.
SMS Detail Record Object Attributes
The fields listed in the table below will be returned in a JSON object when a successful request has been made.
Attribute | Data Type | Description |
---|---|---|
date_changed read only | string | The date and time when the message was last changed. |
date_insert read only | string | The date and time when the detail record was inserted to the database. |
date_sent read only | string | The date and time when the message was actually sent. |
date_start read only | string | The date and time of the message creation. |
date_stop read only | string | The date and time of the message delivery (with any status). |
delay_sent read only | integer | Delay between when the request is received and the message is actually sent measured in seconds. |
direction read only | string | The direction of the message. Values accepted in this field are:
|
dr_sid read only | string | Secure ID of the message detail record. |
mcc read only | integer | The mobile country code. |
media_urls read only | array | The list of URLs for media resources, if |
message read only | string | The message body. |
message_segments read only | integer | The quantity of 160-symbols segments of an |
mnc read only | integer | The mobile network code. |
number_billing read only | string | The subscriber's number in the E.164 format. It will coincide with (match??) the |
number_dst read only | string | The destination number in the E.164 format. |
number_external read only | string | The non-subscriber's number in the E.164 format. It will coincide with (match??) the |
number_group_dst read only | array | Group of destination numbers. In the case of outbound direction these are the called party DIDs, and in the case of inbound direction these are the calling party DIDs. |
number_src read only | string | The source number in the E.164 format. |
partner_sid read only | string | The secure ID of the partner this message belongs to. |
price read only | number | The price in US dollars determined for the message to be delivered. |
provider read only | string | Provider that is used to send the message. |
rate read only | number | The rate that the system uses to calculate the price of the message. |
status read only | string | The status of the message. Values accepted in this field are:
|
type read only | string | The type of message. Values returned in this field are |
user_data | string | Some additional user-defined data added to the message. The field max length is |
version read only | integer | The version of the detail record as it comes from the resource. |
Sample SMS Detail Record object
{
"date_changed": "2023-12-07T15:29:09.880Z",
"date_insert": "2023-12-06T15:28:50.404Z",
"date_sent": "2023-12-06T15:28:50.991Z",
"date_start": "2023-12-06T15:28:50.403Z",
"date_stop": "2023-12-07T15:29:09.804Z",
"delay_sent": 0,
"direction": "outbound",
"dr_sid": "92cd9154-2f53-4e62-8b4e-8ff6e4849d16",
"mcc": 310,
"mcc_mnc_price": "0.015",
"mcc_mnc_rate": "0.005",
"media_urls": [
"https://storage.carrierx.com/f/cdac0471-f144-42a2-94f8-d9838ce5e4b9"
],
"message": null,
"message_segments": 1,
"mnc": 999,
"number_billing": "12078152557",
"number_dst": "17575000929",
"number_external": "17575000929",
"number_group_dst": [
"17207217011",
"17207210038",
"17575000929"
],
"number_src": "12078152557",
"partner_sid": "8d180104-0b34-4e55-907f-4a72409484c9",
"passthrough_price": null,
"passthrough_rate": null,
"price": "0.015",
"provider": "tsg",
"rate": "0.005",
"status": "sent",
"type": "mms",
"user_data": "test_message",
"version": null
}
Get Message Detail Records
This request returns a list of received and sent messages with their detailed information.
get | /sms/message_drs |
Sample
A sample GET request to get a list of received and sent messages and their detailed information:
curl -X GET \
'https://api.carrierx.com/core/v2/sms/message_drs?after=b6d574ea-b11f-41fd-a25f-602e7b28807f&limit=1' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200
status code with a list of SMS Detail Record objects:
{
"count": 1,
"has_more": true,
"items": [
{
"date_changed": "2023-12-07T15:29:09.880Z",
"date_insert": "2023-12-06T15:28:50.404Z",
"date_sent": "2023-12-06T15:28:50.991Z",
"date_start": "2023-12-06T15:28:50.403Z",
"date_stop": "2023-12-07T15:29:09.804Z",
"delay_sent": 0,
"direction": "outbound",
"dr_sid": "92cd9154-2f53-4e62-8b4e-8ff6e4849d16",
"mcc": 310,
"mcc_mnc_price": "0.015",
"mcc_mnc_rate": "0.005",
"media_urls": [
"https://storage.carrierx.com/f/cdac0471-f144-42a2-94f8-d9838ce5e4b9"
],
"message": null,
"message_segments": 1,
"mnc": 999,
"number_billing": "12078152557",
"number_dst": "17575000929",
"number_external": "17575000929",
"number_group_dst": [
"17207217011",
"17207210038",
"17575000929"
],
"number_src": "12078152557",
"partner_sid": "8d180104-0b34-4e55-907f-4a72409484c9",
"passthrough_price": null,
"passthrough_rate": null,
"price": "0.015",
"provider": "tsg",
"rate": "0.005",
"status": "sent",
"type": "mms",
"user_data": "test_message",
"version": null
}
],
"limit": 1,
"offset": 0,
"pagination": {
"previous": "https://api.carrierx.com/core/v2/sms/message_drs?before=92cd9154-2f53-4e62-8b4e-8ff6e4849d16&limit=1&offset=0"
},
"total": null
}
This request is enabled for Pagination (including after
and before
parameters), Result Filtering, and Field Filtering.
If used with after
or before
pagination, you can sort the response results by the SMS Detail Record object date_insert
attribute only (order=date_insert+asc
or order=date_insert+desc
).
Required Scopes
To get information about SMS Detail Record objects, the partner must have one of the following scopes enabled:
sms.manage
sms.read
To view information about SMS Detail Record objects for the inherited partners, the partner must additionally have the sms.read_descendant
scope enabled.
Get Message Detail Record by SID
This request returns the detailed data for an SMS/MMS message, targeted by the message detail record secure ID.
get | /sms/message_drs/{dr_sid} |
Sample
A sample GET request to get a message detail record, targeted by secure ID:
curl -X GET \
'https://api.carrierx.com/core/v2/sms/message_drs/92cd9154-2f53-4e62-8b4e-8ff6e4849d16' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200
status code with a serialized copy of the SMS Detail Record object:
"date_changed": "2023-12-07T15:29:09.880Z",
"date_insert": "2023-12-06T15:28:50.404Z",
"date_sent": "2023-12-06T15:28:50.991Z",
"date_start": "2023-12-06T15:28:50.403Z",
"date_stop": "2023-12-07T15:29:09.804Z",
"delay_sent": 0,
"direction": "outbound",
"dr_sid": "92cd9154-2f53-4e62-8b4e-8ff6e4849d16",
"mcc": 310,
"mcc_mnc_price": "0.015",
"mcc_mnc_rate": "0.005",
"media_urls": [
"https://storage.carrierx.com/f/cdac0471-f144-42a2-94f8-d9838ce5e4b9"
],
"message": null,
"message_segments": 1,
"mnc": 999,
"number_billing": "12078152557",
"number_dst": "17575000929",
"number_external": "17575000929",
"number_group_dst": [
"17207217011",
"17207210038",
"17575000929"
],
"number_src": "12078152557",
"partner_sid": "8d180104-0b34-4e55-907f-4a72409484c9",
"passthrough_price": null,
"passthrough_rate": null,
"price": "0.015",
"provider": "tsg",
"rate": "0.005",
"status": "sent",
"type": "mms",
"user_data": "test_message",
"version": null
}
This request is enabled for Field Filtering.
Required Scopes
To get information about an SMS Detail Record object, the partner must have one of the following scopes enabled:
sms.manage
sms.read
To view information about an SMS Detail Record object for the inherited partners, the partner must additionally have the sms.read_descendant
scope enabled.
Path Arguments
Parameter | Data Type | Description |
---|---|---|
dr_sid required | string | The message detail record secure ID. |
Update Message Detail Record
This request updates a message detail record, targeted by secure ID.
patch | /sms/message_drs/{dr_sid} |
put | /sms/message_drs/{dr_sid} |
Sample
A sapmple PATCH request to update the SMS Detail Record object, targeted by secure ID, with the values in the request body:
curl -X PATCH \
'https://api.carrierx.com/core/v2/sms/message_drs/92cd9154-2f53-4e62-8b4e-8ff6e4849d16' \
-H 'Content-Type: application/json' \
--data-binary '{"user_data":"updated_test_message"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200
status code with a serialized copy of the updated SMS Detail Record object:
{
"date_changed": "2023-12-23T12:19:27.005Z",
"date_insert": "2023-12-13T12:19:04.242Z",
"date_sent": "2023-12-13T12:19:04.995Z",
"date_start": "2023-12-13T12:19:04.242Z",
"date_stop": "2023-12-23T12:19:26.993Z",
"delay_sent": 0,
"direction": "outbound",
"dr_sid": "92cd9154-2f53-4e62-8b4e-8ff6e4849d16",
"mcc": 310,
"mcc_mnc_price": "0.015",
"mcc_mnc_rate": "0.005",
"media_urls": [
"https://storage.carrierx.com/f/cdac0471-f144-42a2-94f8-d9838ce5e4b9"
],
"message": null,
"message_segments": 1,
"mnc": 999,
"number_billing": "12078152557",
"number_dst": "17575000929",
"number_external": "17575000929",
"number_group_dst": [
"17207217011",
"17207210038",
"17575000929"
],
"number_src": "12078152557",
"partner_sid": "8d180104-0b34-4e55-907f-4a72409484c9",
"passthrough_price": null,
"passthrough_rate": null,
"price": "0.015",
"provider": "tsg",
"rate": "0.005",
"status": "sent",
"type": "mms",
"user_data": "updated_test_message",
"version": null
}
An SMS Detail Record object can be updated using either a PATCH
or PUT
request.
-
A
PATCH
request can be used to update one or more attribute values. When using aPATCH
request, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The message detail record secure ID is passed in the query URL, and the values to be modified are passed in the request body. -
A
PUT
request can be used to update an entire SMS Detail Record object. The message detail record secure ID is passed in the query URL, and the entire SMS Detail Record object is passed in the request body.
Note, while all the fields must be present in a PUT
request, not all the attribute values may be modified after the initial creation, because when created, some of them become read-only.
Required Scopes
To update an SMS Detail Record object, the partner must have one of the following scopes enabled:
sms.manage
sms.update
Path Arguments
Parameter | Data Type | Description |
---|---|---|
dr_sid required | string | The message detail record secure ID. |
Body Arguments
JSON representation of the fields and values to be updated.
The field that can be modified is user_data
.
Refer to this table to view all fields that appear in the SMS Detail Record object.