Skip to content
中文

Create a snapshot

Call Create sandbox first and replace sbx_123 with its returned sandboxID.

POST/sandbox/v1/sandboxes/{sandboxID}/snapshots● Supported

Official E2B docs ↗

Request parameters

  • sandboxIDstringrequired

    path: Sandbox ID.

  • namestringoptional

    Optional alias. Reusing it within your subject updates the existing snapshot and retains its platform ID.

Returns

201

Errors follow the E2B format — see error codes

Request

curl
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
curl https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/snapshots \
  -H "X-API-Key: $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"docs-snapshot"}'
Python
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
import requests

api_key = "$PRAXIS_API_KEY"

# Call /sandbox/v1 directly over HTTP.
resp = requests.post(
    "https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/snapshots",
    headers={"X-API-Key": api_key},
    json={"name": "docs-snapshot"},
)
print(resp.status_code, resp.text)
TypeScript
// Call Create sandbox first and replace sbx_123 with its returned sandboxID.
const apiKey = "$PRAXIS_API_KEY";

// Call /sandbox/v1 directly over HTTP.
const resp = await fetch(`https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/snapshots`, {
  method: "POST",
  headers: { "X-API-Key": apiKey, "Content-Type": "application/json" },
  body: JSON.stringify({ name: "docs-snapshot" }),
});
console.log(resp.status, await resp.text());

Response 201

{
  "snapshotID": "snap_2fe37d98fa394c04bfbc670d",
  "names": [
    "docs-snapshot"
  ]
}

Response

HTTP 201

Snapshot created successfully

application/json

Name Type Description
snapshotID string 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 array<string> Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2)

The own endpoint adds createdAt (string, ISO 8601 UTC creation time) to the response, or each list row.

Snapshots also include sourceSandboxID (string, public source sandbox ID) and sourceSandboxName (string or null). If the name is unavailable, it is null; display the ID as fallback.

The gateway sets X-Praxis-Face: own-v1; clients need not send it. The /e2b compatibility endpoint strips this header and retains its vendor response shape.

Send {"name":"my-snapshot"} in the JSON body of POST /sandbox/v1/sandboxes/{sandboxID}/snapshots to name a snapshot. The name is persisted and returned in names.