Create or reuse a session

View as Markdown
Create a browser or sandbox session. Workspace-backed requests reuse the live VM for that workspace when one already exists, otherwise they spawn a new one. Provide `workspace` (label or UUID) for persistent sessions. Set `ephemeral=true` to force a fresh non-persistent session without a workspace. Sandbox `image` is accepted only for ephemeral sessions; workspace-backed sessions inherit image from the workspace configuration.

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
CreateSessionPersistentRequestDocobjectRequired
OR
CreateSessionEphemeralRequestDocobjectRequired

Response

Session created
created_atstring
endpointsobject
idstring
session_typestring
statusstring
active_connection_leasesinteger or null>=0

Active connection leases reported by the owning daemon (if available).

persistenceboolean or null
Whether this session's workspace is configured to persist after termination.
workspace_idstring or null
Durable workspace identity.

Errors