Partially update a running sandbox
Applies a partial update to a running sandbox. Each top-level field in the request body is optional; only fields that are present are applied. Omitted top-level 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 present, otherwise the request
is rejected with 400. Unknown top-level fields are also rejected
with 400 so typos surface as errors instead of silent no-ops.
Currently patchable fields
network— replaces the egress allow/deny rules. The sandbox must be in theactivestate; patching a paused sandbox returns409. Rules take effect immediately and are persisted so they survive a future pause/resume cycle.metadata— replaces the sandbox’s metadata tags. Can be updated regardless of sandbox state (active, paused).auto_delete_seconds— sets or clears (null) the garbage-collection window for the paused state. Can be updated regardless of sandbox state. When applied to an already-paused sandbox, the deletion deadline counts from the moment of this request — never retroactively from when the sandbox paused — so you always get the full window.timeout_seconds— sets or clears (null) the auto-pause timeout. Can be updated regardless of sandbox state; on a paused sandbox it applies to the next active session. The timeout is evaluated against the current active session, so lowering it below already-elapsed time pauses the sandbox promptly.preview_access— sets the default access mode for ports published in the future. Existing per-port modes are unchanged. It also moves an olderlegacy_publicsandbox to strict routing.legacy_publiccannot be selected.
Authorizations
Path Parameters
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.
^(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
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.
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.
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).
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).
0 <= x <= 2592000Set 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).
1 <= x <= 604800Set 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.
public, private Response
Patch applied