cURL
curl --request POST \ --url https://{server-url}/chat/archiveChat/{instance} \ --header 'Content-Type: application/json' \ --header 'apikey: <api-key>' \ --data '{ "lastMessage": { "key": { "remoteJid": "<string>", "fromMe": true, "id": "<string>" } }, "archive": true, "chat": "<string>" }'
{ "chatId": "553198296801@s.whatsapp.net", "archived": true }
Archive Chat
Your authorization key header
Name of the instance
Messages to be mark as read
Show child attributes
Whether to archive the chat or not
remoteJid here
Created
The ID of the chat.
Indicates whether the chat is archived.