POST

Authorizations

x-api-key
string
header
required

Path Parameters

session_id
string
required

ID of the session (ses_ followed by 26 lowercase base32 characters). A session of another workspace, a deleted session and an unknown ID all answer 404 not_found_error without an error.code.

Response

The archived session.

A Managed Agents session.

id
string
required

ID of the session (ses_ followed by 26 lowercase base32 characters).

agent
object
required

The agent the session runs, snapshotted when the session was created: the agent version with the session's own model and system overrides and its skills with every version resolved. It never changes afterwards.

archived_at
string | null
required

When the session was archived (RFC 3339, UTC); null while it is not archived.

budget
object | null
required

Always null on BMA, which does not support session budgets.

created_at
string
required

When the session was created (RFC 3339, UTC, up to microsecond precision).

environment_id
string
required

ID of the environment the session runs in (env_, or mch_ for a machine environment); an empty string when the session was created without one.

metadata
object
required

The session's key-value metadata, {} when it has none.

outcome_evaluations
object[]
required

Always an empty list on BMA, which does not support outcomes.

resources
object[]
required

What the session mounts, in the order it was mounted: file and memory_store resources. BMA never mounts github_repository resources.

A resource mounted in a session: a file or a memory_store. BMA never mounts github_repository resources.

stats
object
required

Timing statistics in seconds. active_seconds: the time the session's turns ran, less the time they waited for a tool confirmation or custom tool result; time queued behind an earlier turn is not counted. duration_seconds: the time since the session was created, frozen when it terminated or was archived.

status
enum<string>
required

idle (no turn runs, also while the agent waits for a tool confirmation or custom tool result), running (a turn is queued or runs) or terminated (archived). BMA never reports rescheduling.

Available options:
rescheduling,
running,
idle,
terminated
title
string | null
required

The session's title; null while it has none. An untitled session may be titled automatically after its first answered turn.

type
string
required

Always session.

Allowed value: "session"
updated_at
string
required

When the session last changed (RFC 3339, UTC, up to microsecond precision).

usage
object
required

Cumulative usage of the session's model requests, updated when a turn ends: token counts, cache creation tokens and the list cost in US cents.

vault_ids
string[]
required

Vaults (vlt_ IDs) the session was created with, in order; empty when none.

deployment_id
string | null

The deployment whose run created the session; null for sessions created through this API.