---
title: "Read an agent thread"
method: GET
path: "/v2/agent/threads/{id}/messages"
tags: ["agent"]
---

# Read an agent thread

`GET /v2/agent/threads/{id}/messages`

## Request

- Base URL: `https://api.cardog.app`
- URL: `https://api.cardog.app/v2/agent/threads/{id}/messages`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

One thread and its messages, oldest first, in the AI SDK `UIMessage` format. The grant header works as in `GET /v2/agent/threads`: without it you read your personal history, with it the history the grant names. A thread ID not in that history is a 404. Costs 0 credits.

## Path parameters

- `id` string, required

## Headers

- `X-Cardog-Agent-Grant` string

## Response `200`

The thread and its messages

- AgentThreadMessages
  - `thread` object, required: The thread
    - `id` string, required: The thread ID
    - `name` string, nullable, required: The name the agent gave the chat, e.g. "Recalls on a 2021 RAV4". Null until it has one.
    - `lastMessage` string, nullable, required: A preview of the newest message. Null when there is none.
    - `createdAt` string, date-time, required: When the thread was opened, ISO 8601
    - `updatedAt` string, date-time, required: When the thread last changed, ISO 8601
    - `lastMessageAt` string, date-time, nullable, required: When the newest message was added, ISO 8601. Null when there is none.
    - `links` object, required: `messages`: this thread's messages.
  - `data` object[], required: The messages, oldest first
    - `id` string, required: The message ID
    - `role` 'system' | 'user' | 'assistant', required: Who wrote it: `system`, `user` or `assistant`
    - `parts` object[], required: The message parts, in order. Each has a `type`, such as "text", "reasoning" or "tool-{name}".
    - `metadata` object: Extra data stored with the message, such as `createdAt`
  - `links` object, required: `self`: this endpoint. `threads`: the list of threads.

## Other responses

- `400`: The request is invalid. The error response names each bad value in `refs` or `details` and, where it can, suggests the nearest valid ref in `suggestions`. We never fall back to a fuzzy match.
- `401`: No valid API key or session
- `403`: Your credential cannot use this endpoint (`forbidden`)
- `404`: Resource not found
- `429`: Per-minute rate limit exceeded
- `500`: Internal error
- `503`: Temporarily unavailable (`unavailable`); retry with backoff

## Changes

- **2026-11-04** `0b43ff0bb604`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cardog/apis/cardog-api-v2/changes/v2/agent/threads/:id/messages/get.md)

---

[API](https://skmtc.dev/cardog/apis/cardog-api-v2.md) - [All operations](https://skmtc.dev/cardog/apis/cardog-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/cardog/apis/cardog-api-v2/revisions/016058226dc5?raw)
