Redact the body of a previously sent message. This endpoint clears the message body for compliance, privacy, or moderation purposes — it does not support arbitrary updates to message attributes. The only accepted value for `body` is an empty string (`""`); any other value is rejected.
Messages that are still in progress (`queued` or `initiated`) cannot be redacted. Messages in terminal states such as `delivered`, `undelivered`, or `failed` are eligible. Once redacted, the original body is overwritten and cannot be recovered.
The `:message_id` path parameter is the message segment ID — the same ID returned by the create endpoint and shown in `/api/messaging/logs`.
Use this SignalWire REST operation for message redaction by message segment ID. Integrations built around Message SIDs can use the Compatibility API's [Update message](/docs/compatibility-api/rest/messages/update-message) operation instead.
#### Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Messaging_.
[Learn more about API scopes](/docs/platform/your-signalwire-api-space).
Request
This endpoint expects an object.
bodystringRequired
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
Response returned when a message has been successfully redacted.
idstringformat: "uuid"
The unique ID of the message. This is the MessageSegment ID, consistent with the dashboard and the /api/messaging/logs endpoint.
fromstring
The source phone number.
tostring
The destination phone number.
bodystring
The message body text. Returns an empty string when the message has been redacted.
statusenum
Delivery state of the message.
directionenum
The direction of the message.
kindenum
The kind of message.
medialist of strings
Array of URLs for any media attachments on the message. Empty for SMS.
number_of_segmentsinteger
Number of segments the message body was split into for delivery.
error_codestring or null
Provider-specific error code if delivery failed. Null when no error occurred.
error_messagestring or null
Human-readable error message if delivery failed. Null when no error occurred.
created_atdatetime
Date and time when the message was created.
project_idstringformat: "uuid"
The ID of the project the message belongs to.
status_callback_urlstring or nullformat: "uri"
Callback URL configured to receive message status events. Null if no callback was configured.
message_uristring
Relative URL for retrieving the message via the /api/messaging/logs endpoint.