Watching

Tickets that admit a device to a stream on a relay, and the media keys that decrypt it.

Get a Broadcast's media key

GET /v1/organisations/{organisation_id}/broadcasts/{broadcast_id}/media-key

MCP tool
get_broadcast_media_key read-only
Auth
Bearer token (bearerAuth)

The key that decrypts a live Broadcast's video. Only the User streaming it, or someone who holds a watch segment for it (from issue_viewer_ticket). Anyone else gets 403. Every read is a sensitive read, audited as media_key.read; the key is never in the event. Cache it per stream_id, so renewing a ticket doesn't read it again. A Broadcast that has ended gets 409 not_live.

Parameters

NameInTypeRequiredDescription
organisation_idpathOrganisationIdyesOrganisation ID.
broadcast_idpathBroadcastIdyesBroadcast ID.

Responses

StatusDescriptionBody
200The key.MediaKey
400The request is malformed or fails validation (invalid_request), or an ID has the wrong prefix for its field (invalid_id). errors names each invalid field.Problem
401No valid bearer token (unauthenticated). Header WWW-Authenticate: The bearer challenge, per RFC 6750.Problem
403The caller can see the resource, but their Role doesn't allow this operation (forbidden). The attempt is audited with result=denied.Problem
404The resource doesn't exist, or the caller can't see it (not_found). The two are never told apart.Problem
409The change breaks a uniqueness rule or the resource's current state (conflict).Problem

Issue a viewer ticket

POST /v1/organisations/{organisation_id}/broadcasts/{broadcast_id}/viewer-tickets

MCP tool
issue_viewer_ticket not destructive
Auth
Bearer token (bearerAuth)

A ticket to watch a live Broadcast on one of the caller's devices, for 120 s. Ask again after refresh_after. Anyone with an active Membership: a Viewer's ticket is class viewer, with their Watermark code; a Member's or Admin's is class team, with none. The first ticket on a device starts a watch session (watch_session.started), and the first for each Broadcast a watch segment (watch_segment.started). A renewal records nothing, unless the caller's class has changed: then it starts a new segment. A Broadcast that has ended gets 409 not_live. A Viewer watches on one device at a time: their first ticket on a new device ends the watch sessions on their other devices (watch_session.replaced), and a sign-in from before that can then watch only on that device: elsewhere, its tickets get 409 session_replaced until the Viewer signs in again. Members and Admins are exempt.

Parameters

NameInTypeRequiredDescription
organisation_idpathOrganisationIdyesOrganisation ID.
broadcast_idpathBroadcastIdyesBroadcast ID.

Request body

IssueViewerTicketRequest, as application/json. Required.

Responses

StatusDescriptionBody
200The ticket, and where to use it.TicketBundle
400The request is malformed or fails validation (invalid_request), or an ID has the wrong prefix for its field (invalid_id). errors names each invalid field.Problem
401No valid bearer token (unauthenticated). Header WWW-Authenticate: The bearer challenge, per RFC 6750.Problem
403The caller can see the resource, but their Role doesn't allow this operation (forbidden). The attempt is audited with result=denied.Problem
404The resource doesn't exist, or the caller can't see it (not_found). The two are never told apart.Problem
409The change breaks a uniqueness rule or the resource's current state (conflict).Problem

Issue a preview ticket

POST /v1/organisations/{organisation_id}/uplink-sessions/{uplink_session_id}/preview-tickets

MCP tool
issue_preview_ticket not destructive
Auth
Bearer token (bearerAuth)

A ticket to preview an Uplink session's Ready stream on one of the caller's devices, for 120 s. Members, Admins and the Platform admin with a Membership. Always class team, and it starts no watch segment, because nothing is billed while Ready. The first ticket on a device starts a watch session (watch_session.started). A session that has ended gets 409 conflict.

Parameters

NameInTypeRequiredDescription
organisation_idpathOrganisationIdyesOrganisation ID.
uplink_session_idpathUplinkSessionIdyesUplink session ID.

Request body

IssuePreviewTicketRequest, as application/json. Required.

Responses

StatusDescriptionBody
200The ticket, and where to use it.TicketBundle
400The request is malformed or fails validation (invalid_request), or an ID has the wrong prefix for its field (invalid_id). errors names each invalid field.Problem
401No valid bearer token (unauthenticated). Header WWW-Authenticate: The bearer challenge, per RFC 6750.Problem
403The caller can see the resource, but their Role doesn't allow this operation (forbidden). The attempt is audited with result=denied.Problem
404The resource doesn't exist, or the caller can't see it (not_found). The two are never told apart.Problem
409The change breaks a uniqueness rule or the resource's current state (conflict).Problem

Get the ticket signing keys

GET /v1/ticket-keys

MCP tool
get_ticket_keys read-only
Auth
Bearer token (bearerAuth)

The Backend's Ed25519 public keys, by key_id, that relay tickets are signed with. The app checks each ticket's signature with them before it trusts what the ticket says, such as the Watermark code to draw. Any signed-in User. Public keys only; reading them records nothing.

Responses

StatusDescriptionBody
200The public keys.TicketKeys
400The request is malformed or fails validation (invalid_request), or an ID has the wrong prefix for its field (invalid_id). errors names each invalid field.Problem
401No valid bearer token (unauthenticated). Header WWW-Authenticate: The bearer challenge, per RFC 6750.Problem
403The caller can see the resource, but their Role doesn't allow this operation (forbidden). The attempt is audited with result=denied.Problem

Schemas

OrganisationId

Organisation ID.

Type: string. Exactly 18 characters. Pattern ^ORG[a-z0-9]{15}$. Example: ORG8hfaw8hfpwhjf94.

BroadcastId

Broadcast ID.

Type: string. Exactly 18 characters. Pattern ^BRD[a-z0-9]{15}$. Example: BRD8hfaw8hfpwhjf94.

MediaKey

FieldTypeRequiredDescription
stream_idStreamNumberyesThe stream's number on the wire (ADR 0004, "compact numeric stream numbers").
key_idintegeryesWhich key of the stream this is, as in each fragment's key_id. Always 1 for now. 1 to 255.
key_b64stringyesThe 32-byte key, base64. Keep it in memory only, and cache it per stream_id. Pattern ^[A-Za-z0-9+/]{43}=$.

StreamNumber

The stream's number on the wire (ADR 0004, "compact numeric stream numbers").

Type: integer. 1 to 4294967295.

Problem

An RFC 9457 problem details object, sent as application/problem+json.

FieldTypeRequiredDescription
typestring (uri-reference)yesA URI identifying the problem type. about:blank when code says enough. Example: about:blank.
titlestringyesA short, human-readable summary of the problem type. Example: Not found.
statusintegeryesThe HTTP status code. 400 to 599. Example: 404.
codestringyesA stable, snake_case machine code. Clients branch on this, never on title. Pattern ^[a-z][a-z0-9]*(_[a-z0-9]+)*$. Examples: not_found, invalid_id.
detailstringnoA human-readable explanation of this occurrence.
instancestring (uri-reference)noThe request path that produced the problem.
request_idstringyesLinks the problem to the request logs and any audit event.
started_byUplinkSessionStarternochannel_in_use only: who started the Channel's active Uplink session.
reasonstringnosession_ended only: idle (unused past its window) or signed_out (by another session, e.g. after a password change). One of idle, signed_out.
errorsarray of ProblemFieldErrornoOne entry per invalid field, for invalid_request and invalid_id.
retry_after_secondsintegernorate_limited only: how long to wait before trying again, in seconds. At least 0.

UplinkSessionStarter

Who pressed Start.

FieldTypeRequiredDescription
user_idUserIdyesUser ID.
namestringyesHow to show them. Their email, until Users have names. Example: mike@northgate.example.

UserId

User ID.

Type: string. Exactly 18 characters. Pattern ^USR[a-z0-9]{15}$. Example: USR8hfaw8hfpwhjf94.

ProblemFieldError

FieldTypeRequiredDescription
pointerstringnoA JSON Pointer into the request body, e.g. /first_admin_email.
parameterstringnoThe name of the path, query or header parameter, e.g. organisation_id.
detailstringyesWhat is wrong with the field.

IssueViewerTicketRequest

FieldTypeRequiredDescription
device_idDeviceIdyesThe caller's own device, from register_device.

DeviceId

Device ID.

Type: string. Exactly 18 characters. Pattern ^DEV[a-z0-9]{15}$. Example: DEV8hfaw8hfpwhjf94.

TicketBundle

FieldTypeRequiredDescription
ticket_b64stringyesThe signed 188-byte ticket (C2), base64. Sent to the relay as it is, in admit. Pattern ^[A-Za-z0-9+/]{251}=$.
stream_idStreamNumberyesThe stream's number on the wire (ADR 0004, "compact numeric stream numbers").
relayTicketRelayyesThe relay to admit to, and its UDP address for this ticket (uplink for senders, downlink otherwise).
expires_atTimestampyesWhen the relay stops accepting the ticket.
refresh_afterTimestampyesWhen to ask for the next ticket.
watermark_codeWatermarkCode | nullyesThe Watermark code to draw, signed into the ticket. Viewer class only; null for senders and team.
watermark_opacityWatermarkOpacityValue | nullyesHow opaque to draw the Watermark code: the Organisation's watermark_opacity, from 0.3 to 1. With the code only; null for senders and team. The app never draws it below 0.3.
watch_session_idWatchSessionId | nullyesThe watch session, for viewer and preview tickets; null for a sender's.
uplink_session_idUplinkSessionId | nullyesThe Uplink session, for a sender's ticket; null otherwise.
streamTicketStreamyesWhich stream the ticket is for. For a sender's ticket, the stream to send on right now: the Ready stream, or the live Broadcast's.

TicketRelay

The relay to admit to, and its UDP address for this ticket (uplink for senders, downlink otherwise).

FieldTypeRequiredDescription
idstringyesThe relay's name in the Backend's configuration, e.g. local-1. 1 to 64 characters.
hoststringyes 1 to 253 characters.
portintegeryes 1 to 65535.

Timestamp

UTC, with milliseconds and a Z suffix.

Type: string (date-time). Pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$. Example: 2026-11-28T14:27:03.412Z.

WatermarkCode

The 8-digit code drawn over the video for this Viewer, unique in the Organisation. It is not an ID (ADR 0004): people read it off a frame and type it in.

Type: string. Pattern ^[1-9][0-9]{7}$. Example: 48207193.

WatermarkOpacityValue

How opaque the Watermark code is drawn, from 0.3 (the floor, C11's 30%) to 1 (opaque).

Type: number. 0.3 to 1. Example: 0.45.

WatchSessionId

Watch session ID.

Type: string. Exactly 18 characters. Pattern ^SSN[a-z0-9]{15}$. Example: SSN8hfaw8hfpwhjf94.

UplinkSessionId

Uplink session ID.

Type: string. Exactly 18 characters. Pattern ^UPL[a-z0-9]{15}$. Example: UPL8hfaw8hfpwhjf94.

TicketStream

Which stream the ticket is for. For a sender's ticket, the stream to send on right now: the Ready stream, or the live Broadcast's.

FieldTypeRequiredDescription
kindstringyes One of ready, broadcast.
broadcast_idBroadcastId | nullyesThe Broadcast, for a broadcast stream; null for the Ready stream.

IssuePreviewTicketRequest

FieldTypeRequiredDescription
device_idDeviceIdyesThe caller's own device, from register_device.

TicketKeys

FieldTypeRequiredDescription
keysarray of TicketKeyyesEvery key a current ticket may be signed with. During a rotation the old and the new key are both listed (ADR 0010).

TicketKey

FieldTypeRequiredDescription
key_idintegeryesThe ticket's signing_key_id (C2) for tickets this key signs. 1 to 65535.
public_key_b64stringyesThe raw 32-byte Ed25519 public key (RFC 8032), base64. Pattern ^[A-Za-z0-9+/]{43}=$.