Skip to main content
POST
Snapshot a sandbox

Authorizations

X-API-Key
string
header
required

Path Parameters

sandbox_id
string
required

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.

Pattern: ^(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

application/json
kind
enum<string>
default:mem+fs

mem+fs captures memory and disk. A disk-only kind is not offered yet.

Available options:
mem+fs
name
string

Optional label. Can be changed later with PATCH.

Required string length: 1 - 64
idempotency_key
string

Caller-chosen key, unique per sandbox. A retry carrying the same key returns the snapshot the first request made.

Required string length: 1 - 255

Response

A snapshot an earlier request with the same idempotency_key made

id
string<uuid>
required
sandbox_id
string<uuid>
required

The sandbox the snapshot was taken from. It may since have been deleted.

kind
enum<string>
required
Available options:
mem+fs
status
enum<string>
required
Available options:
creating,
ready,
failed,
deleting
size_bytes
integer<int64>
required

Bytes the snapshot holds on disk; 0 until ready.

resources
object
required
created_at
string<date-time>
required
template_id
string<uuid> | null

The template the captured sandbox was created from.

name
string | null
ready_at
string<date-time> | null