---
title: "List All Chats"
method: GET
path: "/chats"
tags: ["chats"]
---

# List All Chats

`GET /chats`

This endpoint retrieves a paginated list of chats

## Query parameters

- `offset` number — - The offset value for paginating the results - Default 0
- `limit` number — - The maximum number of chats to retrieve - Default 2000
- `sort_by` 'created_at' | 'latest_message_timestamp' — - Value to sort the incoming chats - Possible values: `created_at`, `latest_message_timestamp` - Default `created_at`
- `sort_order` 'asc' | 'desc' — - Order to sort the results - Possible values: `asc`, `desc` - Default `desc`
- `chat_id` string — - Filter to a specific chat by its chat_id (the chat's unique WhatsApp identifier, e.g. a group id ending in @g.us or a contact id ending in @c.us). Returns that single chat, the same way the Get Chat By ID endpoint does.
- `chat_type` string — - Filter chat by type of user, group or business
- `label` string — - Filter all chats that contain a specific label provide - You can provide the name of the label or label_id
- `start_time` string — - The start_time to filter the results
- `end_time` string — - The end_time to filter the results

## Headers

- `x-phone` string

## Response `200`

200 OK

- object — Note: members associated with a chat are not returned. You can fetch a specific chat by calling the Get Chat By ID endpoint
  - `from` number — The starting index of the returned chats.
  - `to` number — The ending index of the returned chats.
  - `count` number — The total count of chats.
  - `chats` unknown[] — An array of chat objects. Refer to [the chat object here](/api-reference/objects/the-chat-object)
    - unknown

## Other responses

- `422` — 422 Invalid Limit

---

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