Skip to main content
DELETE
/
api
/
chat
/
deleteChat
/
:instance
Delete entire chat
curl --request DELETE \
  --url https://api.example.com/api/chat/deleteChat/:instance \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "number": "<string>",
  "deleteMedia": 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: yes Removes a chat (conversation) from your WhatsApp list. Optionally also deletes the locally stored media files.
Local operation only. Other participants (in groups) or the recipient (in DMs) keep seeing the history on their side. To leave a group, use DELETE /api/group/leave.

Examples

Keep media local

Removes the chat from the WhatsApp list but preserves the media files stored locally (S3/disk). Useful when you still want to keep attachments for auditing or reprocessing.
curl -X DELETE "https://ryzeapi.cloud/api/chat/deleteChat/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{"number": "5511999999999"}'

Delete media too

With deleteMedia: true, in addition to removing the chat the server also deletes the media files stored locally for that conversation. Irreversible on the RyzeAPI side.
curl -X DELETE "https://ryzeapi.cloud/api/chat/deleteChat/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "deleteMedia": true
  }'

Success response

200 OK
{
  "success": true,
  "message": "Chat deleted successfully (including media)",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "delete_media": true
}
The message changes depending on deleteMedia:
  • false"Chat deleted successfully"
  • true"Chat deleted successfully (including media)"

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.

Request body

number
string
required
Number (5511999999999) or JID (5511999999999@s.whatsapp.net, ...@lid, 120363...@g.us) of the chat.
deleteMedia
boolean
default:"false"
If true, also removes the media files stored locally for this chat.

Notes

  • The chat disappears from your list on every linked device (synced via AppState).
  • In groups, deleting the chat does not leave the group, the group link remains.
  • The phone’s WhatsApp has independent storage; deleteMedia here only affects the media saved by RyzeAPI on S3/disk.

Error responses

HTTPerror.messageWhen
400Invalid request bodyMalformed JSON.
400Number is requiredMissing field.
401Invalid token
404Instance not found
503Instance is not connected to WhatsAppNo active session.