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

## Changes

- **2026-08-20** `e01b3f5506fe` — 7 info
  - added the non-success response with the status `409`
  - added the non-success response with the status `503`
  - added the non-success response with the status `504`
  - added the optional property `error_code` to the response with the `400` status
  - …3 more
- **2026-07-24** `93ed246a4c10` — 2 info
  - the endpoint scheme security `AdminApiKeyAuth AND AdminTeamAuth` was added to the API
  - the endpoint scheme security `Supabase1TokenAuth AND Supabase2TeamAuth` was removed from the API
- **2026-05-27** `e13ef89d456c` — 1 info
  - the endpoint scheme security `AuthProviderBearerAuth AND AuthProviderTeamAuth` was added to the API
- **2025-11-15** `9fdd20bda2bb` — 2 info
  - added the optional property `trafficAccessToken` to the response with the `200` status
  - added the optional property `trafficAccessToken` to the response with the `201` status
- **2025-10-31** `8ee0d0d1e95e` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/e2b-dev/apis/e2b-api/changes/sandboxes/:sandboxID/connect/post.md)

---

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