---
title: "List messages in a thread"
method: GET
path: "/v1/assistant/threads/{threadId}/messages"
tags: ["assistant"]
---

# List messages in a thread

`GET /v1/assistant/threads/{threadId}/messages`

## Request

- Base URL: `https://sandbox.api.infinite.dev`
- URL: `https://sandbox.api.infinite.dev/v1/assistant/threads/{threadId}/messages`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/infinite/apis/infinite-api/docs/v1/assistant/threads/:threadId/messages/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `threadId` string, required

## Query parameters

- `limit` number
- `offset` number
- `latest` boolean

## Response `200`

- AssistantMessageListResponseDto
  - `data` AssistantMessageResponseDto[], required
    - `id` string, required
    - `threadId` string, required
    - `runId` string, nullable
    - `role` 'user' | 'assistant' | 'tool', required
    - `parts` AssistantMessagePartDto[], required
      - `type` string, required
      - `text` string
      - `toolCallId` string
      - `tool` string
      - `argsSummary` string
      - `status` string
      - `preview` string
      - `pendingAttachmentId` string
      - `fileName` string
      - `contentType` string
      - `sizeBytes` number
    - `tokensIn` number, nullable
    - `tokensOut` number, nullable
    - `createdAt` string, date-time, required
  - `total` number, required
  - `limit` number, required
  - `offset` number, required
  - `anchorUserMessage` AssistantMessageResponseDto
    - `id` string, required
    - `threadId` string, required
    - `runId` string, nullable
    - `role` 'user' | 'assistant' | 'tool', required
    - `parts` AssistantMessagePartDto[], required
      - `type` string, required
      - `text` string
      - `toolCallId` string
      - `tool` string
      - `argsSummary` string
      - `status` string
      - `preview` string
      - `pendingAttachmentId` string
      - `fileName` string
      - `contentType` string
      - `sizeBytes` number
    - `tokensIn` number, nullable
    - `tokensOut` number, nullable
    - `createdAt` string, date-time, required

## Other responses

- `401`: Unauthorized - Invalid or missing JWT token

## Changes

- **2026-10-27** `7b1871b77854`: 8 info
  - added the optional property `anchorUserMessage/allOf[#/components/schemas/AssistantMessageResponseDto]/parts/items/contentType` to the response with the `200` status
  - added the optional property `anchorUserMessage/allOf[#/components/schemas/AssistantMessageResponseDto]/parts/items/fileName` to the response with the `200` status
  - added the optional property `anchorUserMessage/allOf[#/components/schemas/AssistantMessageResponseDto]/parts/items/pendingAttachmentId` to the response with the `200` status
  - added the optional property `anchorUserMessage/allOf[#/components/schemas/AssistantMessageResponseDto]/parts/items/sizeBytes` to the response with the `200` status
  - …4 more
- **2026-10-23** `6cdc7971ec12`: 5 info
  - added the optional property `anchorUserMessage` to the response with the `200` status
  - the response property `data` became required for the status `200`
  - the response property `limit` became required for the status `200`
  - the response property `offset` became required for the status `200`
  - …1 more
- **2026-10-16** `f48e031634f4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/infinite/apis/infinite-api/changes/v1/assistant/threads/:threadId/messages/get.md)

---

[API](https://skmtc.dev/infinite/apis/infinite-api.md) - [All operations](https://skmtc.dev/infinite/apis/infinite-api/llms.txt) - [OpenAPI document](https://skmtc.dev/infinite/apis/infinite-api/revisions/90065d3e6974?raw)
