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

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: partially Deletes a specific message in two modes:
  • For everyone (deleteForEveryone: true), revokes on WhatsApp; “This message was deleted” appears for everyone. delete_type: "revoke".
  • Only for me (deleteForEveryone: false, default), deletes only locally on your devices. Recipients keep seeing it. delete_type: "delete_for_me".
The revoke window (“for everyone”) has a WhatsApp limit, generally up to 15 minutes after sending. Older messages fail.

Examples

For everyone (revoke)

Revokes the message on WhatsApp with deleteForEveryone: true. Replaces the content with “This message was deleted” for every participant in the conversation, subject to the up-to-15-minute window after sending.
curl -X DELETE "https://ryzeapi.cloud/api/chat/delete/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "messageId": "3EB08FCF27E532F1B0F5",
    "deleteForEveryone": true
  }'

Only for me

With deleteForEveryone: false, the message disappears only from your linked devices (synced via AppState). The recipient keeps seeing the original content normally.
curl -X DELETE "https://ryzeapi.cloud/api/chat/delete/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "messageId": "3EB08FCF27E532F1B0F5",
    "deleteForEveryone": false
  }'

Success response

200 OK
{
  "success": true,
  "message": "Message deleted for everyone successfully",
  "message_id": "3EB08FCF27E532F1B0F5",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "delete_type": "revoke",
  "deleted_for_everyone": true
}

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.

Request body

messageId
string
required
ID of the message to delete.
deleteForEveryone
boolean
default:"false"
true revokes for everyone (delete_type: "revoke"); false deletes only locally (delete_type: "delete_for_me").

Notes

  • Revoke triggers a message.exchange event with type: "message_revoke" on the webhook/WebSocket.
  • Delete for me syncs via AppState with your other linked devices, but does not notify the recipient.
  • If the operation is repeated on an already revoked message, WhatsApp returns an error.

Error responses

HTTPerror.messageWhen
400Invalid request bodyMalformed JSON.
400MessageID is requiredMissing field.
401Invalid tokenMissing/invalid token.
404Instance not foundInstance does not exist.
404message not foundmessageId is not in the database.
503Instance is not connected to WhatsAppNo active session.