Skip to main content
POST
Archive Session
Every request requires ?beta=true.

Authorizations

X-Api-Key
string
header
default:sk-ant-local-default
required

OMA workspace API key.

Headers

anthropic-version
string
anthropic-beta
string

Path Parameters

session_id
string
required

Path parameter session_id

Query Parameters

beta
enum<boolean>
required

Selects the beta API contract for this endpoint. Must be true.

Available options:
true

Response

Successful response (OK)

A Managed Agents session.

type
enum<string>
required
Available options:
session
Example:

"session"

id
string
required
Example:

"sesn_011CZkZAtmR3yMPDzynEDxu7"

status
enum<string>
required

SessionStatus enum

Available options:
rescheduling,
running,
idle,
terminated
Example:

"idle"

created_at
string<date-time>
required

A timestamp in RFC 3339 format

Example:

"2026-03-15T10:00:00Z"

updated_at
string<date-time>
required

A timestamp in RFC 3339 format

Example:

"2026-03-15T10:00:00Z"

environment_id
string
required
Example:

"env_011CZkZ9X2dpNyB7HsEFoRfW"

title
string | null
required
Example:

"Order #1234 inquiry"

metadata
object
required
Example:
agent
object
required

Resolved agent definition for a session. Snapshot of the agent at session creation time.

Example:
resources
object[]
required
Example:
Example:
vault_ids
string[]
required

Vault IDs attached to the session at creation. Empty when no vaults were supplied.

Example:
outcome_evaluations
object[]
required

Per-outcome evaluation state. One entry per define_outcome event sent to the session.

Example:
usage
object
required

Cumulative token usage for the session.

Example:
stats
object
required

Timing statistics for the session.

Example:
archived_at
string<date-time> | null
required

When the session was archived. Null if not archived.

Example:

null

budget
object | null
required

The session's enforced spend ceiling, or null when no budget is set.

Example:

null

deployment_id
string | null

Deployment ID when the session was created from a deployment reference. Null otherwise.