OpenWA icon

OpenWA

Interact with OpenWA WhatsApp API Gateway

Actions164

Message → Edit

AI-generated

Summary

Edits an existing WhatsApp message in the selected chat, replacing its text or media caption and reapplying the specified mentions. Messages not sent by this session or messages that carry no text or caption (such as locations, stickers, polls, contact cards, or audio) are refused with a 403 response. Mentions on the original message are dropped unless included again.

Inputs

  • Session Name or ID (required) — The ID of the session to send from. Choose from the list, or specify an ID using an expression.
  • Chat Name or ID (required) — The recipient chat ID (e.g., 628123456789@c.us for personal, or ...@g.us for groups). Only the first 1000 are listed; use an expression for anything beyond that. Choose from the list, or specify an ID using an expression.
  • Message (required) — The text message to send. For Edit, this replaces the existing message body or media caption (messages not sent by this session or carrying no text or caption, such as locations, stickers, polls, contact cards, or audio, are refused with 403).
  • Mentions — WhatsApp IDs to @mention. Accepts a comma-separated list, a JSON array, or an expression resolving to an array. The message text or caption must also contain a matching @-mention token (e.g. @628123456789) for it to render. On Edit the tags are re-applied rather than preserved, because an edit replaces the message content: list every ID the edited message should still tag, or leave empty to drop the tags the original carried.
  • Message ID (required) — The full serialized ID of the target message, as returned by send operations or delivered by the Trigger. For Click Button, the ID of the prompt that offered the buttons. For Get Receipts, the message must have been sent by this session (received messages are refused with 403).

Output shape

a single record

Returns the gateway response for the edit.

Links

Discussion