---
title: "Attach an interactive terminal to a sandbox."
method: GET
path: "/v1/sandboxes/{id}/terminal"
tags: ["Sandboxes"]
---

# Attach an interactive terminal to a sandbox.

`GET /v1/sandboxes/{id}/terminal`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/sandboxes/{id}/terminal`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Query parameters

- `tab` string
- `cmd` string
- `cols` integer
- `rows` integer

## Other responses

- `101`: WebSocket established; PTY attached
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Sandbox not found
- `409`: Terminal unavailable: the sandbox is not running, or its backend's guest terminal agent is missing (the problem detail names the fix)
- `429`: Too many concurrent terminals for this instance or account
- `504`: The sandbox's guest did not accept a terminal in time

## Changes

- **2026-10-13** `254018aa8095`: 2 info
  - added the non-success response with the status `429`
  - added the non-success response with the status `504`
- **2026-09-07** `0b0da657c926`: 1 info
  - endpoint added
- **2026-09-07** `f7404eb7ac98`: 1 breaking
  - api path removed without deprecation
- **2026-08-08** `4875565df279`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/v1/sandboxes/:id/terminal/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
