> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crunchz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive Chat

> Archive a chat conversation to organize your chat list while preserving the message history for future access.



## OpenAPI

````yaml POST /chat/archive
openapi: 3.1.0
info:
  title: CrunchzApp API Docs
  version: 1.0.0
  description: >-
    Comprehensive WhatsApp API for seamless messaging integration, automation,
    and customer communication in your applications.
servers:
  - url: https://api.crunchz.app/api
security:
  - http: []
paths:
  /chat/archive:
    post:
      tags:
        - Chat
      description: >-
        Archive a chat conversation to organize your chat list while preserving
        the message history for future access.
      operationId: chat.archiveChat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveChatRequest'
      responses:
        '200':
          description: '`ChatCollection`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCollection'
        '400':
          $ref: '#/components/responses/BadRequestException'
        '401':
          $ref: '#/components/responses/UnauthorizedException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '500':
          $ref: '#/components/responses/InternalServerErrorException'
components:
  schemas:
    ArchiveChatRequest:
      type: object
      properties:
        contact_id:
          type: string
          description: The contact id.
          example: xxx@c.us
      required:
        - contact_id
      title: ArchiveChatRequest
    ChatCollection:
      type: object
      properties:
        success:
          type: boolean
          description: The success status of response.
        message:
          type: string
          description: The message of response.
        data:
          type: array
          items:
            $ref: '#/components/schemas/ChatResource'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - success
        - message
        - data
        - meta
      title: ChatCollection
    ChatResource:
      type: object
      properties:
        message_id:
          type: string
        from_me:
          type: string
        is_media:
          type: boolean
        body:
          type: string
        status:
          type:
            - string
            - 'null'
        reactions:
          type: array
          items:
            type: string
          minItems: 0
          maxItems: 0
          additionalItems: false
        timestamp:
          type: string
      required:
        - message_id
        - from_me
        - is_media
        - body
        - status
        - reactions
        - timestamp
      title: ChatResource
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
          description: Current page number
          example: 1
        per_page:
          type: integer
          description: Number of items per page
          example: 50
        total:
          type: integer
          description: Total number of items
          example: 150
        total_pages:
          type: integer
          description: Total number of pages
          example: 3
        has_next_page:
          type: boolean
          description: Whether there is a next page
          example: true
        has_prev_page:
          type: boolean
          description: Whether there is a previous page
          example: false
      required:
        - current_page
        - per_page
        - total
        - total_pages
        - has_next_page
        - has_prev_page
      title: PaginationMeta
  responses:
    BadRequestException:
      description: Bad request error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    UnauthorizedException:
      description: Unauthorized error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
    InternalServerErrorException:
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````