Skip to main content
GET
Read a chat session's execution trace

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

sessionId
string
required

The chat session's id — the same id POST /chat-sessions/messages returns and GET /chat-sessions lists.

Query Parameters

projectId
string

Optional project scope. When set, a session in another project answers 404 — the same answer as absence, so this is never an existence oracle.

turnId
string

Return exactly this turn. Mutually exclusive with afterPromptIndex.

afterPromptIndex
integer

Page forward from this turn index. Mutually exclusive with turnId.

Required range: x >= 0
limit
integer
default:1

Turns to return, 1–20. Defaults to 1 (the latest).

Required range: 1 <= x <= 20
includeSpans
boolean
default:true

Set false for per-turn summaries without span payloads.

Response

The selected turns, ascending by promptIndex.

sessionId
string
required
origin
string | null
required
traceVersion
enum<integer>
required
Available options:
1
turnCount
integer
required

Turns the session has in total, so a caller can tell whether the window is the whole story.

turns
object[]
required
latestPromptIndex
integer