/v1/sandboxes. Requests require authentication and are scoped to the caller’s organization.
Create sandbox
Template name or ID to boot from.
ephemeral or persistent.Duration until auto-destroy (ephemeral only). Examples:
5m, 1h, 30s. Max: 24h.Duration of inactivity before auto-suspend (persistent only).
Environment variables as key-value pairs.
Arbitrary metadata as key-value pairs.
Outbound firewall policy. If omitted, the template’s default egress policy is used (which itself defaults to
allow_all). See Egress controls.mode(string, required) —allow_allordeny_allallow_cidrs(string[]) — CIDRs to allow when mode isdeny_alldeny_cidrs(string[]) — CIDRs to explicitly block (evaluated before allows)allow_ports(integer[]) — Restrictallow_cidrsto these destination TCP ports
| Status | Condition |
|---|---|
201 | Sandbox created |
400 | Invalid mode, size, timeout, or egress policy |
404 | Template not found |
List sandboxes
Returns all non-destroyed sandboxes for the caller’s organization.Filter by status:
creating, running, suspended, destroyed.Get sandbox
| Status | Condition |
|---|---|
200 | OK |
403 | Sandbox belongs to different organization |
404 | Sandbox not found |
Destroy sandbox
204 No Content on success. Idempotent — safe to call multiple times.
Keepalive
Extend the expiry of an ephemeral sandbox.New timeout duration from now. Max:
24h.| Status | Condition |
|---|---|
200 | Timeout extended |
409 | Not ephemeral, or not running |
Wake sandbox
Wake a suspended persistent sandbox.| Status | Condition |
|---|---|
200 | Sandbox woken (or was already running) |
409 | Sandbox is in a state that cannot be woken |
Execute command
Run a command inside a running sandbox.The shell command to execute.
Execution timeout. Max:
5m.Working directory for the command.
Additional environment variables for this execution.
| Status | Condition |
|---|---|
200 | Command completed (check exit_code for success/failure) |
400 | Missing command or invalid timeout |
409 | Sandbox not running |
Upload file
Write a file to the sandbox filesystem.| Status | Condition |
|---|---|
204 | File uploaded |
400 | Invalid path (root, contains ..) or exceeds 100 MB |
409 | Sandbox not running |
Download file
Read a file from the sandbox filesystem.Content-Type: application/octet-stream.
| Status | Condition |
|---|---|
200 | File contents |
404 | File not found |
409 | Sandbox not running |