---
title: "Get all chat messages in a thread"
method: GET
path: "/api/v5/ai-chat/messages/"
tags: ["Ai Chat Messages"]
---

# Get all chat messages in a thread

`GET /api/v5/ai-chat/messages/`

Get all messages within a specific thread.

## Query parameters

- `thread_id` integer, required — The ID of the chat thread

## Response `200`

Successful Response

- ListOfAiChatMessagesInResponse
  - `messages` AiChatMessage[], required — List of chat messages
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `deletedAt` string, date-time
    - `id` integer
    - `threadId` integer, required — ID of the associated chat thread
    - `role` 'system' | 'user' | 'assistant' | 'tool', required — An enumeration.
    - `content` string — Full message content
    - `displayContent` string — Message content to be displayed
    - `hidden` boolean — Flag to hide/show the message
    - `functionName` string — Tool function name
    - `toolCalls` object[] — Tools call
    - `toolCallId` string — Tools call id

## Other responses

- `422` — Validation Error

---

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