POST
Create a desktop session

Authorizations

x-api-key
string
header
required

Headers

x-bma-project-id
string

Project scope. Required when the API key can access more than one project (alias: anthropic-workspace-id).

Idempotency-Key
string

Replays the first result of a create; the same key with another body is 409.

Required string length: 1 - 255

Body

application/json

The create body plus the machine the session runs on.

machine_id
string
required
agent_id
string

The id /v1/agents uses.

read_only
boolean
default:false
lease_seconds
integer<int32>
Required range: 5 <= x <= 900
capabilities
object

Response

Success.

type
string
required
Allowed value: "desktop_session"
id
string
required

Desktop session ID (dsn_...).

Pattern: ^dsn_[a-z2-7]{26}$
org_id
string
required
Pattern: ^org_[a-z2-7]{26}$
project_id
string
required

Project ID (proj_...).

Pattern: ^proj_[a-z2-7]{26}$
machine_id
string
required

Machine ID (mch_...).

Pattern: ^mch_[a-z2-7]{26}$
owner_id
string<uuid>
required

Authenticated user or organization API key that created the session.

read_only
boolean
required
closed
boolean
required
created_at
string<date-time>
required
capabilities
object
required
control
object
required
agent_id
string

The id /v1/agents uses .