PUT

https://{server-url}

/
chat
/
archiveChat
/
{instance}
curl --request PUT \
  --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
}'
{
  "chatId": "553198296801@s.whatsapp.net",
  "archived": true
}

Authorizations

apikey
string
headerrequired

Your authorization key header

Path Parameters

instance
string
required

ID of the instance to connect

Body

application/json
lastMessage
object
required

Messages to be mark as read

archive
boolean
required

Whether to archive the chat or not

Response

201 - application/json
chatId
string

The ID of the chat.

archived
boolean

Indicates whether the chat is archived.