---
title: "get all chats"
method: POST
path: "/instances/{id}/client/action/get-chats"
tags: ["chat"]
---

# get all chats

`POST /instances/{id}/client/action/get-chats`

Retrieves a list of all chats with their latest messages and metadata. Supports pagination.

## Path parameters

- `id` integer, required

## Request body

- object
  - `offset` integer — The number of items to skip before starting to collect the result set
  - `limit` integer — The number of items to return

## Response `200`

Returns a list of chats with their metadata and latest messages

- object
  - `instanceId` string
  - `data` object[]
    - `id` object
      - `server` string
      - `user` string
      - `_serialized` string
    - `name` string
    - `isGroup` boolean
    - `isReadOnly` boolean
    - `unreadCount` integer
    - `timestamp` integer
    - `archived` boolean
    - `pinned` boolean
    - `isMuted` boolean
    - `muteExpiration` integer
    - `lastMessage` object
      - `id` object
        - `fromMe` boolean
        - `remote` string
        - `id` string
        - `_serialized` string
      - `body` string
      - `type` string
      - `timestamp` integer
      - `from` string
      - `to` string
  - `status` 'success' | 'error'

## Other responses

- `401` — Unauthorized — invalid or missing bearer token
- `403` — Forbidden — insufficient permissions or account blocked
- `404` — Not found — instance does not exist or does not belong to you
- `409` — Conflict — instance is not ready
- `422` — Validation error — invalid or missing request parameters
- `429` — Too many requests — rate limit exceeded

---

[API](https://skmtc.net/waapi/apis/waapi-api.md) · [All operations](https://skmtc.net/waapi/apis/waapi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/waapi/waapi-api/versions/1e2cc7c12090/schema)
