Maintenance May 12, 8–9 PM PDT (May 13, 03:00–04:00 UTC). ~1 min disruption to sandbox management may occur. Already running sandboxes will not be affected. Questions? Contact us
Maintenance May 12, 8–9 PM PDT (May 13, 03:00–04:00 UTC). ~1 min disruption to sandbox management may occur. Already running sandboxes will not be affected. Questions? Contact us
Create a sandbox from the template
curl --request POST \
--url https://api.e2b.app/sandboxes \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"templateID": "<string>",
"timeout": 15,
"autoPause": false,
"secure": true,
"allow_internet_access": true,
"network": {
"allowPublicTraffic": true,
"allowOut": [
"<string>"
],
"denyOut": [
"<string>"
],
"maskRequestHost": "<string>"
},
"metadata": {},
"envVars": {},
"mcp": {},
"volumeMounts": [
{
"name": "<string>",
"path": "<string>"
}
]
}
'{
"templateID": "<string>",
"sandboxID": "<string>",
"clientID": "<string>",
"envdVersion": "<string>",
"alias": "<string>",
"envdAccessToken": "<string>",
"trafficAccessToken": "<string>",
"domain": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://e2b-banner-hover-tooltip.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Identifier of the required template
Time to live for the sandbox in seconds.
x >= 0Automatically pauses the sandbox after the timeout
Auto-resume configuration for paused sandboxes.
Show child attributes
Secure all system communication with sandbox
Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config.
Show child attributes
Show child attributes
Show child attributes
MCP configuration for the sandbox
Show child attributes
Show child attributes
The sandbox was created successfully
Identifier of the template from which is the sandbox created
Identifier of the sandbox
Identifier of the client
Version of the envd running in the sandbox
Alias of the template
Access token for authenticating envd requests to this sandbox. Only returned when the sandbox is created with secure: true. Null for non-secure sandboxes (envd endpoints work without auth).
Token required for accessing sandbox via proxy.
Deprecated: always null. Construct sandbox URLs as https://{port}-{sandboxID}.e2b.app.
Was this page helpful?
curl --request POST \
--url https://api.e2b.app/sandboxes \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"templateID": "<string>",
"timeout": 15,
"autoPause": false,
"secure": true,
"allow_internet_access": true,
"network": {
"allowPublicTraffic": true,
"allowOut": [
"<string>"
],
"denyOut": [
"<string>"
],
"maskRequestHost": "<string>"
},
"metadata": {},
"envVars": {},
"mcp": {},
"volumeMounts": [
{
"name": "<string>",
"path": "<string>"
}
]
}
'{
"templateID": "<string>",
"sandboxID": "<string>",
"clientID": "<string>",
"envdVersion": "<string>",
"alias": "<string>",
"envdAccessToken": "<string>",
"trafficAccessToken": "<string>",
"domain": "<string>"
}