Sandbox
Fork a sandbox
Create independent copies of a running sandbox.
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
POST
/sandbox/v1/sandboxes/{sandboxID}/fork● SupportedRequest parameters
sandboxIDstring必填path: Sandbox ID.
timeoutinteger可选Time to live for each fork in seconds.
countinteger可选Number of independent forks from one snapshot; each entry reports its own result or error.
Returns
201
Errors follow the E2B format — see error codes
Response
HTTP 201
The sandbox was snapshotted and the forks were attempted; each entry reports one fork's outcome
application/json
| Name | Type | Description |
|---|---|---|
| [].sandbox | object | Sandbox created from a template. |
| [].sandbox.templateID | string | Identifier of the template from which is the sandbox created |
| [].sandbox.sandboxID | string | Identifier of the sandbox |
| [].sandbox.alias | string | Alias of the template |
| [].sandbox.clientID | string | Identifier of the client |
| [].sandbox.envdVersion | string | Version of the envd running in the sandbox |
| [].sandbox.envdAccessToken | string | Access token used for envd communication |
| [].sandbox.trafficAccessToken | string | Token required for accessing sandbox via proxy. |
| [].sandbox.domain | string | Domain returned for sandbox traffic. Build an HTTP service URL as https://<port>-<sandboxID>.<domain> using the returned values, without replacing or stripping the sandboxID suffix. |
| [].error | object | Error body: numeric code, machine-readable error_code and a message. |
| [].error.code | integer | Error code |
| [].error.error_code | string | Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed, internal_server_error. |
| [].error.message | string | Human-readable description of the error. |