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
}
'
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: about 2 days and 12 hours after sending. The API always accepts the request (it sends the REVOKE) and returns success, but the recipient’s client ignores revocations of messages older than that window — so API success does not guarantee removal on the recipient’s screen.

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 roughly 2-day-and-12-hour 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.