Skip to main content

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:

{
"a2p_campaign": null,
"date_changed": "2025-04-14T10:32:18.175Z",
"date_insert": "2025-04-14T10:32:17.279Z",
"date_sent": "2025-04-14T10:32:17.997Z",
"date_start": "2025-04-14T10:32:17.279Z",
"date_stop": "2025-04-14T10:32:00.000Z",
"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",
"p2p_nnid": null,
"partner_sid": "8d180104-0b34-4e55-907f-4a72409484c9",
"passthrough_price": null,
"passthrough_rate": null,
"price": "0.015",
"provider": "tsg",
"rate": "0.005",
"registration_type": null,
"status": "sent",
"type": "mms",
"user_data": "updated_test_message",
"vendor_error_code": "503",
"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 a PATCH 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

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

ParameterData TypeDescription
dr_sid requiredstringThe 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.