Skip to main content
POST
/
api
/
chat
/
edit
/
:instance
Edit message
curl --request POST \
  --url https://api.example.com/api/chat/edit/:instance \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "messageId": "<string>",
  "content": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: no Edits the content of a message you sent. Only text messages are supported.
Edit window: ~15 minutes after sending (limit imposed by WhatsApp). Older messages fail with too old to edit.

Example

Send the new content in the content field. The original message must have been sent by the instance itself and be within the 15-minute window.
curl -X POST "https://ryzeapi.cloud/api/chat/edit/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "messageId": "3EB08FCF27E532F1B0F5",
    "content": "Sorry, I meant 6 PM"
  }'

Success response

200 OK
{
  "success": true,
  "message": "Message edited successfully",
  "messageId": "3EB08FCF27E532F1B0F5",
  "chatJid": "5511999999999@s.whatsapp.net",
  "oldContent": "Sorry, I meant 5 PM",
  "newContent": "Sorry, I meant 6 PM"
}

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.

Request body

messageId
string
required
ID of the message to edit. It must exist and have been sent by you.
content
string
required
New message content.

Notes

  • The recipient sees the new text with the “Edited” tag.
  • The edit emits a message.exchange event on the webhook/WebSocket with type: "message_edit" and isEdit: true.
  • Editing a media caption (image/video/document) is not reliably supported, use only on plain text messages.

Error responses

HTTPerror.messageWhen
400Invalid request bodyMalformed JSON.
400messageId is requiredMissing field.
400content is requiredMissing content field.
400message contains too old to edit or can only editOutside the 15-minute window or non-text message.
401Invalid token
404Instance not found or message not found
503Instance is not connected to WhatsAppNo active session.