---
title: "Connect sandbox"
method: POST
path: "/sandboxes/{sandboxID}/connect"
tags: ["sandboxes"]
---

# Connect sandbox

`POST /sandboxes/{sandboxID}/connect`

Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.

## Path parameters

- `sandboxID` string, required

## Request body

- ConnectSandbox
  - `timeout` integer, required — Timeout in seconds from the current time after which the sandbox should expire

## Response `200`

The sandbox was already running

- Sandbox
  - `templateID` string, required — Identifier of the template from which is the sandbox created
  - `sandboxID` string, required — Identifier of the sandbox
  - `alias` string — Alias of the template
  - `clientID` string, required — Identifier of the client
  - `envdVersion` string, required — Version of the envd running in the sandbox
  - `envdAccessToken` string — Access token used for envd communication
  - `trafficAccessToken` string, nullable — Token required for accessing sandbox via proxy.
  - `domain` string, nullable — Base domain where the sandbox traffic is accessible

## Other responses

- `201` — The sandbox was resumed successfully
- `400` — Bad request
- `401` — Authentication error
- `404` — Not found
- `409` — Conflict
- `500` — Server error
- `503` — Service unavailable
- `504` — Backend timeout

---

[API](https://skmtc.dev/e2b-dev/apis/e2b-api.md) · [All operations](https://skmtc.dev/e2b-dev/apis/e2b-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/e2b-dev/e2b-api/revisions/e01b3f5506fe/schema)
