Snapshot a sandbox
A `running` sandbox pauses briefly (`operation: snapshotting`).
A running sandbox pauses briefly (operation: snapshotting). A sleeping or stopped sandbox is saved as it is: disk only, unless it sleeps with tier: disk. A sandbox made with no_save refuses every key but its creator's with saves_refused. A sandbox with a throwaway disk is saved the same way, memory included, by the key that created it; the snapshot restores at the same size.
A key with the snapshots:write scope.
Request
curl -X POST "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/snapshots" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"before-upgrade"}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
sandbox_id | path | string | Yes | |
Pod-End-User | header | string | No | Narrows a project key to one of its end users: the call sees only that end user's sandboxes and usage, any other answering not_found, and a create is labelled with it. An end user of another project, or one that is not there, is not_found; a suspended one refuses creates and wakes (account_restricted). |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
wait | query | boolean | No | Wait for the result instead of answering 202 with an operation. |
wait_timeout_s | query | integer | No | How long wait=true waits before answering 202 after all. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
kind | "disk" | "disk_and_memory" | No | disk_and_memory by default on a running sandbox; a stopped one saves disk. |
name | string | No |
Answer
201. With wait=true, the snapshot, ready.
202. The work started; follow the operation.
{
"id": "snp_3ahrz6dmv29gqy5ckt18fpx4b",
"sandbox": "sbx_3ahrz6dmv29gqy5ckt18fpx4b",
"project": "prj_3ahrz6dmv29gqy5ckt18fp",
"kind": "disk",
"name": null,
"state": "creating",
"size_bytes": null,
"created_at": "2026-11-23T12:00:00.000Z"
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | |
sandbox | string | Yes | |
project | string | Yes | |
kind | "disk" | "disk_and_memory" | Yes | |
name | string | null | Yes | |
state | "creating" | "ready" | "failed" | "deleting" | Yes | |
size_bytes | integer | null | Yes | At least 0. |
created_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
Errors
The refusals this call is known for: invalid, saves_refused, conflict, not_found, in_other_cell. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | sandbox.snapshot({ … }) |
| Python | sandbox.snapshot(…) |
| mpod | mpod sandboxes snapshot <sandbox> |