Skip to main content
PATCH
Partially update a running sandbox

Authorizations

X-API-Key
string
header
required

Path Parameters

sandbox_id
string
required

The unique identifier of the sandbox. Public sandbox ID: a bare UUID, or the region-tagged form sb-<region>-<uuid> (e.g. sb-use-1b4e28ba-…). Treat as an opaque string; the tagged form routes the request to the sandbox's home region. Endpoints accept both forms interchangeably.

Pattern: ^(sb-[a-z0-9]+-)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Body

application/json

Partial update body for PATCH /sandboxes/{sandbox_id}. Each top-level field is optional; only fields that are present are applied. Omitted fields are left unchanged. Nested objects are full replacements when present — to clear a list, send it as an empty array.

At least one top-level field must be set, otherwise the request is rejected with 400. Unknown fields are also rejected with 400.

network
object

Replace the sandbox's egress rules. The sandbox must be in the active state. The provided allow_out and deny_out lists fully replace whatever was previously configured.

metadata
object

Replace the sandbox's metadata tags. Fully replaces the existing metadata — omitted keys are removed. Can be patched regardless of sandbox state. Same validation limits as on create (64 keys, 256-byte keys, 2 KB values, 16 KB total).

auto_delete_seconds
integer<int32> | null

Set or clear the garbage-collection window for the paused state. Once the sandbox has been continuously paused for this many seconds it is deleted automatically. 0 deletes as soon as the sandbox pauses; null disables auto-delete. On an already-paused sandbox the deadline counts from this request, so the sandbox gets the full window. Maximum 2592000 (30 days).

Required range: 0 <= x <= 2592000
timeout_seconds
integer<int32> | null

Set or clear the auto-pause timeout. Same semantics as on create; null disables auto-pause. Evaluated against the current active session, so lowering it below already-elapsed time pauses the sandbox promptly. Maximum 604800 (7 days).

Required range: 1 <= x <= 604800
preview_access
enum<string>

Set the default access for newly published ports and move a legacy sandbox to strict routing. Existing per-port modes are unchanged. legacy_public cannot be selected through the API.

Available options:
public,
private

Response

Patch applied