edit_message
Edits the text of one of the user's own WhatsApp text messages for everyone in the chat (like "Edit" on the phone), in a 1:1 chat or a group. Paid plan only: on the free plan the call is refused with a note on how to subscribe. Pass the message's id from read_chat_history or search_messages and the full new text; the chat is looked up automatically. Only text messages the user sent (from "Me") can be edited, not captions of photos, videos or documents. If you are writing the text yourself rather than sending words the user gave you, call get_writing_style for this chat first and write it the way the user writes; skip that for dictated text. Everyone in the chat sees the new text marked as edited, so confirm the wording with the user first unless they gave it. Returns { message_id, status (edited or failed), chat, text, warning?, error? }: chat is the conversation, with the contact fields (name; name_source: address_book, push_name, group_subject, business, phone or unresolved; canonical_jid: the JID to pass to send_message and read_chat_history; phone_jid and lid_jid: the chat's phone-number and LID forms, null when unknown or for groups; phone_display: the number as +). warning is set when the message is more than about 15 minutes old: WhatsApp may not apply the edit; tell the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The complete new text of the message (it replaces the old text entirely). | |
| message_id | Yes | The `id` of the user's own text message, from read_chat_history or search_messages. |