> ## Documentation Index
> Fetch the complete documentation index at: https://doc.evolution-api.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive Chat

> Archive Chat



## OpenAPI

````yaml openapi-v2 POST /chat/archiveChat/{instance}
openapi: 3.0.3
info:
  title: Evolution API
  version: 2.1.1
servers:
  - url: https://{server-url}
    variables:
      server-url:
        default: evolution-example
        description: The URL of your EvolutionAPI server
    description: Your instance domain
security: []
paths:
  /chat/archiveChat/{instance}:
    post:
      tags:
        - Chat Controller
      summary: Archive Chat
      description: Archive Chat
      operationId: archiveChat
      parameters:
        - name: instance
          in: path
          required: true
          description: Name of the instance
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - lastMessage
                - archive
                - chat
              properties:
                lastMessage:
                  type: object
                  description: Messages to be mark as read
                  required:
                    - key
                  properties:
                    key:
                      type: object
                      required:
                        - remoteJid
                        - fromMe
                        - id
                      properties:
                        remoteJid:
                          type: string
                          description: Chat contact or group remote JID
                        fromMe:
                          type: boolean
                          description: >-
                            If the message was sent by the instance owner or the
                            contact
                        id:
                          type: string
                          description: Message ID
                archive:
                  type: boolean
                  description: Whether to archive the chat or not
                chat:
                  type: string
                  description: remoteJid here
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  chatId:
                    type: string
                    description: The ID of the chat.
                  archived:
                    type: boolean
                    description: Indicates whether the chat is archived.
                example:
                  chatId: 553198296801@s.whatsapp.net
                  archived: true
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````