Make a ticket that lets a browser open the screen's stream

A short-lived, single-use ticket for this sandbox's screen stream (`streamScreen`), with the same rules as a command's ticket (`createExecStreamTicket`): bound to the screen, the caller, the organization and project, `origin` and an expiry of at most 60 seconds; a person's token may name only Pod's own clients' origins; a call that carries `Origin` must name it.

POST/v1/sandboxes/{sandbox_id}/screen/stream-ticket

Not available yet The API does not serve a screen's tree, live stream, takeovers, watch links or recordings yet.

A short-lived, single-use ticket for this sandbox's screen stream (streamScreen), with the same rules as a command's ticket (createExecStreamTicket): bound to the screen, the caller, the organization and project, origin and an expiry of at most 60 seconds; a person's token may name only Pod's own clients' origins; a call that carries Origin must name it. The dashboard's page asks for it itself when the sandbox is in a customer cell, at the cell's endpoint. mode is watch by default. A takeover ticket also carries the input, and only the person who holds the screen's takeover may ask for one (forbidden otherwise); it ends with the takeover. The answer is a secret: Cache-Control: no-store, never logged, never kept for a replay, so the call takes no Idempotency-Key. A caller holds at most 20 unused tickets.

A key with the screen:read scope.

Request

curl -X POST "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/screen/stream-ticket" \
  -H "Authorization: Bearer $POD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"origin":"example"}'

Parameters

NameInTypeRequiredWhat it is
sandbox_idpathstringYes

Body

FieldTypeRequiredWhat it is
originstringYesThe origin of the page that will open the stream. The upgrade's Origin must equal it.
ttl_sintegerNoDefault 30. From 1 to 60.
mode"watch" | "takeover"No

Answer

201. The ticket.

201
{
  "ticket": "pod_3ahrz6dmv29gqy5ckt18fpx4bjs07enw3ahrz6dm",
  "stream": "screen",
  "sandbox": "sbx_3ahrz6dmv29gqy5ckt18fpx4b",
  "mode": "watch",
  "organisation": "org_3ahrz6dmv29gqy5ckt18fp",
  "project": "prj_3ahrz6dmv29gqy5ckt18fp",
  "origin": "example",
  "stream_url": "wss://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/exec/op_3ahrz6dmv29gqy5ckt18fpx4b/stream",
  "expires_at": "2026-11-23T12:00:00.000Z"
}
FieldTypeAlwaysWhat it is
ticketstringYesSingle use, for one stream, for at most 60 seconds. Stored by Pod only as a SHA-256 hash.
stream"screen"Yes
sandboxstringYes
mode"watch" | "takeover"Yes
organisationstringYes
projectstringYes
originstringYesA browser origin as the browser sends it in Origin (RFC 6454): scheme, host and port, no path and no default port. https://, or http:// on loopback for development.
stream_urlstringYesThe address of a WebSocket stream: wss://, or ws:// only on a plain http:// development server.
expires_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.

Errors

The refusals this call is known for: invalid, forbidden, not_found, in_other_cell, rate_limited. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptsandbox.screen.streamTicket({ origin })
Pythonsandbox.screen.stream_ticket(origin=…)