Skip to main content
GET
Read history

Authorizations

Authorization
string
header
required

Organization or personal API key from Settings → API Keys.

Headers

X-Replicas-Api-Version
enum<string>

API version. 2026-10-07 returns snake_case responses. See versioning.

Available options:
2026-10-07

Path Parameters

id
string<uuid>
required

The unique identifier of the replica

Query Parameters

chat_id
string

Filter history to a specific chat

limit
integer

Maximum number of events to return, taken from the end of the history. Defaults to 100; when has_more is true, pass beforeCursor to read older events.

Required range: x >= 1
before_event
integer

Exclusive upper bound: return only events with an index below this value. Pass the previous response's eventsStartIndex to fetch the page before it. Indexes are stable as new events append to the end. Only pages an awake replica; a sleeping replica's saved history pages with before_cursor.

Required range: x >= 0
before_turn
integer

Exclusive upper bound for Codex transcript turns, paged with turnsStartIndex the same way beforeEvent pages events.

Required range: x >= 0
before_cursor
string

Opaque cursor from the previous response's beforeCursor. Advances events and Codex turns together.

Response

Successful response

Response containing paginated conversation history

thread_id
string | null
required

Thread/session ID

events
object[]
required

History events (paginated from the end)

total
integer
required

Total number of events when known; otherwise the number of events in this page

has_more
boolean
required

Whether earlier events exist before this page

removed_message_ids
string[]

IDs of canceled queued messages omitted from the history

events_start_index
integer

Index of the first returned event within the full history. Pass it back as before_event to fetch the preceding page. Absent when the full history was returned.

turns_start_index
integer

Index of the first returned Codex transcript turn, used with before_turn. Present only when the response includes codex_asp_transcript.

before_cursor
string | null

Opaque cursor for the next earlier page of events and Codex turns. Null when no earlier page exists.

coding_agent
enum<string> | null

Currently active coding agent

Available options:
claude,
codex,
cursor,
gemini,
muse,
opencode,
pi,
null
waking
boolean | null

Whether the workspace was just woken from a sleeping state. Retry in 30-90 seconds.

codex_asp_transcript
object | null

Native Codex ASP transcript when available

senders
object[]

Who sent each user message, for workspaces shared by several people.