Skip to main content
GET
List Sessions

Authorizations

Authorization
string
header
required

Workspace API key as a bearer token: Authorization: Bearer ish_sk_live_.... Keys are workspace-scoped machine principals minted in Settings > Developers (shown once at mint). Scopes: sessions:run (create a session, submit turns, close), sessions:read (read the session and its decision trace), environments:read and environments:write (manage the workspace's registered environments), tasks:read and tasks:write (manage the workspace's registered tasks), people:read and people:write (the people the workspace can run a session for), and usage:read (the workspace's own consumption, spend limits and rate-limit budgets). A key is minted with sessions:run, sessions:read, and tasks:read by default; every other scope must be requested, people:read and usage:read included. An ish user access token also works on the same header for personal scripts.

Path Parameters

workspace_id
string<uuid>
required

Query Parameters

status
enum<string>[] | null

Filter by session status (repeatable).

Available options:
open,
completed,
gave_up,
closed,
max_turns,
spend_cap_reached,
balance_exhausted
api_key_id
string<uuid> | null

Filter to sessions opened by this API key.

environment_id
string<uuid> | null

Filter to sessions run in this registered environment. Matches on the environment's id, so a renamed environment still returns its older sessions; sessions opened with an inline environment descriptor have no id and are never matched, and sessions whose environment was since deleted no longer match (their reference is cleared; the frozen snapshot stays on the session).

environment_version_id
string<uuid> | null

Filter to sessions pinned to this declared environment version, as resolved at open. Narrower than environment_id and independent of it: a session that ran the same environment UNVERSIONED is never matched.

task_id
string<uuid> | null

Filter to sessions bound to this registered task. Matches on the task's id: a renamed task still returns its older sessions, inline-instruction sessions are never matched, and an archived task's sessions keep matching (archive clears nothing; the frozen instructions stays on each session).

search
string | null

Free-text filter: matches a session id by PREFIX or the frozen instructions by case-insensitive substring. One term, no ranking.

Maximum string length: 200
created_from
string<date-time> | null

Only sessions created at/after this ISO 8601 instant.

created_to
string<date-time> | null

Only sessions created at/before this ISO 8601 instant.

after
string | null

Opaque keyset cursor from a prior page's next_cursor.

limit
integer
default:25
Required range: 1 <= x <= 100

Response

Successful Response

A keyset-paginated page of a workspace's sessions.

Ordered created_at DESC, id DESC. next_cursor is an opaque token (base64 of the last row's keyset); pass it back as after to fetch the next page, and it is null on the final page. Never an offset: rows keep inserting, so an offset would skip/duplicate across pages.

has_more
boolean
required

True when more sessions exist beyond this page.

items
SessionListItem · object[]
required
next_cursor
string | null
required

Opaque keyset cursor for the next page (pass as after); null on the final page.