v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

List Sessions

get/v1/sessions?beta=true

Query parameters

limitinteger

Maximum number of results to return.

pagestring

Opaque pagination cursor from a previous response.

include_archivedboolean

When true, includes archived sessions. Default: false (exclude archived).

created_at[gte]string date-time

A timestamp in RFC 3339 format

Return sessions created at or after this time (inclusive).

created_at[gt]string date-time

A timestamp in RFC 3339 format

Return sessions created after this time (exclusive).

created_at[lte]string date-time

A timestamp in RFC 3339 format

Return sessions created at or before this time (inclusive).

created_at[lt]string date-time

A timestamp in RFC 3339 format

Return sessions created before this time (exclusive).

agent_idstring

Filter sessions created with this agent ID.

agent_versioninteger

Filter by agent version. Only applies when agent_id is also set.

order'asc' | 'desc'

ListOrder enum

Sort direction for results, ordered by created_at. Defaults to desc (newest first).

memory_store_idstring

Filter sessions whose resources contain a memory_store with this memory store ID.

deployment_idstring

Filter sessions created by this deployment ID.

statuses[]BetaManagedAgentsSessionStatus[]

Filter by session status. Repeat the parameter to match any of multiple statuses.

Headers

x-api-keystring
anthropic-versionstring
anthropic-betastring

Response

Successful response (OK)

next_pagestring nullable

Opaque cursor for the next page. Null when no more results.

prev_pagestring nullable

Opaque cursor for the previous page. Null when on the first page. Pass as the page parameter to navigate backward.

Example response

{
  "data": [],
  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=",
  "prev_page": "page_MjAyNS0wNS0xM1QwMDowMDowMFo="
}