Chat
Edit message
Changes the content of a message you sent
POST
Edit message
Auth:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: no
Edits the content of a message you sent. Only text messages are supported.
Example
Send the new content in thecontent field. The original message must have been sent by the instance itself and be within the 15-minute window.
Success response
200 OK
Path parameters
Instance name.
Headers
TokenAccount or TokenInstance.
Request body
ID of the message to edit. It must exist and have been sent by you.
New message content.
Notes
- The recipient sees the new text with the “Edited” tag.
- The edit emits a
message.exchangeevent on the webhook/WebSocket withtype: "message_edit"andisEdit: true. - Editing a media caption (image/video/document) is not reliably supported, use only on plain text messages.
Error responses
| HTTP | error.message | When |
|---|---|---|
| 400 | Invalid request body | Malformed JSON. |
| 400 | messageId is required | Missing field. |
| 400 | content is required | Missing content field. |
| 400 | message contains too old to edit or can only edit | Outside the 15-minute window or non-text message. |
| 401 | Invalid token | , |
| 404 | Instance not found or message not found | , |
| 503 | Instance is not connected to WhatsApp | No active session. |