---
title: "Archive Chat"
method: POST
path: "/chat/archiveChat/{instance}"
tags: ["Chat Controller"]
---

# Archive Chat

`POST /chat/archiveChat/{instance}`

## Request

- Base URL: `https://evolution-example`
- URL: `https://evolution-example/chat/archiveChat/{instance}`
- Auth: API key in header `apikey`

Archive Chat

## Path parameters

- `instance` string, required

## Request body

- object
  - `lastMessage` object, required: Messages to be mark as read
    - `key` object, required
      - `remoteJid` string, required: Chat contact or group remote JID
      - `fromMe` boolean, required: If the message was sent by the instance owner or the contact
      - `id` string, required: Message ID
  - `archive` boolean, required: Whether to archive the chat or not
  - `chat` string, required: remoteJid here

## Response `201`

Created

- object
  - `chatId` string: The ID of the chat.
  - `archived` boolean: Indicates whether the chat is archived.

## Changes

- **2024-11-25** (v2) `669c21c8934b`: 1 info
  - endpoint added
- **2024-11-25** (v2) `c153448703e5`: 1 breaking
  - api removed without deprecation
- **2024-09-09** (v2) `0c4620ca5ed5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/changes/chat/archiveChat/:instance/post.md)

---

[API](https://skmtc.dev/evolution-foundation/apis/evolution-api-3.md) - [All operations](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/llms.txt) - [OpenAPI document](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/revisions/153363ee7f38?raw)
