Skip to main content
DELETE
Delete a sandbox, its system files and its storage.

Authorizations

Authorization
string
header
required

Opaque instabox access token (1 hour). Refresh with /v1/auth/refresh (refresh token valid 30 days, rotates on use).

Headers

Idempotency-Key
string
required

Client-generated key, 1-200 printable ASCII characters, scoped to the user. Same key and same method+path+body returns the original response; same key with a different request returns 409 idempotency_conflict. Records are kept for 7 days.

Required string length: 1 - 200
Pattern: ^[\x21-\x7e]+$
X-Confirm-Delete
string

Guard against deleting the wrong resource: the ID or the exact name of the sandbox or snapshot being deleted. When sent, any other value (empty, another resource's name or ID, or the header twice) is 409 delete_confirmation_required and nothing is deleted; the Idempotency-Key can then be reused. A sandbox delete with an API key created on or after the server's confirmDeleteKeysFrom cutover must send it (without it: the same 409, naming the ID to send); otherwise, without the header, the delete proceeds as before (an API key's response then carries a Warning header). The instabox CLI, the SDKs, the hosted MCP server and the dashboard send it.

Path Parameters

id
string
required

Sandbox ID (m_ + 26 lowercase base32 characters).

Pattern: ^m_[a-z2-7]{26}$

Response

The mutation was accepted (or replayed for the same idempotency key). Poll the operation.

The progress of a change to a sandbox (suspend is pause; restore puts its disks back to a snapshot's; move, admin only, copies it to another host pool). It does not return the request it was queued with (a start's vcpus/memMiB show in the sandbox's spec).

id
string
required
machineId
string
required
type
enum<string>
required
Available options:
create,
start,
stop,
suspend,
resume,
delete,
restore,
resize,
move
state
enum<string>
required

succeeded and failed are terminal.

Available options:
queued,
running,
succeeded,
failed
error
object | null
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
phase
string

Free text progress, e.g. scheduling, booting, waiting_ready, snapshotting.

forkInherited
boolean

On the answer to POST /v1/machines/{id}/fork: the control host that took it keeps the source's delete deadline, idle auto-suspend, max run and metadata, and takes autoSuspendAfterSeconds and maxRunMinutes. Absent: a host from before that (during a rolling control deploy), which gave the fork its defaults with only the request's metadata and deleteAfterSeconds; set the idle auto-suspend and max run with PATCH /v1/machines/{id}.

trigger
enum<string>

Set when instabox started the operation itself: idle (paused when idle), max_run (maximum continuous runtime), memory_pressure (paused, its processes kept, because the host it ran on was running out of memory; the next use wakes it, as after idle), request (wake on use), wake (POST /v1/machines/{id}/wake), timeout, archive, delete_at (the sandbox's deleteAt passed), drain (maintenance by an admin), user_delete (an admin deleted the owner), user_disable (an admin disabled the owner), admin (an admin stopped or paused the sandbox), admin_delete (an admin deleted the sandbox), credit (its free-tier org used up the month's included usage), spend_cap, downgrade, subscription_ended, payment_method (its free workspace has no card on file), members (its free workspace has more members than the free plan allows), early_allowance_ended (paused because the account's early free-sandbox allowance ended and it has more free sandboxes than the free plan runs), abuse_pool (paused because the sandbox tried to connect to a blocked destination on the egress blocklist, such as a crypto-mining pool; a DNS lookup of a listed domain never suspends) or abuse_cpu (paused by the CPU abuse detector: a restricted account's sandbox ran flat out for an hour with no memory use, no public port, nobody using it and a connection to a mining port) or abuse_scan (paused by the flow detector: a restricted account's sandbox swept one port across many hosts, scanned many ports of one host or brute-forced a login port). Absent: a client request.

Available options:
idle,
max_run,
memory_pressure,
timeout,
archive,
delete_at,
drain,
request,
wake,
user_delete,
user_disable,
admin,
admin_delete,
credit,
spend_cap,
downgrade,
subscription_ended,
payment_method,
members,
early_allowance_ended,
abuse_pool,
abuse_cpu,
abuse_scan,
abuse_proxy
machine
object

The sandbox as it is when GET /v1/operations/{id} is read. Included when the operation succeeded, the sandbox still exists, and the caller may read sandboxes (machines:read for API keys). Later operations can change it; it is not a record of the state at completion. Absent otherwise, and from older servers.