update
messages.update
Redact the body of a previously sent message. The API accepts only an empty
string for body; any other value is rejected. Messages still in progress
(queued or initiated) can’t be redacted, and a redacted body can’t be
recovered.
Path parameters
message_id
The message segment ID — the same ID returned by the create endpoint and shown in `/api/messaging/logs`.
Request
body
Must be an empty string (`""`) to redact the message. Any non-empty value is rejected with `body_must_be_empty`. This is the only field that can be updated.
Response
id
The unique ID of the message. This is the `MessageSegment` ID, consistent with the dashboard and the `/api/messaging/logs` endpoint.
from
The source phone number.
to
The destination phone number.
body
The message body text. Returns an empty string when the message has been redacted.
status
Delivery state of the message.
direction
The direction of the message.
kind
The kind of message.
media
Array of URLs for any media attachments on the message. Empty for SMS.
number_of_segments
Number of segments the message body was split into for delivery.
error_code
Provider-specific error code if delivery failed. Null when no error occurred.
error_message
Human-readable error message if delivery failed. Null when no error occurred.
created_at
Date and time when the message was created.
project_id
The ID of the project the message belongs to.
status_callback_url
Callback URL configured to receive message status events. Null if no callback was configured.
message_uri
Relative URL for retrieving the message via the `/api/messaging/logs` endpoint.
Parameters
message_id
ID of the message to redact.
body
New body. Pass "" to redact. Keyword-only.
extras
Additional request body fields merged into the payload as sent.
request_options
Per-call timeout and retry overrides. See
RequestOptions.
Returns
Message — the updated message with its body cleared.
Response Example
Response