---
title: "List Copilot chat messages"
method: GET
path: "/ai-chats/{chatId}/messages"
tags: ["AIChats", "Beta"]
---

# List Copilot chat messages

`GET /ai-chats/{chatId}/messages`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/ai-chats/{chatId}/messages`
- Auth: API key in header `X-ESCAPE-API-KEY`

List the messages of a Copilot chat owned by the authenticated user, oldest first, with cursor pagination.

## Path parameters

- `chatId` string, uuid, required: The chat ID

## Query parameters

- `cursor` string: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page is returned.
- `size` integer: The number of items to return per page

## Response `200`

OK

- object
  - `nextCursor` string, nullable, required
  - `totalCount` integer
  - `data` object[], required
    - `id` string, uuid, required: The id of the message
    - `role` 'ASSISTANT' | 'SYSTEM' | 'TOOL' | 'USER', required: The role of the message author
    - `content` string, required: The message content
    - `createdAt` string, date-time, required: The date and time the message was created

## Other responses

- `400`: Pagination error
- `404`: Not found

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
