Skip to main content

Overview

Replaces the text of a text message your channel already sent. The recipient sees the new text in place of the old one, with the app’s edited mark. No new message is sent.
  • channelId: the channel that sent the message.
  • messageId: the messageId returned by the send. The contents[].identifier received in the webhook is also accepted.
Only WhatsApp Web and Telegram allow editing. On WhatsApp Meta, Instagram and Messenger, the API refuses the request with 422 and subCode EDIT_NOT_SUPPORTED, and nothing is sent to the contact. See Limitations by channel.

Request body

Recipient and sender are not required: the original message’s apply. Only text can be edited: the caption of an image, video or document cannot be edited and gets 422 MESSAGE_NOT_EDITABLE.

Response

200 with the edited message’s messageId:
The 200 confirms the edit was accepted and forwarded to the channel, not that the contact’s app already shows the new text. If the channel refuses it later (for example, the contact blocked the bot on Telegram or the message was deleted), the contact’s text does not change and the API sends no notice of that refusal.

Errors

Handle refusals by subCode. The message text may change. The error body format is in Send errors.

Editing through the send endpoint

A send (POST /v1/channels/{channelId}/messages) with content.body.editMessageId is also handled as an edit of the given message, with the same rules and refusals as this page. It never sends a new message. Prefer the PUT, which makes the intent explicit.

Limitations by channel

On Telegram, a text over 4,096 characters also gets 200, but Telegram refuses the edit and the contact’s text does not change. Keep edits within that limit.