Create a snapshot
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
POST
/e2b/sandboxes/{sandboxID}/snapshots● SupportedRequest parameters
sandboxIDstringrequiredpath:
namestringoptionalOptional 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/e2b/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.
from e2b import Sandbox
opts = dict(
api_key="$PRAXIS_API_KEY",
api_url="https://api.deepraxis.com/e2b",
domain="sandbox.praxisusercontent.com",
)
snapshot = Sandbox.create_snapshot("sbx_123", name="docs-snapshot", **opts)
print(snapshot.snapshot_id)TypeScript
// Call Create sandbox first and replace sbx_123 with its returned sandboxID.
import { Sandbox } from "e2b";
const opts = {
apiKey: "$PRAXIS_API_KEY",
apiUrl: "https://api.deepraxis.com/e2b",
domain: "sandbox.praxisusercontent.com",
};
const snapshot = await Sandbox.createSnapshot("sbx_123", { ...opts, name: "docs-snapshot" });
console.log(snapshot.snapshotId);Response 201
{
"snapshotID": "snap_735727a527a84804976adbdb",
"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) |