---
title: "Read a session's transcript"
method: GET
path: "/o/{org}/sessions/{session}/messages"
tags: ["Messages"]
---

# Read a session's transcript

`GET /o/{org}/sessions/{session}/messages`

## Request

- Base URL: `https://api.prix.dev`
- URL: `https://api.prix.dev/o/{org}/sessions/{session}/messages`
- Auth: HTTP bearer

The captured transcript as the events the live stream carries (`message`,
`tool_use`, `tool_result`, `thinking`, `error`, `result`), filtered and sliced
on the server. A turn starts at each user message; `first`/`last` keep that
many turns, then `include`/`exclude` filter by role. Available once the run
has captured its transcript; before that the answer is `404 SESSION_NOT_CAPTURED`.

## Query parameters

- `include` string
- `exclude` string
- `first` integer
- `last` integer

## Response `200`

The transcript slice.

- object
  - `execution_id` string, required
  - `events` SessionEvent[]: Absent when the slice holds none.
    - `type` 'message' | 'tool_use' | 'tool_result' | 'thinking' | 'error' | 'result', required
    - `role` 'user' | 'assistant'
    - `content` string
    - `tool` string
    - `call_id` string: Links a tool_use to its tool_result.
    - `args` object: A tool_use's input as the agent wrote it, e.g. `command` or `file_path`.
    - `success` boolean
    - `output` string

## Other responses

- `400`: A bad filter (`INVALID_FILTER`): an unknown role, `include` with `exclude`, or `first` with `last`.
- `401`: No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
- `404`: No such session of yours (`NOT_FOUND`), or no transcript captured yet (`SESSION_NOT_CAPTURED`).

---

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