---
title: "List messages in a chat session"
method: GET
path: "/chat/sessions/{session_id}/messages"
tags: ["Chat"]
---

# List messages in a chat session

`GET /chat/sessions/{session_id}/messages`

## Request

- Base URL: `https://api-docs.jackhamr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.jackhamr.ai/chat/sessions/{session_id}/messages`
- Auth: none declared

Return the message history for a chat session, newest first.

The session must belong to the caller's org (404 otherwise). The
public API returns a flat, cursor-paginated window of messages
ordered by ``(created_at, id)``, the same ordering the
``build_cursor_from_rows`` helper expects. Backend-internal
``auto_resume_preamble`` rows are hidden (they're plumbing, not
user/agent content) so the public history matches the chat UI.

## Path parameters

- `session_id` string, required

## Query parameters

- `limit` integer
- `cursor` string, nullable

## Response `200`

Successful Response

- PaginatedResponseChatMessageOut
  - `data` ChatMessageOut[]
    - `id` string, required
    - `session_id` string, required
    - `role` string, required
    - `content` string, nullable
    - `tool_name` string, nullable
    - `tool_input` string, nullable
    - `tool_result` string, nullable
    - `tokens` integer
    - `seq` integer
    - `kind` string
    - `metadata` string, nullable
    - `sender_user_id` string, nullable
    - `sender_name` string, nullable
    - `created_at` string, date-time, required
  - `next_cursor` string, nullable

## Other responses

- `422`: Validation Error

---

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