E2B
Create a snapshot
Capture sandbox state and return a platform snapshot ID and user aliases.
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
POST
/e2b/sandboxes/{sandboxID}/snapshots● SupportedRequest parameters
sandboxIDstring必填path:
namestring可选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
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) |