Skip to content

API endpoints

Last updated: 25 November 2026 · API v1 (beta)

This page lists all the endpoints of the public API. The base URL is https://api.hadronbox.tr/v1; for authentication, rate limits and the error format, see the API page. Every request needs the Authorization: Bearer hb_live_… header.

The page is generated at build time from the contract file, the openapi.json (opens in a new tab) document; the two are always the same. The field descriptions are shown as written in the document. The error codes in the response table are the codes that can come back with that status; their meanings are on the Error codes page.

Account

Account information

GET /v1/me

Returns the user the key belongs to, the organization, memberships, package and authentication type.

Scope required for a scoped key: account:read

Responses

Account information: responses
StatusBodyError codes
200 Success{ data: MeResponse, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Machines

List machines

GET /v1/sandboxes

Returns the organization's machines in pages; supports search and sorting. The response also carries the machine quota.

Scope required for a scoped key: machines:read

Parameters

List machines: parameters
FieldTypeRequiredDescription
pagenumberNoquery parameter · default: 1 · value: 1–10000
limitnumberNoquery parameter · default: 20 · value: 1–100
searchstringNoquery parameter · length: 0–100
sortOrder"asc" | "desc"Noquery parameter · default: "desc"
status"creating" | "running" | "paused" | "stopped" | "error"Noquery parameter
sortBy"name" | "status" | "createdAt"Noquery parameter · default: "createdAt"

Responses

List machines: responses
StatusBodyError codes
200 Success{ data: Machine[], meta, pagination: Pagination, quota: MachineQuota }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Create a machine

POST /v1/sandboxes

Creates a new machine. The optional sandboxId is an idempotency key: calling again with the same ID returns the existing machine. A template (templateCode) and a snapshot (snapshotId) cannot be given together.

Scope required for a scoped key: machines:create

Request body (JSON, CreateSandboxDto)

Create a machine: request body
FieldTypeRequiredDescription
autoPausebooleanNoPause after the idle timeout; false needs package autoPauseOptional (beta package: 403 AUTO_PAUSE_REQUIRED)default: true
envSandboxEnvVarDto[]NoWrite-once, encrypted at rest; values are never returned (only envKeys)items: 0–100
goldenImagestringNoLEGACY (SDK); 400 CONFLICTING_SOURCE together with templateCode/snapshotIdlength: 1–500 · example: "ai-sandbox/golden"
idleTimeoutMinutesnumberNoTASK-194: idle minutes before auto-pause; default = plan idleTimeoutMinutes; 5..plan value, else 400 IDLE_TIMEOUT_OUT_OF_RANGEvalue: 5–1440 · example: 10
imageTagstringNoLEGACY (SDK)length: 0–100 · example: "v1.2"
namestringYespattern: ^[a-z0-9][a-z0-9-]{1,39}$ · example: "ubuntu-dev"
sandboxIdstringNoIdempotency keylength: 5–64 · example: "sbx_a1b2c3d4"
size"small" | "medium" | "large"NoSize preset: small 2 vCPU / 2 GiB, medium 2 vCPU / 4 GiB, large 4 vCPU / 8 GiB. Default small (desktop images: medium). Must fit plan maxVcpu/maxMemoryMib, else 402 PLAN_LIMIT_SIZE; a desktop image below medium → 400 DESKTOP_SIZE_TOO_SMALL (details { size, minSize })
snapshotIdstringNoXOR with templateCodeexample: "snp_0f8e6c1a-2b3c-4d5e-8f90-123456789abc"
templateCodestringNoCatalogue template; default = the isDefault templateexample: "standard"
tools"node" | "python" | "go" | "rust" | "docker" | "claude-code" | "codex" | "gemini-cli" | "copilot-cli" | "aider" | "opencode"[]NoTASK-357: unique catalogue tool ids (status ga) installed in the background after boot; `requires` are added automatically (claude-code adds node). Per-tool state: GET /sandboxes/:id/tools. 400 TOOLS_WITH_SNAPSHOT with snapshotId (the snapshot carries its own tools; add more later with POST /sandboxes/:id/tools), 400 TOOLS_DISK_BUDGET when the estimated disk use is above the tool diskitems: 0–16 · example: ["claude-code"]

Responses

Pause machines in bulk

POST /v1/sandboxes/bulk/pause

Pauses up to 50 machines. The result is returned per ID; a machine that is already paused counts as a success.

Scope required for a scoped key: machines:manage

Request body (JSON, BulkSandboxDto)

Pause machines in bulk: request body
FieldTypeRequiredDescription
idsstring[]Yesitems: 1–50 · example: ["sbx_1","sbx_2"]

Responses

Pause machines in bulk: responses
StatusBodyError codes
200 Success{ data: BulkResult, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Resume machines in bulk

POST /v1/sandboxes/bulk/resume

Resumes up to 50 machines. The result is returned per ID; a machine that is already running counts as a success.

Scope required for a scoped key: machines:manage

Request body (JSON, BulkSandboxDto)

Resume machines in bulk: request body
FieldTypeRequiredDescription
idsstring[]Yesitems: 1–50 · example: ["sbx_1","sbx_2"]

Responses

Resume machines in bulk: responses
StatusBodyError codes
200 Success{ data: BulkResult, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Get a machine

GET /v1/sandboxes/{id}

Returns a machine by its ID. Only the names of the environment variables (envKeys) are returned, never their values.

Scope required for a scoped key: machines:read

Parameters

Get a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Get a machine: responses
StatusBodyError codes
200 Success{ data: MachineDetail, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Machine auto-pause settings

PATCH /v1/sandboxes/{id}

Updates the idle time (idleTimeoutMinutes) and automatic pausing (autoPause).

Scope required for a scoped key: machines:manage

Parameters

Machine auto-pause settings: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, UpdateSandboxSettingsDto)

Machine auto-pause settings: request body
FieldTypeRequiredDescription
autoPausebooleanNofalse = never auto-pause when idle (package autoPauseOptional; beta package: 403 AUTO_PAUSE_REQUIRED)example: true
idleTimeoutMinutesnumberNoIdle minutes before auto-pause; 5..package idleTimeoutMinutes (beta package 15)value: 5–1440 · example: 10

Responses

Machine auto-pause settings: responses
StatusBodyError codes
200 Success{ data: Machine, meta }—
400 Invalid requestApiErrorVALIDATIONIDLE_TIMEOUT_OUT_OF_RANGE
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDAUTO_PAUSE_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Delete a machine

POST /v1/sandboxes/{id}/destroy

Deletes the machine (soft delete). Environment variables and secret links are deleted permanently.

Scope required for a scoped key: machines:delete

Parameters

Delete a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Delete a machine: responses
StatusBodyError codes
201 Created{ data: Machine, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Run a command in a machine

POST /v1/sandboxes/{id}/exec

Starts the command and returns an executionId and a pid. Stream the output with a separate request.

Scope required for a scoped key: machines:exec

Parameters

Run a command in a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter

Request body (JSON, ExecDaemonDto)

Run a command in a machine: request body
FieldTypeRequiredDescription
commandstringYeslength: 0–4000 · example: "ls -la"
timeoutMsnumberNovalue: 1–3600000 · example: 30000

Responses

Run a command in a machine: responses
StatusBodyError codes
201 Created{ data: ExecStarted, meta }—
400 Invalid requestApiErrorVALIDATIONCOMMAND_BLOCKED
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorSANDBOX_HOST_BUSYRATE_LIMITED

Stop a command

POST /v1/sandboxes/{id}/executions/{executionId}/cancel

Stops a running command in the machine (its process group is terminated). If the command has already finished, it returns cancelled: false.

Scope required for a scoped key: machines:exec

Parameters

Stop a command: parameters
FieldTypeRequiredDescription
idstringYespath parameter
executionIdstringYespath parameter

Responses

Stop a command: responses
StatusBodyError codes
200 Success{ data: CancelExecution, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiError—
429 Too many requestsApiErrorRATE_LIMITED

Stream command output

GET /v1/sandboxes/{id}/executions/{executionId}/output

Streams the output of an execution as Server-Sent Events: stdout, stderr, exit and error events. By default line breaks inside the data are escaped as \n; if the request adds the X-Sse-Data-Encoding: json header, every data line is a JSON string that decodes one to one.

Scope required for a scoped key: machines:exec

Parameters

Stream command output: parameters
FieldTypeRequiredDescription
idstringYespath parameter
executionIdstringYespath parameter

Responses

Stream command output: responses
StatusBodyError codes
200 Successtext/event-stream—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiError—
429 Too many requestsApiErrorRATE_LIMITED

Read a file

GET /v1/sandboxes/{id}/files

Reads a file of the machine. The path is relative to the workspace; it cannot leave the workspace.

Scope required for a scoped key: machines:exec

Parameters

Read a file: parameters
FieldTypeRequiredDescription
idstringYespath parameter
pathstringYesquery parameter · length: 1–500 · example: "workspace/agent/main.py"

Responses

Read a file: responses
StatusBodyError codes
200 Success{ data: ReadFile, meta }—
400 Invalid requestApiError—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiError—
429 Too many requestsApiErrorRATE_LIMITED

Write a file

PUT /v1/sandboxes/{id}/files

Writes to a file of the machine. The path is relative to the workspace; it cannot leave the workspace.

Scope required for a scoped key: machines:exec

Parameters

Write a file: parameters
FieldTypeRequiredDescription
idstringYespath parameter
pathstringYesquery parameter · length: 1–500 · example: "workspace/agent/main.py"

Request body (JSON, WriteFileDto)

Write a file: request body
FieldTypeRequiredDescription
contentstringYeslength: 0–1048576 · example: "# hello\nprint(\"hi\")\n"

Responses

Write a file: responses
StatusBodyError codes
200 Success{ data: WriteFile, meta }—
400 Invalid requestApiError—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Download a file (raw)

GET /v1/sandboxes/{id}/files/raw

Downloads a file of the machine as it is (application/octet-stream), streamed; up to 100 MiB, or 8 MiB on hosts that are not upgraded yet. The path is relative to /workspace; the machine must be running.

Scope required for a scoped key: machines:exec

Parameters

Download a file (raw): parameters
FieldTypeRequiredDescription
idstringYespath parameter
pathstringYesquery parameter · length: 1–500 · example: "workspace/agent/main.py"

Responses

Download a file (raw): responses
StatusBodyError codes
200 Successapplication/octet-stream—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiError—
409 ConflictApiErrorINVALID_STATE
413 ApiError—
429 Too many requestsApiErrorRATE_LIMITED

Upload a file (raw)

PUT /v1/sandboxes/{id}/files/raw

Writes the bytes of the body (application/octet-stream) to a file of the machine, streamed; up to 100 MiB with Content-Length, or 8 MiB for chunked bodies and hosts that are not upgraded yet. Parent directories are created and the file is replaced in one step. The machine must be running.

Scope required for a scoped key: machines:exec

Parameters

Upload a file (raw): parameters
FieldTypeRequiredDescription
idstringYespath parameter
pathstringYesquery parameter · length: 1–500 · example: "workspace/agent/main.py"

Responses

Upload a file (raw): responses
StatusBodyError codes
200 Success{ data: WriteFile, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
409 ConflictApiErrorINVALID_STATE
413 ApiError—
415 ApiError—
429 Too many requestsApiErrorRATE_LIMITED

Pause a machine

POST /v1/sandboxes/{id}/pause

Pauses a running machine.

Scope required for a scoped key: machines:manage

Parameters

Pause a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Pause a machine: responses
StatusBodyError codes
201 Created{ data: Machine, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorINVALID_STATE
429 Too many requestsApiErrorRATE_LIMITED

Resume a machine

POST /v1/sandboxes/{id}/resume

Starts a paused machine again.

Scope required for a scoped key: machines:manage

Parameters

Resume a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Resume a machine: responses
StatusBodyError codes
201 Created{ data: Machine, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPENEW_ACCOUNT_LIMIT
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorINVALID_STATE
429 Too many requestsApiErrorRATE_LIMITED

List background services

GET /v1/sandboxes/{id}/services

Returns the machine's background services with their state (pending, starting, running, backoff, crashloop, stopped, failed, unsupported), ordered by name. While the machine is not running the state reads pending.

Scope required for a scoped key: machines:read

Parameters

List background services: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

List background services: responses
StatusBodyError codes
200 Success{ data: MachineService[], meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Add a background service

POST /v1/sandboxes/{id}/services

Adds a named command that runs on the machine without an open terminal (bash -lc, as the machine user). It starts within seconds when the machine runs, otherwise when it next runs. A service does not keep the machine awake. The number of services per machine depends on the package limit. Do not put secrets in the command; read them from a file in /workspace.

Scope required for a scoped key: machines:exec

Parameters

Add a background service: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, CreateMachineServiceDto)

Add a background service: request body
FieldTypeRequiredDescription
commandstringYesShell command, run with `bash -lc` as the machine user (1-4096 bytes, no NUL). Never put secrets in it: read them from a file in /workspace instead (e.g. `set -a; . /workspace/.env; set +a; opencode serve`).example: "opencode serve --port 4096"
cwdstringNoWorking directory: absolute, at most 256 bytes, no ".." segmentdefault: "/workspace" · example: "/workspace"
enabledbooleanNofalse = defined but stopped (POST .../start runs it)default: true
namestringYesUnique per machine: lower-case letter, then up to 31 lower-case letters, digits or `-`pattern: ^[a-z][a-z0-9-]{0,31}$ · example: "opencode"
restart"always" | "on-failure"Noalways = restart whenever it exits; on-failure = not after a clean exit (code 0)default: "always"

Responses

Add a background service: responses
StatusBodyError codes
201 Created{ data: MachineService, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorPLAN_LIMIT_SERVICES
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorSERVICE_NAME_TAKEN
429 Too many requestsApiErrorRATE_LIMITED

Change a service

PATCH /v1/sandboxes/{id}/services/{name}

Changes the command, working directory or restart policy of a service; the service restarts with the new definition. The name cannot change.

Scope required for a scoped key: machines:exec

Parameters

Change a service: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
namestringYespath parameter · pattern: ^[a-z][a-z0-9-]{0,31}$ · example: "opencode"

Request body (JSON, UpdateMachineServiceDto)

Change a service: request body
FieldTypeRequiredDescription
commandstringNoShell command, run with `bash -lc` as the machine user (1-4096 bytes, no NUL). Never put secrets in it: read them from a file in /workspace instead (e.g. `set -a; . /workspace/.env; set +a; opencode serve`).example: "opencode serve --port 4096"
cwdstringNoWorking directory (absolute, no "..")example: "/workspace"
restart"always" | "on-failure"No

Responses

Change a service: responses
StatusBodyError codes
200 Success{ data: MachineService, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUNDSERVICE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Delete a service

DELETE /v1/sandboxes/{id}/services/{name}

Stops the service on the machine and removes its definition; the name can be used again.

Scope required for a scoped key: machines:manage

Parameters

Delete a service: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
namestringYespath parameter · pattern: ^[a-z][a-z0-9-]{0,31}$ · example: "opencode"

Responses

Delete a service: responses
StatusBodyError codes
204 No content——
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUNDSERVICE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Get service logs

GET /v1/sandboxes/{id}/services/{name}/logs

Returns the last output of a service (stdout and stderr, tail bytes, default 65536). Output is kept only in the machine memory (last 256 KiB per service); the API never stores it.

Scope required for a scoped key: machines:exec

Parameters

Get service logs: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
namestringYespath parameter · pattern: ^[a-z][a-z0-9-]{0,31}$ · example: "opencode"
tailnumberNoLast N bytes of output to returnquery parameter · default: 65536 · value: 1–262144

Responses

Get service logs: responses
StatusBodyError codes
200 Success{ data: MachineServiceLogs, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUNDSERVICE_NOT_FOUND
409 ConflictApiErrorINVALID_STATESERVICES_UNSUPPORTED
429 Too many requestsApiErrorRATE_LIMITED
503 Service temporarily unavailableApiErrorSANDBOX_HOST_UNAVAILABLE

Restart a service

POST /v1/sandboxes/{id}/services/{name}/restart

Restarts a running service now. The machine must be running; start a stopped service first.

Scope required for a scoped key: machines:exec

Parameters

Restart a service: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
namestringYespath parameter · pattern: ^[a-z][a-z0-9-]{0,31}$ · example: "opencode"

Responses

Restart a service: responses
StatusBodyError codes
200 Success{ data: MachineService, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUNDSERVICE_NOT_FOUND
409 ConflictApiErrorINVALID_STATESERVICES_UNSUPPORTEDSERVICE_DISABLED
429 Too many requestsApiErrorRATE_LIMITED
503 Service temporarily unavailableApiErrorSANDBOX_HOST_UNAVAILABLE

Start a service

POST /v1/sandboxes/{id}/services/{name}/start

Starts a stopped service (enabled = true). Does nothing when nothing changes.

Scope required for a scoped key: machines:exec

Parameters

Start a service: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
namestringYespath parameter · pattern: ^[a-z][a-z0-9-]{0,31}$ · example: "opencode"

Responses

Start a service: responses
StatusBodyError codes
200 Success{ data: MachineService, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUNDSERVICE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Stop a service

POST /v1/sandboxes/{id}/services/{name}/stop

Stops a service and keeps its definition (enabled = false). Does nothing when nothing changes.

Scope required for a scoped key: machines:manage

Parameters

Stop a service: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
namestringYespath parameter · pattern: ^[a-z][a-z0-9-]{0,31}$ · example: "opencode"

Responses

Stop a service: responses
StatusBodyError codes
200 Success{ data: MachineService, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUNDSERVICE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Stop a machine

POST /v1/sandboxes/{id}/stop

Stops a running or paused machine.

Scope required for a scoped key: machines:manage

Parameters

Stop a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Stop a machine: responses
StatusBodyError codes
201 Created{ data: Machine, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorINVALID_STATE
429 Too many requestsApiErrorRATE_LIMITED

List a machine's tools

GET /v1/sandboxes/{id}/tools

Returns the tools selected for the machine and their install states (pending, installing, ready, failed).

Scope required for a scoped key: machines:read

Parameters

List a machine's tools: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

List a machine's tools: responses
StatusBodyError codes
200 Success{ data: MachineTool[], meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Add tools to a machine

POST /v1/sandboxes/{id}/tools

Adds tools from the catalogue to a running machine. Required tools (for example Node.js) are added automatically and the install continues in the background. Tools that are already on the machine are left unchanged.

Scope required for a scoped key: machines:manage

Parameters

Add tools to a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, AddMachineToolsDto)

Add tools to a machine: request body
FieldTypeRequiredDescription
tools"node" | "python" | "go" | "rust" | "docker" | "claude-code" | "codex" | "gemini-cli" | "copilot-cli" | "aider" | "opencode"[]YesUnique catalogue tool ids (status ga); `requires` are added automatically; already added tools are kept as they areitems: 1–16 · example: ["codex"]

Responses

Add tools to a machine: responses
StatusBodyError codes
202 Accepted (asynchronous){ data: MachineTool[], meta }—
400 Invalid requestApiErrorVALIDATIONTOOLS_DISK_BUDGET
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorINVALID_STATE
429 Too many requestsApiErrorRATE_LIMITED

Retry a tool install

POST /v1/sandboxes/{id}/tools/{toolId}/retry

Queues a tool whose install failed again.

Scope required for a scoped key: machines:manage

Parameters

Retry a tool install: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
toolIdstringYespath parameter · pattern: ^[a-z0-9][a-z0-9-]{0,63}$ · example: "claude-code"

Responses

Retry a tool install: responses
StatusBodyError codes
202 Accepted (asynchronous){ data: MachineTool, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUNDTOOL_NOT_FOUND
409 ConflictApiErrorINVALID_STATETOOL_NOT_RETRYABLE
429 Too many requestsApiErrorRATE_LIMITED

Machine spending

GET /v1/sandboxes/{id}/usage

Returns the machine’s compute spend this month, its hourly rate, the approximate cost of the open run and the machine’s own budget.

Scope required for a scoped key: machines:read

Parameters

Machine spending: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Machine spending: responses
StatusBodyError codes
200 Success{ data: MachineUsage, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Preview ports

List preview ports

GET /v1/sandboxes/{id}/ports

Returns the machine's open preview ports, oldest first. The url field is the preview address.

Scope required for a scoped key: machines:read

Parameters

List preview ports: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

List preview ports: responses
StatusBodyError codes
200 Success{ data: ExposedPort[], meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Open a port (preview address)

POST /v1/sandboxes/{id}/ports

Opens a TCP port of the machine at an address of the form https://<port>-<random>.hbox.tr. Access is private by default: only organization members can open the address. Reserved ports (52, 5900-5999, 6080, 8052) cannot be opened; the number of open ports depends on the package limit.

Scope required for a scoped key: machines:manage

Parameters

Open a port (preview address): parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, ExposePortDto)

Open a port (preview address): request body
FieldTypeRequiredDescription
access"private" | "public"Noprivate: preview cookie or token required. public: not available yet (preview links are private only)default: "private"
autoWakebooleanNoA request to a paused machine wakes itdefault: true
labelstringNolength: 0–60 · example: "vite dev server"
portnumberYesGuest TCP port (not 52, 5900-5999, 6080, 8052)value: 1–65535 · example: 3000

Responses

Open a port (preview address): responses
StatusBodyError codes
201 Created{ data: ExposedPort, meta }—
400 Invalid requestApiErrorVALIDATIONPORT_RESERVED
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorPLAN_UPGRADE_REQUIREDPLAN_LIMIT_PORTS
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPEFEATURE_NOT_AVAILABLE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorPORT_ALREADY_EXPOSED
429 Too many requestsApiErrorRATE_LIMITED

Get a preview port

GET /v1/sandboxes/{id}/ports/{portId}

Returns one preview port of the machine by its ID.

Scope required for a scoped key: machines:read

Parameters

Get a preview port: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
portIdstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$ · example: "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc"

Responses

Get a preview port: responses
StatusBodyError codes
200 Success{ data: ExposedPort, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorPORT_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Close a port

DELETE /v1/sandboxes/{id}/ports/{portId}

Closes a preview port. The address stops working at once and is never reused; opening the same port again produces a new address.

Scope required for a scoped key: machines:manage

Parameters

Close a port: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
portIdstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$ · example: "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc"

Responses

Close a port: responses
StatusBodyError codes
204 No content——
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorPORT_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Create a preview access token

POST /v1/sandboxes/{id}/ports/{portId}/tokens

Creates a time-limited access token for a private preview port. Send the token in the X-Hadronbox-Preview-Token header of your requests. The lifetime is between 60 seconds and 24 hours (default 1 hour); when requested with an API key it cannot go past the key's expiry date. No token is issued for blocked ports.

Scope required for a scoped key: machines:manage

Parameters

Create a preview access token: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
portIdstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$ · example: "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc"

Request body (JSON, IssuePreviewTokenDto)

Create a preview access token: request body
FieldTypeRequiredDescription
ttlSecondsnumberNoToken lifetime in seconds; capped at the calling API key expirydefault: 3600 · value: 60–86400

Responses

Create a preview access token: responses
StatusBodyError codes
201 Created{ data: PreviewToken, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDACCOUNT_SUSPENDEDACCOUNT_INACTIVEINSUFFICIENT_SCOPEPREVIEW_BLOCKED
404 Not foundApiErrorPORT_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED
503 Service temporarily unavailableApiErrorEDGE_UNAVAILABLE

Revoke a preview access token

DELETE /v1/sandboxes/{id}/ports/{portId}/tokens/{jti}

Revokes a preview access token by its ID (jti); it stops working within 35 seconds at the latest. An unknown jti also returns 204.

Scope required for a scoped key: machines:manage

Parameters

Revoke a preview access token: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
portIdstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$ · example: "prt_0f8e6c1a-2b3c-4d5e-8f90-123456789abc"
jtistringYespath parameter · pattern: ^[A-Za-z0-9_-]{22}$ · example: "Q2hhbmdlTWVQbGVhc2UxMg"

Responses

Revoke a preview access token: responses
StatusBodyError codes
204 No content——
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorPORT_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Terminal sessions

List terminal sessions

GET /v1/sandboxes/{id}/terminal-sessions

Returns the machine's terminal sessions in pages, newest first. Members see their own sessions; owners and admins see all of them. Keystrokes and output are never stored.

Scope required for a scoped key: machines:read

Parameters

List terminal sessions: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$
pagenumberNoquery parameter · default: 1 · value: 1–10000
limitnumberNoquery parameter · default: 20 · value: 1–100
status"pending" | "active" | "detached" | "ended"Noquery parameter

Responses

List terminal sessions: responses
StatusBodyError codes
200 Success{ data: TerminalSession[], meta, pagination: Pagination }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Open a terminal

POST /v1/sandboxes/{id}/terminal-sessions

Opens an interactive terminal session on the machine and returns a single-use ticket that is valid for 60 seconds. The ticket is sent only in the subprotocol header of the terminal connection (hb.term.v1, hb.tkt.<ticket>); it is never written to the address or to a log. A paused machine is woken first (status: waking). The number of concurrent sessions is limited by the package, and sessions per machine by 8.

Scope required for a scoped key: machines:exec

Parameters

Open a terminal: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, CreateTerminalSessionDto)

Open a terminal: request body
FieldTypeRequiredDescription
clientKind"cli" | "web" | "sdk"Nodefault: "cli"
colsnumberYesvalue: 1–1000 · example: 120
commandstringNoCommand instead of the login shell (≤ 1024 bytes). May carry secrets: never logged; only argv0 is stored.length: 0–1024 · example: "npm run dev"
rowsnumberYesvalue: 1–1000 · example: 40
term"xterm-256color" | "xterm" | "screen-256color" | "tmux-256color" | "vt100"Nodefault: "xterm-256color"

Responses

Open a terminal: responses
StatusBodyError codes
201 Created{ data: TerminalTicket, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorPLAN_LIMIT_TERMINALS
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorINVALID_STATEMACHINE_OWNER_SUSPENDEDMACHINE_ABUSE_HOLD
429 Too many requestsApiErrorRATE_LIMITEDTERMINAL_LIMIT_MACHINE
503 Service temporarily unavailableApiErrorEDGE_UNAVAILABLE

Get a terminal session

GET /v1/terminal-sessions/{id}

Returns one terminal session by its ID: state, start and end time, end reason, exit code and byte counters.

Scope required for a scoped key: machines:read

Parameters

Get a terminal session: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Get a terminal session: responses
StatusBodyError codes
200 Success{ data: TerminalSession, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorTERMINAL_SESSION_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Close a terminal session

DELETE /v1/terminal-sessions/{id}

Ends the session; the connection closes within 35 seconds at the latest. The person who opened the session, or an owner or admin, can close it.

Scope required for a scoped key: machines:exec

Parameters

Close a terminal session: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Close a terminal session: responses
StatusBodyError codes
204 No content——
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorTERMINAL_SESSION_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED
503 Service temporarily unavailableApiError—

Get a reconnect ticket

POST /v1/terminal-sessions/{id}/tickets

Returns a new single-use ticket to reconnect to a session you opened. If resume is true, the first frame must be RESUME. A ticket cannot be issued for someone else's session.

Scope required for a scoped key: machines:exec

Parameters

Get a reconnect ticket: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, IssueTerminalTicketDto)

Get a reconnect ticket: request body
FieldTypeRequiredDescription
colsnumberNodefault: 80 · value: 1–1000 · example: 120
rowsnumberNodefault: 24 · value: 1–1000 · example: 40
term"xterm-256color" | "xterm" | "screen-256color" | "tmux-256color" | "vt100"Nodefault: "xterm-256color"

Responses

Get a reconnect ticket: responses
StatusBodyError codes
201 Created{ data: TerminalTicket, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorTERMINAL_SESSION_NOT_FOUND
409 ConflictApiErrorINVALID_STATEMACHINE_OWNER_SUSPENDEDMACHINE_ABUSE_HOLD
429 Too many requestsApiErrorRATE_LIMITEDTERMINAL_LIMIT_MACHINE
503 Service temporarily unavailableApiErrorEDGE_UNAVAILABLE

Snapshots

List snapshots

GET /v1/snapshots

Returns the organization's snapshots in pages; supports search, a status filter and sorting. sizeBytes is a decimal string.

Scope required for a scoped key: snapshots:read

Parameters

List snapshots: parameters
FieldTypeRequiredDescription
pagenumberNoquery parameter · default: 1 · value: 1–10000
limitnumberNoquery parameter · default: 20 · value: 1–100
searchstringNoquery parameter · length: 0–100
sortOrder"asc" | "desc"Noquery parameter · default: "desc"
status"pending" | "creating" | "ready" | "failed"Noquery parameter
sortBy"name" | "createdAt"Noquery parameter · default: "createdAt"

Responses

List snapshots: responses
StatusBodyError codes
200 Success{ data: Snapshot[], meta, pagination: Pagination }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Take a snapshot

POST /v1/snapshots

Takes a snapshot of a running or paused machine asynchronously. The response is in the pending state; when it is ready, the status becomes ready.

Scope required for a scoped key: snapshots:write

Request body (JSON, CreateSnapshotDto)

Take a snapshot: request body
FieldTypeRequiredDescription
namestringYespattern: ^[a-z0-9][a-z0-9-]{1,39}$ · example: "bireysel"
sandboxIdstringYesexample: "sbx_0f8e6c1a-2b3c-4d5e-8f90-123456789abc"

Responses

Take a snapshot: responses
StatusBodyError codes
202 Accepted (asynchronous){ data: Snapshot, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorPLAN_LIMIT_SNAPSHOTS
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorNAME_TAKENSANDBOX_NOT_SNAPSHOTTABLE
429 Too many requestsApiErrorRATE_LIMITED
503 Service temporarily unavailableApiErrorSNAPSHOTS_UNAVAILABLE

Delete a snapshot

DELETE /v1/snapshots/{id}

Deletes the snapshot. An owner, an admin or the user who created the snapshot can delete it.

Scope required for a scoped key: snapshots:write

Parameters

Delete a snapshot: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Delete a snapshot: responses
StatusBodyError codes
204 No content——
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSNAPSHOT_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Copy from a snapshot

POST /v1/snapshots/{id}/fanout

Opens 1 to 10 machines from a ready snapshot at once (name-1 … name-N). The machine limit, balance and spend budget are checked first; with allOrNothing on (the default) nothing is opened if they do not cover every machine, with it off as many as fit are opened and the rest come back in the failed list with a code. The response also carries the estimated hourly cost. An API key needs the machines:create scope.

Scope required for a scoped key: machines:create

Parameters

Copy from a snapshot: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, FanoutSnapshotDto)

Copy from a snapshot: request body
FieldTypeRequiredDescription
allOrNothingbooleanNotrue: if the machine limit, the credit balance or the spend budget cannot cover all `count` machines, nothing is opened and the request fails (402). false: as many machines as fit are opened and the rest are listed in `failed`default: true
countnumberYesHow many machines to openvalue: 1–10 · example: 3
namePrefixstringNoMachines are named `<namePrefix>-1` ... `<namePrefix>-N`; default: the snapshot namepattern: ^[a-z0-9][a-z0-9-]{0,34}$ · example: "deney"
size"small" | "medium" | "large"NoSize of every machine; default: the snapshot default

Responses

Copy from a snapshot: responses
StatusBodyError codes
201 Created{ data: SnapshotFanout, meta }—
400 Invalid requestApiErrorVALIDATIONDESKTOP_SIZE_TOO_SMALL
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorPLAN_LIMIT_MACHINESPLAN_LIMIT_SIZECREDIT_INSUFFICIENTBUDGET_EXCEEDED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSNAPSHOT_NOT_FOUND
409 ConflictApiErrorNAME_TAKENSNAPSHOT_NOT_READY
429 Too many requestsApiErrorRATE_LIMITED

Templates

List templates

GET /v1/templates

Returns the machine template catalogue. The locked field means the template is premium and the package does not allow premium templates.

Scope required for a scoped key: machines:read

Responses

List templates: responses
StatusBodyError codes
200 Success{ data: Template[], meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Usage

Usage summary

GET /v1/usage/summary

Returns machine and vCPU hours, the daily series (Europe/Istanbul days), the breakdown per machine and the package limits (used / limit / percent / state).

Scope required for a scoped key: account:read

Parameters

Usage summary: parameters
FieldTypeRequiredDescription
range"7d" | "14d" | "30d" | "period"Noquery parameter · default: "14d"

Responses

Usage summary: responses
StatusBodyError codes
200 Success{ data: UsageSummary, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Credits

Credit balance

GET /v1/credits

Returns the balance (in kuruş, VAT included), the state (ok / low / exhausted), the hourly spend rate, the estimated remaining minutes, the credit lots that expire within 14 days and whether the balance is enforced (enforced).

Scope required for a scoped key: account:read

Responses

Credit balance: responses
StatusBodyError codes
200 Success{ data: Credit, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

List spend budgets

GET /v1/credits/budgets

Returns the organization’s spend budgets with this month’s (Europe/Istanbul) spend, percentage and live state. Amounts are approximate; metering lags a few minutes.

Scope required for a scoped key: account:read

Responses

List spend budgets: responses
StatusBodyError codes
200 Success{ data: BudgetList, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Add a spend budget

POST /v1/credits/budgets

Sets a monthly TL limit for the organization (no sandboxId) or one machine. Defaults: warn at 80%, pause at 100%. Works independently of balance enforcement. Owners and admins only; an API key needs the budgets:write scope.

Scope required for a scoped key: budgets:write

Request body (JSON, CreateBudgetDto)

Add a spend budget: request body
FieldTypeRequiredDescription
action"warn" | "pause"NoAt 100 %: pause = pause running machines in scope (no automatic resume); warn = notice onlydefault: "pause"
limitKurusnumberYesMonthly limit in kuruş, KDV dahil (1 TL = 100)value: 100–100000000 · example: 20000
sandboxIdstringNoMachine id for a machine budget; omit for the organization budgetpattern: ^[A-Za-z0-9_-]{1,64}$
warnPercentnumberNoWarning threshold (% of the limit)default: 80 · value: 1–99

Responses

Add a spend budget: responses
StatusBodyError codes
201 Created{ data: Budget, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorBUDGET_EXISTS
429 Too many requestsApiErrorRATE_LIMITED

Change a spend budget

PATCH /v1/credits/budgets/{id}

Changes the limit, the warning threshold or the action at the limit (pause / warn). Machines the budget paused do not resume on their own.

Scope required for a scoped key: budgets:write

Parameters

Change a spend budget: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, UpdateBudgetDto)

Change a spend budget: request body
FieldTypeRequiredDescription
action"warn" | "pause"No
limitKurusnumberNovalue: 100–100000000
warnPercentnumberNovalue: 1–99

Responses

Change a spend budget: responses
StatusBodyError codes
200 Success{ data: Budget, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorBUDGET_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Remove a spend budget

DELETE /v1/credits/budgets/{id}

Removes the budget. Machines it paused do not resume on their own; you resume them.

Scope required for a scoped key: budgets:write

Parameters

Remove a spend budget: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Remove a spend budget: responses
StatusBodyError codes
204 No content——
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorBUDGET_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Credit ledger

GET /v1/credits/ledger

Returns the credit movements newest first, paged with a cursor. Hourly usage rows are folded into one row per Europe/Istanbul day; filter by type and date range.

Scope required for a scoped key: account:read

Parameters

Credit ledger: parameters
FieldTypeRequiredDescription
cursorstringNonextCursor of the previous page (opaque)query parameter · length: 0–400
limitnumberNoquery parameter · default: 50 · value: 1–100
type"grant" | "usage" | "adjustment" | "expiry" | "refund" | "reversal"Noquery parameter
fromstringNoInclusive start (ISO 8601 with a zone, or YYYY-MM-DD)query parameter
tostringNoExclusive end (ISO 8601 with a zone, or YYYY-MM-DD)query parameter

Responses

Credit ledger: responses
StatusBodyError codes
200 Success{ data: CreditLedgerPage, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Credit packages

GET /v1/credits/packages

Returns the active credit packages in order: price, credit amount, validity in days and whether they can be purchased. Paid packages are monthly; every monthly payment resets the paid balance to the package amount.

Scope required for a scoped key: account:read

Responses

Credit packages: responses
StatusBodyError codes
200 Success{ data: CreditPackage[], meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Credit spend

GET /v1/credits/usage

Returns the spend breakdown from the usage accruals (compute and storage) per day or per machine / disk / snapshot: kuruş, minutes and GiB-hours.

Scope required for a scoped key: account:read

Parameters

Credit spend: parameters
FieldTypeRequiredDescription
fromstringNoFirst Istanbul day (YYYY-MM-DD)query parameter · example: "2026-11-01"
tostringNoLast Istanbul day, inclusive (YYYY-MM-DD)query parameter · example: "2026-11-29"
groupBy"day" | "machine"Noquery parameter · default: "day"

Responses

Credit spend: responses
StatusBodyError codes
200 Success{ data: CreditUsage, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Scheduled jobs

Scheduled jobs of a machine

GET /v1/sandboxes/{id}/schedules

Returns the scheduled jobs of the machine: name, cron, command, next run, last status, disable reason and trigger URL.

Scope required for a scoped key: machines:read

Parameters

Scheduled jobs of a machine: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Scheduled jobs of a machine: responses
StatusBodyError codes
200 Success{ data: Schedule[], meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSANDBOX_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Add a scheduled job

POST /v1/sandboxes/{id}/schedules

Defines a command that runs on the machine by a cron expression (Europe/Istanbul, shortest interval 15 minutes). The command is written to a script file and run with sh; secrets arrive as for exec. At most 5 jobs per organization; closed during the first 7 days of a new organization. Owners and admins only; an API key needs the schedules:write scope.

Scope required for a scoped key: schedules:write

Parameters

Add a scheduled job: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, CreateScheduleDto)

Add a scheduled job: request body
FieldTypeRequiredDescription
commandstringYesShell commands, written to a script file and run with `sh` in the workspace; secrets are injected as for `exec`length: 0–2000 · example: "cd /workspace/app && npm run backup"
cronstringYes5-field cron (minute hour day month weekday), read in Europe/Istanbul; shortest interval 15 minuteslength: 0–120 · example: "0 3 * * *"
namestringYeslength: 0–80 · example: "Nightly backup"
timeoutMinutesnumberNoExec timeout of one run in minutes (at most 60)default: 30 · value: 1–60

Responses

Add a scheduled job: responses
StatusBodyError codes
201 Created{ data: Schedule, meta }—
400 Invalid requestApiErrorVALIDATIONSCHEDULE_CRON_INVALID
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPESCHEDULE_NEW_ORGANIZATION
404 Not foundApiErrorSANDBOX_NOT_FOUND
409 ConflictApiErrorSCHEDULE_LIMIT
429 Too many requestsApiErrorRATE_LIMITED

Get a scheduled job

GET /v1/schedules/{id}

Returns one scheduled job.

Scope required for a scoped key: machines:read

Parameters

Get a scheduled job: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Get a scheduled job: responses
StatusBodyError codes
200 Success{ data: Schedule, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSCHEDULE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Change a scheduled job

PATCH /v1/schedules/{id}

Changes name, cron, command, timeout or enabled. enabled: true clears the failure counter and the disable reason.

Scope required for a scoped key: schedules:write

Parameters

Change a scheduled job: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Request body (JSON, UpdateScheduleDto)

Change a scheduled job: request body
FieldTypeRequiredDescription
commandstringNolength: 0–2000
cronstringNolength: 0–120 · example: "0 3 * * *"
enabledbooleanNo
namestringNolength: 0–80
timeoutMinutesnumberNovalue: 1–60

Responses

Change a scheduled job: responses
StatusBodyError codes
200 Success{ data: Schedule, meta }—
400 Invalid requestApiErrorVALIDATIONSCHEDULE_CRON_INVALID
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSCHEDULE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Delete a scheduled job

DELETE /v1/schedules/{id}

Deletes the job; a run in progress finishes with its own result, no new one starts.

Scope required for a scoped key: schedules:write

Parameters

Delete a scheduled job: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Delete a scheduled job: responses
StatusBodyError codes
204 No content——
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSCHEDULE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Run the job now

POST /v1/schedules/{id}/run

Starts the job at once (also when disabled). The run record returns immediately; follow the result in the run history. When a previous run is still going the record is skipped.

Scope required for a scoped key: schedules:write

Parameters

Run the job now: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Run the job now: responses
StatusBodyError codes
201 Created{ data: ScheduleRun, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSCHEDULE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Run history

GET /v1/schedules/{id}/runs

Returns the last 50 runs of the job, newest first: status, exit code, duration and the last 4 KB of output (known secret values are replaced by ***).

Scope required for a scoped key: machines:read

Parameters

Run history: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Run history: responses
StatusBodyError codes
200 Success{ data: ScheduleRun[], meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSCHEDULE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Create or rotate the trigger token

POST /v1/schedules/{id}/trigger-token

Creates the token for POST /v1/triggers/{id}. The raw token is in this answer only, only its hash is stored; rotating invalidates the previous one at once.

Scope required for a scoped key: schedules:write

Parameters

Create or rotate the trigger token: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Create or rotate the trigger token: responses
StatusBodyError codes
201 Created{ data: TriggerToken, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERFORBIDDEN_ROLESESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorSCHEDULE_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Persistent disk

Show the persistent disk

GET /v1/workspace

Returns the size of your persistent /workspace disk, a pending grow, the sizes your plan allows (20, 50, 100 GB) and the monthly price per GB above 20 GB (kurus; 0 = free). Without a disk, exists is false.

Scope required for a scoped key: machines:read

Responses

Show the persistent disk: responses
StatusBodyError codes
200 Success{ data: WorkspaceSizeSchema, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
429 Too many requestsApiErrorRATE_LIMITED

Make the persistent disk larger

PUT /v1/workspace/size

Sets the persistent disk to 20, 50 or 100 GB; it only grows and the data is kept. Without a disk, it is created with this size and your first machine uses it. Otherwise the new size is applied at the next cold boot of the disk (a new machine after the current one is deleted, or a restart of the machine); pause and resume keep the size. Sending the current size cancels a pending grow.

Scope required for a scoped key: machines:manage

Request body (JSON, UpdateWorkspaceSizeDto)

Make the persistent disk larger: request body
FieldTypeRequiredDescription
sizeGib20 | 50 | 100YesNew size of your persistent /workspace disk in GB (GiB). Grow only; the plan decides the largest size (free: 20). Without a disk yet, it is created with this size and your first machine boots with itexample: 50

Responses

Make the persistent disk larger: responses
StatusBodyError codes
200 Success{ data: WorkspaceSizeSchema, meta }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorCREDIT_INSUFFICIENTWORKSPACE_SIZE_NOT_ALLOWED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
409 ConflictApiErrorWORKSPACE_SHRINK_REFUSEDWORKSPACE_GROW_UNAVAILABLE
429 Too many requestsApiErrorRATE_LIMITED

Agents

List comparisons

GET /v1/agent-run-groups

Returns the organization’s agent comparisons newest first, paginated, each with a summary of its runs. An API key needs the agent_runs:read scope.

Scope required for a scoped key: agent_runs:read

Parameters

List comparisons: parameters
FieldTypeRequiredDescription
pagenumberNoquery parameter · default: 1 · value: 1–…
limitnumberNoquery parameter · default: 20 · value: 1–50

Responses

List comparisons: responses
StatusBodyError codes
200 Success{ data: AgentRunGroup[], meta, pagination: Pagination }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLED
429 Too many requestsApiErrorRATE_LIMITED

Compare agents

POST /v1/agent-run-groups

Runs the same repository and task with 2 to 4 different agents: one run and one machine per agent. The machine limit, balance and spend budget are checked for the whole group first; if they do not cover it nothing starts and nothing is queued (the beta package allows 2 machines at a time). Answers 202 with the queued group at once. An API key needs the agent_runs:write scope.

Scope required for a scoped key: agent_runs:write

Request body (JSON, CreateAgentRunGroupDto)

Compare agents: request body
FieldTypeRequiredDescription
agents"claude-code" | "codex" | "gemini-cli" | "aider" | "opencode"[]YesThe agents to compare: one run (one fresh machine) per agent, same repository and task. Unique; every machine counts against the plan machine limit at the same time (no queueing)items: 2–4 · example: ["claude-code","codex"]
branchstringNoBranch to clone; the default branch when omittedlength: 0–200 · example: "main"
destroyOnFinishbooleanNoDelete the machine when the run ends (default: pause it)default: false
namestringNolength: 0–100 · example: "Date parsing fix"
repoUrlstringYesPublic repository over https on github.com, gitlab.com or bitbucket.org; no user name, password, port or query (400 REPO_URL_INVALID). Private repositories come with the GitHub integration.length: 0–300 · example: "https://github.com/acme/web"
secretsstring[]NoNAMES of the organization secrets the agent needs (its API key). Values never travel in this API. A secret of scope "selected" is linked to this run's machine only; secrets of scope "all" are in every machine of the organization anyway. Use a separate, limited key: the agent (and any code in the repository) can read it.items: 0–10 · example: ["ANTHROPIC_API_KEY"]
size"small" | "medium" | "large"Nodefault: "small"
taskstringYesWhat the agent should do. Written to a file in the machine, never put on a command line.length: 0–8000 · example: "Fix the failing date parsing test and explain the cause in a comment."
timeoutMinutesnumberNoLimit of the agent step (clone and agent) in minutes; the run ends timed_out when it is exceededdefault: 30 · value: 1–60

Responses

Compare agents: responses
StatusBodyError codes
202 Accepted (asynchronous){ data: AgentRunGroup, meta }—
400 Invalid requestApiErrorVALIDATIONREPO_URL_INVALIDAGENT_RUN_SECRET_NOT_FOUND
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorPLAN_LIMIT_MACHINESPLAN_LIMIT_SIZECREDIT_INSUFFICIENTBUDGET_EXCEEDED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLED
409 ConflictApiErrorAGENT_RUN_LIMIT
429 Too many requestsApiErrorRATE_LIMITED

Get a comparison

GET /v1/agent-run-groups/{id}

Returns the runs of a comparison side by side: agent, status, duration, estimated cost, exit code, changed files and diff summary.

Scope required for a scoped key: agent_runs:read

Parameters

Get a comparison: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Get a comparison: responses
StatusBodyError codes
200 Success{ data: AgentRunGroup, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLEDAGENT_RUN_GROUP_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Cancel a comparison

POST /v1/agent-run-groups/{id}/cancel

Cancels every unfinished run of the group; finished runs stay as they are. Answers 409 when all of them have ended.

Scope required for a scoped key: agent_runs:write

Parameters

Cancel a comparison: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Cancel a comparison: responses
StatusBodyError codes
202 Accepted (asynchronous){ data: AgentRunGroup, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLEDAGENT_RUN_GROUP_NOT_FOUND
409 ConflictApiErrorAGENT_RUN_NOT_CANCELLABLE
429 Too many requestsApiErrorRATE_LIMITED

List agent runs

GET /v1/agent-runs

Returns the organization’s agent runs, newest first and paginated; filter by status and agent. An API key needs the agent_runs:read scope.

Scope required for a scoped key: agent_runs:read

Parameters

List agent runs: parameters
FieldTypeRequiredDescription
pagenumberNoquery parameter · default: 1 · value: 1–…
limitnumberNoquery parameter · default: 20 · value: 1–50
status"queued" | "provisioning" | "installing" | "cloning" | "running" | "succeeded" | "failed" | "timed_out" | "cancelled"Noquery parameter
agent"claude-code" | "codex" | "gemini-cli" | "aider" | "opencode"Noquery parameter

Responses

List agent runs: responses
StatusBodyError codes
200 Success{ data: AgentRun[], meta, pagination: Pagination }—
400 Invalid requestApiErrorVALIDATION
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLED
429 Too many requestsApiErrorRATE_LIMITED

Run an agent

POST /v1/agent-runs

Starts the AI agent you chose on a clean machine: it clones a public repository, does the task headless and leaves the result (exit code, changed files, change summary). Answers 202 with the queued run at once. The agent’s key is given by secret name only; the value never travels through this API. An API key needs the agent_runs:write scope.

Scope required for a scoped key: agent_runs:write

Request body (JSON, CreateAgentRunDto)

Run an agent: request body
FieldTypeRequiredDescription
agent"claude-code" | "codex" | "gemini-cli" | "aider" | "opencode"Yesexample: "claude-code"
branchstringNoBranch to clone; the default branch when omittedlength: 0–200 · example: "main"
destroyOnFinishbooleanNoDelete the machine when the run ends (default: pause it)default: false
repoUrlstringYesPublic repository over https on github.com, gitlab.com or bitbucket.org; no user name, password, port or query (400 REPO_URL_INVALID). Private repositories come with the GitHub integration.length: 0–300 · example: "https://github.com/acme/web"
secretsstring[]NoNAMES of the organization secrets the agent needs (its API key). Values never travel in this API. A secret of scope "selected" is linked to this run's machine only; secrets of scope "all" are in every machine of the organization anyway. Use a separate, limited key: the agent (and any code in the repository) can read it.items: 0–10 · example: ["ANTHROPIC_API_KEY"]
size"small" | "medium" | "large"Nodefault: "small"
taskstringYesWhat the agent should do. Written to a file in the machine, never put on a command line.length: 0–8000 · example: "Fix the failing date parsing test and explain the cause in a comment."
timeoutMinutesnumberNoLimit of the agent step (clone and agent) in minutes; the run ends timed_out when it is exceededdefault: 30 · value: 1–60

Responses

Run an agent: responses
StatusBodyError codes
202 Accepted (asynchronous){ data: AgentRun, meta }—
400 Invalid requestApiErrorVALIDATIONREPO_URL_INVALIDAGENT_RUN_SECRET_NOT_FOUND
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
402 Package limitApiErrorPLAN_LIMIT_SIZECREDIT_INSUFFICIENTBUDGET_EXCEEDED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLED
409 ConflictApiErrorAGENT_RUN_LIMIT
429 Too many requestsApiErrorRATE_LIMITED

Get an agent run

GET /v1/agent-runs/{id}

Returns a run’s status, its result (exit code, changed file count, change summary), the failure reason and, for a finished run, the last part of its output.

Scope required for a scoped key: agent_runs:read

Parameters

Get an agent run: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Get an agent run: responses
StatusBodyError codes
200 Success{ data: AgentRun, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLEDAGENT_RUN_NOT_FOUND
429 Too many requestsApiErrorRATE_LIMITED

Cancel an agent run

POST /v1/agent-runs/{id}/cancel

Cancels an unfinished run: the agent’s command is stopped and the machine is paused (deleted with destroyOnFinish). A queued run is cancelled at once; a started one within seconds. A finished run answers 409.

Scope required for a scoped key: agent_runs:write

Parameters

Cancel an agent run: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Cancel an agent run: responses
StatusBodyError codes
202 Accepted (asynchronous){ data: AgentRun, meta }—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLEDAGENT_RUN_NOT_FOUND
409 ConflictApiErrorAGENT_RUN_NOT_CANCELLABLE
429 Too many requestsApiErrorRATE_LIMITED

Follow an agent’s output

GET /v1/agent-runs/{id}/output

Streams the run’s command output as Server-Sent Events (stdout, stderr, exit). Known secret values are masked as ***. A finished run answers its stored tail; 409 while the command has not started.

Scope required for a scoped key: agent_runs:read

Parameters

Follow an agent’s output: parameters
FieldTypeRequiredDescription
idstringYespath parameter · pattern: ^[A-Za-z0-9_-]{1,64}$

Responses

Follow an agent’s output: responses
StatusBodyError codes
200 Successtext/event-stream—
401 Not authenticatedApiErrorSESSION_INVALIDINVALID_API_KEYACCOUNT_SUSPENDEDACCOUNT_INACTIVEACCOUNT_DELETION_PENDINGUNAUTHENTICATED
403 ForbiddenApiErrorEMAIL_NOT_VERIFIEDNOT_A_MEMBERSESSION_REQUIREDINSUFFICIENT_SCOPE
404 Not foundApiErrorAGENT_RUNS_DISABLEDAGENT_RUN_NOT_FOUND
409 ConflictApiErrorINVALID_STATE
429 Too many requestsApiErrorRATE_LIMITED
API endpoints · hadronbox docs