Skip to main content
POST
Reconciles the session’s sandbox with the sandbox provider and ensures it is in running state. Unlike the legacy POST /api/sessions/{session_id}/start, this endpoint only handles sandbox lifecycle. It does not start a dev server or detect preview ports. Dev-server orchestration lives on dedicated endpoints (e.g. POST /api/v2/sessions/{id}/connect). State transitions handled: Required scope: sessions:write

Path Parameters

string
required
The session ID.

Headers

string
required
Bearer token. Example: Bearer runtm_xxx
string
Required when the session belongs to an organization.

Response

200 OK with a SessionV2 object.
string
Session ID.
string
Live sandbox state - running or paused.
string
Coding agent.
string | null
Template the session was scaffolded from.
string | null
Display name.
string | null
GitHub owner/repo link.
string | null
Active branch in the sandbox.
string
Working directory inside the sandbox (e.g. /home/user).
string | null
Owning organization.
string
ISO 8601 creation timestamp.
string | null
ISO 8601 last update timestamp.
object
Named services exposed by the sandbox, e.g. { "frontend": 3000, "postgres": 5432 }. Powers multi-port previews via /connect.
object
Env var names with masked values (*****). Secret values are never returned.
string
private or team.
number
Aggregate cost across all prompts.
array
Ordered list of agent tabs: [{ "id": "<uuid>", "name": "Chat 1" }]. Defaults to one tab whose id equals the session id.
array | null
Multi-repo template entries (only set when the org template defines >1 repo).
object
Live sandbox info from the provider:
  • sandbox_id - sandbox identifier
  • state - running or paused
  • started_at - ISO 8601
  • end_at - ISO 8601 expiry

Errors