Edit the text of a message already sent
edit_text_messageReplace the text of a text message this number already sent.
The recipient sees the new text marked as edited. The message keeps its id and its place in the conversation; only the text changes.
Only a text message can be edited here. For the caption of an image,
video or document use edit_media_caption, and for a calendar event
edit_calendar_event or cancel_calendar_event. A location, contact
card, link button, sticker or audio message cannot be edited at all:
delete_message is the only change for them. Using this tool on any
message that is not text answers invalid_request: message_not_editable.
Only a message sent THROUGH Turbo Notify can be edited. One typed on the phone itself belongs to the same number but cannot be edited here, and neither can a message received from someone else.
WhatsApp only accepts a change to a text within 15 minutes of sending
it. A later edit is refused up front with
invalid_request: edit_window_expired; send a new message instead.
The edit is accepted at once and the outcome arrives as an event:
message.edited when it worked, message.edit.failed when WhatsApp or
the platform could not apply it. Read them with list_events.
The number first appears online and its unread messages in that conversation are marked as read, then the edit happens. Opening the conversation this way is automatic and uses no quota of its own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The new text. It replaces the whole text of the message. | |
| message_id | Yes | Message id (`msg_…`), as returned by a send or by `list_messages`. | |
| number_alias | No | Which of the organization's WhatsApp numbers this acts on: `main`, the alias of an extra number, or the number's `id` (`num_…`), which stays the same when the alias is renamed. Call `list_numbers` to see them. Defaults to the main number. | main |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||