---
title: "Mint a single-use web terminal ticket"
method: POST
path: "/api/v0beta1/rigs/{id}/terminal-tickets"
tags: ["Sandboxes"]
---

# Mint a single-use web terminal ticket

`POST /api/v0beta1/rigs/{id}/terminal-tickets`

## Request

- Base URL: `https://app.amika.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://app.amika.dev/api/v0beta1/rigs/{id}/terminal-tickets`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `wos-session`

Returns a short-lived, single-use credential for one web terminal WebSocket upgrade. The upgrade cannot use the browser's session cookie, because browsers do not apply the same-origin policy to WebSockets.

## Path parameters

- `id` string, required

## Query parameters

- `sandbox_by` 'name' | 'id' | 'ref' | 'name_or_id': How to interpret the sandbox `{id}` path param: ref/name_or_id (default; matches an id or a name and rejects an ambiguous match with 409 `resource_ref_ambiguous`), name, or id.

## Response `200`

One single-use terminal ticket.

- TerminalTicketResponse
  - `ticket` string, required
  - `org_id` string, required

## Other responses

- `400`: Error
- `401`: Error
- `403`: Error
- `404`: Error
- `409`: Error

## Changes

- **2026-10-23** `c46868fd7b41`: 1 info
  - added the new optional `query` request parameter `sandbox_by`
- **2026-09-16** `25ba06b40ead`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/amika/apis/amika-api/changes/api/v0beta1/rigs/:id/terminal-tickets/post.md)

---

[API](https://skmtc.dev/amika/apis/amika-api.md) - [All operations](https://skmtc.dev/amika/apis/amika-api/llms.txt) - [OpenAPI document](https://skmtc.dev/amika/apis/amika-api/revisions/86f031a957c1?raw)
