Put a sandbox to sleep
Snapshots the sandbox, releases its machine and ends machine-time billing. A sleeping sandbox reports status stopped and keeps everything for wake. An ephemeral sandbox has no snapshot to keep, so sleeping ends it.
Authorization
bearerAuth A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/sandboxes/string/sleep"{ "sandbox": { "id": "string", "org_id": "string", "project_id": "string", "name": "string", "agent": "claude", "status": "provisioning", "mode": "persistent", "region": "string", "persistence_policy": "throwaway_ephemeral", "sandbox_profile": "string", "machine_size": "small", "provider": "string", "vmm": "string", "allocated_vcpu": 0, "allocated_memory_gb": 0, "allocated_disk_gb": 0, "end_user_id": "string", "vm_lost_at": "string", "environment_id": "string", "disk": { "usedBytes": 0, "totalBytes": 0, "availableBytes": 0, "warning": 80, "sampledAt": "string" }, "created_at": "string", "updated_at": "string" }}Create a sandbox POST
`agent` (`claude` or `codex`) and `projectId` are required; every other field falls back to the project's defaults, the selected profile, or a server-generated value. `profile` picks a workload shape (`auto`, `agent-small`, `agent-standard`, `build-heavy`, `browser-heavy`, `repo-large` or `long-running`), and `machineSize` overrides its initial machine tier. `region` picks where it runs; an unavailable region is refused rather than replaced. Infrastructure tier comes from the org's plan. `endUserId` and `metadata` attribute the sandbox to one of your own users. The sandbox is returned while it is still provisioning; poll GET /sandboxes/{sandboxId} until it is ready.
Stop a sandbox POST
Deprecated: use POST /sandboxes/{sandboxId}/sleep.