Skip to main content
POST
/
api
/
chat
/
archive
/
:instance
Archive chat
curl --request POST \
  --url https://api.example.com/api/chat/archive/:instance \
  --header 'Content-Type: application/json' \
  --data '
{
  "number": "<string>",
  "archive": 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

Description

Archives (archive: true) or unarchives (archive: false) a chat. The operation is propagated to WhatsApp via app state, it may take seconds to reflect on the other linked devices.

Examples

Archive

Moves the chat to the archived folder (archive: true), removing it from the main list without deleting history. Syncs with the other linked devices via app state.
curl -X POST "https://ryzeapi.cloud/api/chat/archive/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number":  "5511999999999",
    "archive": true
  }'

Unarchive

Takes the chat out of the archived folder (archive: false) and brings it back to the main list. The operation is propagated to all linked devices.
curl -X POST "https://ryzeapi.cloud/api/chat/archive/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number":  "5511999999999",
    "archive": false
  }'

Success response

The response confirms the operation with chat_jid (JID resolved from number) and archived reflecting the final state. The message changes depending on the value of archive: "Chat archived successfully" or "Chat unarchived successfully".
200 OK
{
  "success": true,
  "message": "Chat archived successfully",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "archived": true
}

Path parameters

instance
string
required
Instance name.

Headers

NameRequiredExampleDescription
Content-Typeyesapplication/json
tokenyes (or Authorization)a1b2c3d4-...TokenAccount or TokenInstance.

Request body

number
string
required
Phone number, private JID (...@s.whatsapp.net or ...@lid), group JID (...@g.us), or newsletter.
archive
boolean
required
true archives, false unarchives.

Error responses

HTTPerror.messageWhen it happens
400Instance name is required
400Invalid request body: <...>Malformed JSON.
400Number is required
401Invalid token
404Instance not found
503Instance is not connected to WhatsApp
Error 400
{
  "success": false,
  "error": { "message": "Number is required" }
}

Pin chat

POST /api/chat/pin/:instance

Mute chat

POST /api/chat/mute/:instance