Skip to main content
POST
/
sandboxes
/
{sandboxID}
/
snapshots
cURL
curl --request POST \
  --url https://api.e2b.app/sandboxes/{sandboxID}/snapshots \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>"
}
'
{
  "snapshotID": "<string>",
  "names": [
    "<string>"
  ]
}

Authorizations

X-API-Key
string
header
required

Path Parameters

sandboxID
string
required

Body

application/json
name
string

Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one.

Response

Snapshot created successfully

snapshotID
string
required

Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default).

names
string[]
required

Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2)