Skip to main content
POST
/
chat
/
archiveChat
/
:instanceName
curl --request POST \
  --url https://api.example.com/chat/archiveChat/my-instance \
  --header 'apikey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "archive": true,
    "chat": "[email protected]"
  }'
{
  "archived": true,
  "chat": "[email protected]"
}

Overview

You can archive or unarchive chats in your WhatsApp instance. Archiving a chat removes it from your main chat list but preserves all messages and history.
Archiving a chat doesn’t delete any messages. You can unarchive it at any time to restore it to your main chat list.

Authentication

This endpoint requires authentication via the apikey header.
header.apikey
string
required
Your Evolution API key for authentication.

Path Parameters

path.instanceName
string
required
The name of your WhatsApp instance.

Request Body

archive
boolean
required
Set to true to archive the chat, or false to unarchive it.
chat
string
The remote JID of the chat to archive. Required if lastMessage is not provided.
lastMessage
object
Information about the last message in the chat. Can be used instead of chat parameter.

Response

archived
boolean
Confirmation of the archive status.
chat
string
The remote JID of the archived/unarchived chat.
curl --request POST \
  --url https://api.example.com/chat/archiveChat/my-instance \
  --header 'apikey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "archive": true,
    "chat": "[email protected]"
  }'
{
  "archived": true,
  "chat": "[email protected]"
}

Usage Notes

To unarchive a chat, send the same request with archive: false.
When archiving a chat, new messages will still be received, and the chat may be automatically unarchived if a new message arrives (depending on WhatsApp settings).

Build docs developers (and LLMs) love