---
title: "Get Messages in a Chat"
method: GET
path: "/chats/{chat_id}/messages"
tags: ["chats"]
---

# Get Messages in a Chat

`GET /chats/{chat_id}/messages`

This endpoint retrieves a paginated list of all messages for the specific chat_id (in descending order of timestamp)

## Query parameters

- `offset` number — - The offset value for paginating the results - Default 0
- `limit` number — - The maximum number of messages to retrieve - Default 2000

## Headers

- `x-phone` string

## Response `200`

200 OK

- object
  - `from` number — The starting index of the returned messages.
  - `to` number — The ending index of the returned messages.
  - `count` number — The total count of messages.
  - `messages` unknown[] — An array of message objects. Refer to [the message object here](/api-reference/objects/the-message-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)
