POST /v1/sandboxes/{sandbox_id}/pause
Freezes the sandbox's vCPUs and keeps its memory and disk on the node. A paused sandbox bills no CPU time and still counts allocated memory; it still expires at `expires_at`. Resume continues exactly where it stopped. Pausing a paused sandbox returns it unchanged.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)

Path Parameters

sandbox_id string required path
The sandbox ID (`sbx_…`).
Example: "sbx_01m5t68q1b590rj801nbzsqzkk"

Responses

200 The paused sandbox.
application/json
id string REQUIRED
object string REQUIRED
Enum: sandbox
status string REQUIRED
`running` → `paused` ↔ `running` → `stopped`. `failed` means the microVM crashed; its usage is final.
Enum: running, paused, stopped, failed
host_id string REQUIRED
The ID in host-safe form, used in port URLs.
template object REQUIRED
id string REQUIRED
name string REQUIRED
snapshot string | null REQUIRED
The snapshot the sandbox was restored from.
vcpu integer REQUIRED
memory_mib integer REQUIRED
disk_gib integer REQUIRED
timeout_s integer REQUIRED
on_idle string REQUIRED
Enum: stop, pause
expires_at string (date-time) REQUIRED
env object REQUIRED
secret_names string[] REQUIRED
Names of the variables set from `secrets` (values are never returned).
Array of: string
ports object[] REQUIRED
Array of:
port integer REQUIRED
public boolean REQUIRED
url string (uri) | null REQUIRED
Public ports: the long-lived preview URL, token included. Private ports: `null`; mint a URL with `POST /v1/sandboxes/{sandbox_id}/ports/{port}/url`.
api object REQUIRED
scopes string[] REQUIRED
Array of: string
spend_cap_usd number | null REQUIRED
The grant's own cap, or `null` when the creating principal's cap applies.
connections string[] REQUIRED
Array of: string
egress object REQUIRED
mode string REQUIRED
Enum: public, allowlist, deny
allow string[] REQUIRED
Array of: string
forkable boolean REQUIRED
created_at string (date-time) REQUIRED
started_at string (date-time) REQUIRED
paused_at string (date-time) | null REQUIRED
stopped_at string (date-time) | null REQUIRED
stop_reason string | null REQUIRED
Why the sandbox stopped.
Enum: deleted, timeout, failed, null
usage object REQUIRED
vcpu_ms integer REQUIRED
gib_ms integer REQUIRED
timing object
Server-side phase durations in milliseconds with microsecond resolution: the same phases as the `Server-Timing` header, keyed `<phase>_ms`. `total_ms` is always present. Phase names are product-specific and documented per operation. Example values in this reference are illustrative, not measurements.
total_ms number REQUIRED
metadata object REQUIRED
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of `A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
400 The request failed validation (`invalid_request`, `invalid_url`).
401 Missing, malformed, expired or revoked credentials (`unauthorized`).
403 Authenticated but not allowed (`forbidden`, `egress_denied`).
404 No such sandbox in this project (`sandbox_not_found`).
409 The sandbox is paused or stopped (`sandbox_not_running`).
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X POST 'https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/pause' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/pause', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/sandboxes/sbx_01m5t68q1b590rj801nbzsqzkk/pause', headers=headers)print(response.json())
200 Response
{  "id": "sbx_01m5t68q1b590rj801nbzsqzkk",  "object": "sandbox",  "status": "paused",  "host_id": "sbx-01m5t68q1b590rj801nbzsqzkk",  "template": {    "id": "tpl_01m5t59b2ps0djyzdf082s18bz",    "name": "base"  },  "snapshot": null,  "vcpu": 2,  "memory_mib": 2048,  "disk_gib": 4,  "timeout_s": 900,  "on_idle": "stop",  "expires_at": "2026-10-25T19:15:00.004Z",  "env": {},  "secret_names": [],  "ports": [],  "api": {    "scopes": [],    "spend_cap_usd": null,    "connections": []  },  "egress": {    "mode": "public",    "allow": []  },  "forkable": false,  "created_at": "2026-10-25T19:00:00.000Z",  "started_at": "2026-10-25T19:00:00.004Z",  "paused_at": "2026-10-25T19:02:00.000Z",  "stopped_at": null,  "stop_reason": null,  "usage": {    "vcpu_ms": 2100,    "gib_ms": 245760  },  "timing": {    "pause_ms": 0.4,    "total_ms": 0.6  },  "metadata": {}}
Ask a question... ⌘I