Chat
Archive chat
Archives or unarchives a WhatsApp chat
POST
Archive chat
Auth:
TokenAccount or TokenInstance • Rate-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.
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.
Success response
The response confirms the operation withchat_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
Path parameters
Instance name.
Headers
| Name | Required | Example | Description |
|---|---|---|---|
Content-Type | yes | application/json | , |
token | yes (or Authorization) | a1b2c3d4-... | TokenAccount or TokenInstance. |
Request body
Phone number, private JID (
...@s.whatsapp.net or ...@lid), group JID (...@g.us), or newsletter.true archives, false unarchives.Error responses
| HTTP | error.message | When it happens |
|---|---|---|
| 400 | Instance name is required | , |
| 400 | Invalid request body: <...> | Malformed JSON. |
| 400 | Number is required | , |
| 401 | Invalid token | , |
| 404 | Instance not found | , |
| 503 | Instance is not connected to WhatsApp | , |
Error 400
Related
Pin chat
POST /api/chat/pinChat/:instanceMute chat
POST /api/chat/mute/:instance