Skip to main content
GET
TypeScript SDK

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

agentId
string<uuid>

Filter sessions created by this automation agent.

createdBy
string[]

Filter by creator IDs, supplied as a comma-separated list.

Minimum string length: 1
createdAfter
string<date-time>

Only sessions created after this ISO 8601 timestamp.

cursor
string

Continuation cursor from the previous response nextCursor. Omit for the first page; null nextCursor means there are no more pages.

Maximum string length: 500
limit
integer
default:50

Maximum number of items to return in one page. Use nextCursor from the response to fetch more items.

Required range: 1 <= x <= 100
excludePinned
boolean

Exclude sessions pinned by the authenticated user.

externalIds
string[]

Filter by external source IDs, supplied as a comma-separated list.

Minimum string length: 1
hasProject
boolean

Filter by whether a session has an assigned project.

includeArchived
boolean
default:true

Include archived sessions in the all-state view. Defaults to true; state=archived explicitly selects archived sessions.

includeTotal
boolean
default:false

Include totalCount. Not supported with state=active.

participant
string[]

Filter by participant IDs, supplied as a comma-separated list.

Minimum string length: 1
pendingReviewerKeys
string[]

Filter by pending reviewer keys, supplied as a comma-separated list.

Minimum string length: 1
projectIds
string[]

Filter by project IDs, supplied as a comma-separated list.

Minimum string length: 1
pullRequestStatuses
enum<string>[]

Filter by linked pull request statuses: open, merged, or closed, supplied as a comma-separated list.

Available options:
open,
merged,
closed
repositoryIds
string[]

Filter by repository IDs, supplied as a comma-separated list.

Minimum string length: 1

Search session titles, task prompts, kinds, and source names or types.

Required string length: 1 - 1000
sortBy
enum<string>
default:lastQueuedAt

Timestamp used to sort sessions, newest first.

Available options:
lastQueuedAt,
createdAt,
updatedAt
sourceIds
string[]

Filter by session source IDs, supplied as a comma-separated list.

Minimum string length: 1
sourceTypes
string[]

Filter by session source types, supplied as a comma-separated list.

Minimum string length: 1
state
enum<string>
default:all

Select all sessions, currently active work, or archived sessions. Use archived to find sessions to restore.

Available options:
all,
active,
archived

Response

List sessions

items
object[]
required
nextCursor
string | null
required
totalCount
integer
Required range: x >= 0