Reference / Agent Sandboxes
Get a sandbox
Read a sandbox's current status, lifetime and compute usage.
/v1/customer/tenants/{tenantId}/sandboxes/{sandboxId}Base URL: https://api.runzivo.dev
Authentication
Send Authorization: Bearer <token> with a customer access token or workspace API key.
API key permission: sandboxes:read or sandboxes:write. These are permissions, not legacy scopes. A key with the all:all scope also works, limited by its creator's current workspace permissions.
Parameters
| Field | Description |
|---|---|
tenantIdstring · pathRequired | Your workspace's tenant ID. Replace the placeholder with an ID your token can access. |
sandboxIdstring · pathRequired | The id returned when the sandbox was created: sbx_ followed by 24 lowercase hexadecimal characters. |
Request body
No request body is required.
Responses
| Status | Meaning |
|---|---|
| 200 OK | application/json |
| 401 Unauthorized | Missing or invalid bearer token. A ticketed terminal request can instead return ticket_invalid. |
| 403 Forbidden | The caller lacks workspace membership or permission, or the API key is not allowed. Codes include tenant_membership_required, permission_required and api_key_scope_required. |
| 404 Not found | No sandbox with this ID exists in the authorized workspace. |
| 500 Internal error | The server could not complete the request. |
| 503 Unavailable | Sandbox service is unavailable. Exec and terminal operations can also return sandbox_exec_unavailable. |
Examples use synthetic IDs, dates and values. Read the actual response and status in your workspace.
Sandbox response fields
Success returns a Sandbox object directly, with these fields.
| Field | Description |
|---|---|
idstringRequired | Sandbox ID: sbx_ followed by 24 lowercase hexadecimal characters. |
namestringRequired | Workspace sandbox name. |
sizestringRequired | The selected size identifier. |
disk_gibintegerRequired | Workspace disk size in GiB. |
statusstringRequired | pending, starting, running, stopping, stopped, deleting, deleted, expired or failed. |
errorobject | nullRequired | null, or {code, message} explaining a failed sandbox. |
created_atdate-timeRequired | When the sandbox was created. |
started_atdate-time | nullRequired | First start; null until it starts. |
expires_atdate-time | nullRequired | First start plus eight hours. Stopping does not pause the lifetime. |
remaining_secondsintegerRequired | Lifetime left; 28800 before first start, 0 once expired or deleted. |
runtime_secondsintegerRequired | Seconds the VM has been up; excludes stopped time. |
credits_usednumberRequired | Unit-minutes charged at the size's multiplier. |
Page tools
View as MarkdownAsk AI about this page
Open in ChatGPTOpen in ClaudeOpen in CursorClaude shows a caution banner on any prefilled prompt. That is expected: review the prompt, then send it.