# Uploads and live capture

Upload recordings and capture talks in real time.

Base URL: https://api.audiobly.com

### POST /v1/events/{event_id}/live/token

Mint stream token

Mint a short-lived streaming credential for the operator's laptop.

The account key never leaves the server. The token only has to be valid at the
socket handshake — the connection then stays open for the whole session — so it is
deliberately short-lived and does not need to cover the session length.

A browser cannot set an Authorization header on a WebSocket, so the tool passes this
token as the `access_token` query parameter on the socket URL.

`audio=pcm16k` is what the capture tool sends now: raw 16-bit mono PCM at 16 kHz, which
the provider cannot sniff and must be told about. Omitted, the socket expects the
containerised WebM a MediaRecorder produces, so a laptop still running the previous
page keeps working through a deploy.

Scope: event_edit

Parameters:

- `event_id` (path, string (uuid), required)
- `session_id` (query, string (uuid))
- `audio` (query, string)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.
