sandboxes

Connect sandbox (v2)

Changed on

Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. The request body is optional; an omitted timeout defaults to 300 seconds.

post/v2/sandboxes/{sandboxID}/connect

Request

  • Base URL
    https://api.e2b.app
  • URL
    https://api.e2b.app/v2/sandboxes/{sandboxID}/connect
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer and API key in header X-Team-ID
    • or API key in header X-Admin-Token and API key in header X-Team-ID
    • or HTTP bearer and API key in header X-Team-ID

Path parameters

sandboxIDstring required

Request body

timeoutinteger

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

memoryboolean

Defaults to true. When false and the sandbox is paused, resume from disk state only: the sandbox cold-boots fresh and any memory in the snapshot is ignored, never modified or deleted. Disk state has crash-recovery semantics — writes not flushed before the pause may be lost. A no-op for snapshots that contain no memory. Rejected with an error in environments where this capability is not enabled, never silently downgraded to a memory restore.

Response

The sandbox was already running

templateIDstring required

Identifier of the template from which is the sandbox created

sandboxIDstring required

Identifier of the sandbox

aliasstring

Alias of the template

clientIDstring required

Identifier of the client

envdVersionstring required

Version of the envd running in the sandbox

envdAccessTokenstring

Access token used for envd communication

trafficAccessTokenstring nullable

Token required for accessing sandbox via proxy.

domainstring nullable

Base domain where the sandbox traffic is accessible

Changes