Redact a message

View as MarkdownOpen in Claude
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`. #### 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).

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Path parameters

message_idstringRequiredformat: "uuid"

The message segment ID — the same ID returned by the create endpoint and shown in /api/messaging/logs.

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.
Allowed values:
kindenum
The kind of message.
Allowed values:
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.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error