Skip to main content
POST
/
sandboxes
/
{sandboxID}
/
connect
Connect to sandbox
curl --request POST \
  --url https://api.e2b.app/sandboxes/{sandboxID}/connect \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "timeout": 1
}'
{
  "templateID": "<string>",
  "sandboxID": "<string>",
  "clientID": "<string>",
  "envdVersion": "<string>",
  "alias": "<string>",
  "envdAccessToken": "<string>",
  "trafficAccessToken": "<string>",
  "domain": "<string>"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

sandboxID
string
required

Body

application/json
timeout
integer<int32>
required

Timeout in seconds from the current time after which the sandbox should expire

Required range: x >= 0

Response

The sandbox was already running

templateID
string
required

Identifier of the template from which is the sandbox created

sandboxID
string
required

Identifier of the sandbox

clientID
string
required
deprecated

Identifier of the client

envdVersion
string
required

Version of the envd running in the sandbox

alias
string

Alias of the template

envdAccessToken
string | null

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).

trafficAccessToken
string | null

Token required for accessing sandbox via proxy.

domain
string | null
deprecated

Deprecated: always null. Construct sandbox URLs as https://{port}-{sandboxID}.e2b.app.