---
title: "Redact a message"
method: PATCH
path: "/api/messaging/messages/{message_id}"
tags: ["Messages"]
---

# Redact a message

`PATCH /api/messaging/messages/{message_id}`

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).

## Path parameters

- `message_id` string, uuid, required — Universal Unique Identifier.

## Request body

- MessageUpdateMessageRequest — Request body for redacting the body of a previously sent message. Only `body` may be updated, and it must be an empty string.
  - `body` string, required — 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 `200`

Response returned when a message has been successfully redacted.

- MessageMessage — A message record. Returned by the create and update endpoints.
  - `id` string, uuid, required — Universal Unique Identifier.
  - `from` string, required — The source phone number.
  - `to` string, required — The destination phone number.
  - `body` string, required — The message body text. Returns an empty string when the message has been redacted.
  - `status` 'queued' | 'initiated' | 'sent' | 'delivered' | 'undelivered' | 'failed' | 'read', required — Delivery state of a message.
  - `direction` 'inbound' | 'outbound', required — The direction of a message.
  - `kind` 'sms' | 'mms' | 'whatsapp', required — The kind of message.
  - `media` string[], required — Array of URLs for any media attachments on the message. Empty for SMS.
  - `number_of_segments` integer, required — Number of segments the message body was split into for delivery.
  - `error_code` string, nullable, required — Provider-specific error code if delivery failed. Null when no error occurred.
  - `error_message` string, nullable, required — Human-readable error message if delivery failed. Null when no error occurred.
  - `created_at` string, date-time, required — Date and time when the message was created.
  - `project_id` string, uuid, required — Universal Unique Identifier.
  - `status_callback_url` string, uri, nullable, required — Callback URL configured to receive message status events. Null if no callback was configured.
  - `message_uri` string, required — Relative URL for retrieving the message via the `/api/messaging/logs` endpoint.

## Other responses

- `400` — The request is invalid.
- `401` — Access is unauthorized.
- `404` — The server cannot find the requested resource.
- `422` — The request contains invalid parameters. See errors for details.
- `500` — An internal server error occurred.

---

[API](https://skmtc.net/signalwire/apis/signalwire-rest-api.md) · [All operations](https://skmtc.net/signalwire/apis/signalwire-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/signalwire/signalwire-rest-api/versions/05c5164b85c7/schema)
