API reference
Every endpoint, parameter and field of the JustOnAir API, generated from openapi.json.
All endpoints live at https://api.justonair.com. Authenticate with Authorization: Bearer <API key>. Requests and responses are JSON. Times are ISO 8601 UTC; money is a decimal string in USD.
This page is generated from openapi.json. Import that file into Postman, an SDK generator or an agent framework to get the same thing as code.
Streams
Create, read, change and end streams.
Create a stream
POST /v1/streamsReserves ingest capacity for 30 minutes and returns everything needed to go live: rtmp_url + stream_key, whip_url, playback_url and embed_url. The secrets are returned only here. Send an Idempotency-Key so a retry never creates a second stream.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Any unique string, e.g. a UUID. A retry with the same key and body returns the first response (header Idempotent-Replayed: true) for 24 h. |
Body (optional)
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. Blank means no name. |
profile | "abr_basic" | "passthrough" | Default abr_basic. |
max_resolution | 480 | 720 | 1080 | The tallest video you will send. Default 720. 1080 needs a trusted account. Sending more than you declare ends the stream after a 20 s warning. |
record | boolean | Make an MP4 after the stream ends. Default true. |
replay | boolean | After the end, the hosted player plays the recording. Default false. Needs record. |
recording_retention_days | integer | null | Days to keep the MP4, 1–3650. Omit for the account default (30). Null: keep until deleted. |
metadata | object | Your own JSON, up to 2 KB. |
player | PlayerSettings | |
thumbnail | ThumbnailSettings | |
chat | ChatSettings |
{
"name": "Friday show",
"max_resolution": 720,
"replay": true,
"metadata": {
"show_id": "fri-42"
},
"chat": {
"enabled": true,
"reactions": true
}
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | CreatedStream | Created. Store stream_key and whip_url now. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 402 | Error | Credit below the 1.00 USD minimum (insufficient_credit). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 422 | Error | This Idempotency-Key was used with a different body (idempotency_key_reused). |
| 429 | Error | An account limit: limit_pending_streams, limit_creation_rate, limit_ingest_hours, limit_resolution. |
| 503 | Error | No ingest capacity right now (no_capacity). Retry shortly. |
List streams
GET /v1/streamsNewest first.
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | |
starting_after | query | string | Id of the last stream on the previous page. |
status | query | "pending" | "live" | "ended" | "expired" | "cancelled" | |
channel_id | query | string | Only the streams of this channel. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | StreamList | A page of streams. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
Get a stream
GET /v1/streams/{id}Status, what is arriving (ingest), the recording, and cost so far. Poll it to follow a stream; every 3–5 s is fine.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Stream | The stream. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 404 | Error | No such stream in your account (not_found). |
Update a stream
PATCH /v1/streams/{id}Rename it, replace its metadata, or change player settings. Works in any status.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body. Only these fields can change, in any status. Null clears a field; metadata is replaced whole.
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. |
replay | boolean | Turn replay on or off, also after the end. Needs record. |
metadata | object | null | |
player | PlayerSettings | |
thumbnail | ThumbnailSettings | |
chat | ChatSettings |
{
"name": "Friday show (moved)",
"player": {
"allowed_domains": [
"example.com",
"*.example.com"
]
}
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Stream | The stream. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 404 | Error | No such stream in your account (not_found). |
End or cancel a stream
DELETE /v1/streams/{id}Live: ends it and disconnects the publisher within seconds. Pending: cancels it and releases the slot. Already finished: returns it unchanged.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Stream | The stream, now ended or cancelled. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 404 | Error | No such stream in your account (not_found). |
Replace a lost stream key
POST /v1/streams/{id}/stream-keyOnly while pending. The old key and WHIP URL stop working at once.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | CreatedStream | The stream with new stream_key and whip_url. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | Live or finished (stream_not_pending). |
Viewers per minute
GET /v1/streams/{id}/viewersThe viewer curve: live estimates from the hosted player, and exact counts from the CDN logs about an hour later.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ViewerSeries | Per-minute counts from both sources. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
Who watched
GET /v1/streams/{id}/attendanceViewers who watched in the hosted player with a viewer token, and for how long, ordered by viewer_id. Up to a minute behind while the stream runs. Anonymous viewers are only counted (viewers), never listed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
after | query | string | The previous page's next_after. |
limit | query | integer |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | AttendanceList | One page of viewers. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
Channels
A stable address and a persistent stream key. Every time the key connects, a new stream starts. See Channels.
Create a channel
POST /v1/channelsReturns rtmp_url + stream_key (and whip_url) to save in the encoder once, and embed_url, the channel’s player page. Nothing is reserved until the key connects; then a new stream starts, with the same limits as POST /v1/streams. The key is returned only here and when you replace it.
Body (optional)
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. |
profile | "abr_basic" | "passthrough" | Default abr_basic. Cannot be changed later. |
defaults | ChannelDefaults | |
scheduled_at | string | null | When the next stream is planned (ISO 8601). |
{
"name": "Sunday service",
"defaults": {
"max_resolution": 1080,
"recording_retention_days": 90,
"chat": {
"enabled": true,
"reactions": true
}
},
"scheduled_at": "2026-10-11T08:00:00Z"
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | CreatedChannel | Created. Store stream_key and whip_url now. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 429 | Error | An account limit: limit_channels, limit_resolution. |
| 503 | Error | No ingest capacity right now (no_capacity). Retry shortly. |
List channels
GET /v1/channelsNewest first. A channel’s streams: GET /v1/streams?channel_id=.
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | |
starting_after | query | string | Id of the last channel on the previous page. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChannelList | A page of channels. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
Get a channel
GET /v1/channels/{id}live_stream_id is the channel’s stream on air right now.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Channel | The channel. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 404 | Error | No such stream in your account (not_found). |
Update a channel
PATCH /v1/channels/{id}Name, status, defaults and scheduled_at. Applies from the next stream.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. Used from the next stream on. |
status | "active" | "disabled" | disabled refuses the key from now on (a stream on air keeps running); active turns it back on. |
defaults | ChannelDefaults | |
scheduled_at | string | null |
{
"scheduled_at": "2026-10-18T08:00:00Z",
"defaults": {
"recording_retention_days": null
}
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Channel | The channel. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 404 | Error | No such stream in your account (not_found). |
| 429 | Error | limit_resolution. |
Delete a channel
DELETE /v1/channels/{id}The key stops working and a stream on air is ended. The channel’s past streams and their recordings stay.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Channel | The channel, with deleted_at. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 404 | Error | No such stream in your account (not_found). |
Replace a channel’s key
POST /v1/channels/{id}/stream-keyThe old key and WHIP URL stop working for new connections at once. A stream on air keeps running; if its publisher drops, it must come back with the new key.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | CreatedChannel | The channel with the new stream_key and whip_url. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 403 | Error | Account pending approval or suspended (account_pending, tenant_suspended). |
| 404 | Error | No such stream in your account (not_found). |
Playback
Signed URLs for your own player.
Sign a playback URL
POST /v1/streams/{id}/playback-tokenA fresh signed HLS URL, for example a short one per viewer minted by your backend. Refused once the stream is finished.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body (optional)
| Field | Type | Description |
|---|---|---|
expires_in | integer | Seconds. Default: until the stream could no longer be live, plus an hour. |
{
"expires_in": 600
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | PlaybackToken | Signed URL. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | The stream has ended (stream_ended). The live video is gone; use the recording or replay. |
Recordings
The MP4 made after a stream ends.
Delete the recording
DELETE /v1/streams/{id}/recordingDeletes the MP4 now, or marks it to be deleted as soon as it exists.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Stream | The stream; recording.status is deleted or deleting. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
Get a download link
POST /v1/streams/{id}/recording/download| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body (optional)
| Field | Type | Description |
|---|---|---|
expires_in | integer |
{
"expires_in": 3600
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | RecordingDownload | A signed link to the MP4. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | Not ready (recording_not_ready, with details.status). |
Account
Balance and usage.
Balance and usage
GET /v1/usage| Parameter | In | Type | Description |
|---|---|---|---|
days | query | integer |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Usage | Balance, rates and usage per UTC day. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
Email settings
GET /v1/account/notificationsResponses
| Status | Body | Meaning |
|---|---|---|
| 200 | NotificationSettings | The settings. |
| 401 | Error | Missing or invalid API key (unauthorized). |
Change email settings
PATCH /v1/account/notificationsSend only the fields to change.
Body
| Field | Type | Description |
|---|---|---|
low_balance_email | boolean | |
low_balance_threshold_usd | number | string | 1 to 10000, at most two decimals: 12.5 or "12.50". |
recording_deletion_email | boolean | |
balance_statement_email | boolean |
{
"low_balance_threshold_usd": "20.00"
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | NotificationSettings | The settings after the change. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
Webhooks
Endpoints that get stream and recording events, and their delivery log.
List webhook endpoints
GET /v1/webhooksWithout secrets. Also returns event_types, every type an endpoint can subscribe to.
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | WebhookEndpointList | Your endpoints. |
| 401 | Error | Missing or invalid API key (unauthorized). |
Add a webhook endpoint
POST /v1/webhooksUp to 5 per account. The answer includes secret; see Webhooks for verifying signatures.
Body
| Field | Type | Description |
|---|---|---|
url | string | https URL on the public internet, up to 2000 characters. |
events | array of "stream.live" | "stream.ended" | "stream.expired" | "stream.cancelled" | "recording.ready" | "recording.failed" | "recording.deleted" | "credit.low" | "credit.depleted" | "recordings.deletion_scheduled" | "balance.negative" | "balance.statement" | "balance.threshold" | Leave out for all events, including ones added later. |
description | string | Up to 200 characters. |
{
"url": "https://example.com/webhooks/justonair",
"events": [
"stream.live",
"stream.ended",
"recording.ready"
],
"description": "Production"
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | WebhookEndpoint | The endpoint, with its secret. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 429 | Error | 5 endpoints already (limit_webhook_endpoints). |
Get a webhook endpoint
GET /v1/webhooks/{id}With its secret.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Endpoint id (whk_…). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | WebhookEndpoint | The endpoint. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such endpoint (not_found). |
Change a webhook endpoint
PATCH /v1/webhooks/{id}| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Endpoint id (whk_…). |
Body
| Field | Type | Description |
|---|---|---|
url | string | |
events | array of "stream.live" | "stream.ended" | "stream.expired" | "stream.cancelled" | "recording.ready" | "recording.failed" | "recording.deleted" | "credit.low" | "credit.depleted" | "recordings.deletion_scheduled" | "balance.negative" | "balance.statement" | "balance.threshold" | |
description | string | null | |
enabled | boolean | False stops sending; queued deliveries fail. |
{
"events": [
"stream.live",
"stream.ended"
],
"enabled": true
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | WebhookEndpoint | The endpoint. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such endpoint (not_found). |
Delete a webhook endpoint
DELETE /v1/webhooks/{id}Its delivery log goes with it.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Endpoint id (whk_…). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 204 | Deleted. | |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such endpoint (not_found). |
Rotate the signing secret
POST /v1/webhooks/{id}/secretThe old secret keeps signing alongside the new one for 24 hours.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Endpoint id (whk_…). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | WebhookEndpoint | The endpoint with the new secret. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such endpoint (not_found). |
Send a test event
POST /v1/webhooks/{id}/testQueues a webhook.test; it is sent within a couple of seconds.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Endpoint id (whk_…). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 202 | WebhookDelivery | The queued delivery. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such endpoint (not_found). |
Delivery log
GET /v1/webhooks/{id}/deliveriesNewest first, kept 30 days.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Endpoint id (whk_…). |
limit | query | integer | |
status | query | "pending" | "succeeded" | "failed" |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | WebhookDeliveryList | Deliveries, newest first. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such endpoint (not_found). |
Send a delivery again
POST /v1/webhooks/{id}/deliveries/{delivery_id}/retryA failed delivery gets one more attempt now; a pending one is brought forward.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Endpoint id (whk_…). |
delivery_id | path | string | dlv_… |
Responses
| Status | Body | Meaning |
|---|---|---|
| 202 | WebhookDelivery | The delivery. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No pending or failed delivery with that id (not_found). |
Embed
The hosted player’s public read.
Public stream status (hosted player)
GET /v1/embed/{id}No key needed; any web page may call it. Cached for a few seconds; the same read is served, cached at the CDN edge, at https://play.joacdn.com/api/embed/{id}. Rate limited per IP on unknown ids (60/min). {id} may be a stream or a channel: a channel answers with its stream on air, or with a waiting page.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Embed | Status and, while live, a signed URL. |
| 404 | Error | Unknown stream. Codes: not_found. |
| 429 | Error | Too many requests (rate_limited). |
Public thumbnail
GET /v1/embed/{id}/thumbnail.jpgNo key needed. Only while the stream has thumbnail.public on. Redirects (302) to the newest frame, or to the JustOnAir placeholder before the first one, so an <img> always shows something. Cached for 30 s. Use it as https://play.joacdn.com/api/embed/{id}/thumbnail.jpg (that is thumbnail.public_url).
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 302 | To the newest frame (a signed CDN link) or the placeholder. | |
| 404 | Error | Unknown stream, or its thumbnail is not public. Codes: not_found. |
| 429 | Error | Too many requests (rate_limited). |
Report a viewer (sampled)
POST /v1/embed/{id}/beatSent by the hosted player, or by your own player to be counted live. Get a viewer session once per page load (its u is your draw); report every beacon.interval_seconds while u is below beacon.rate from the embed read. No body, so navigator.sendBeacon(url) works from any page.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
t | query | string | A viewer session token (POST /v1/embed/{id}/session). Preferred: its session id and server-drawn u are used, so neither can be forged. Without it, send s and u. |
s | query | string | Without t: a random id for this page load. |
st | query | "w" | "p" | "z" | "b" | Waiting, playing, paused or buffering. |
u | query | number | Without t: the random draw, 0 ≤ u < 1. With t, use the session's u. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 204 | Counted (or the stream is over and there is nothing to count). | |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Invalid or expired session token (invalid_session). |
| 404 | Error | Unknown stream. Codes: not_found. |
| 429 | Error | Too many requests (rate_limited). |
Chat
Viewer chat and reactions (beta): your feed and moderation. See Chat and reactions.
Read the chat feed
GET /v1/streams/{id}/chatEvery message after a cursor, including deleted, filtered and shadow-banned ones with what we know about the sender (never the IP), plus the live state and reaction totals.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
after | query | integer | Messages with seq above this. Default 0. |
limit | query | integer | Default 100. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatFeed | The feed. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
Slow mode, pause, pin
PATCH /v1/streams/{id}/chatReaches viewers within about 2 s. To turn chat or reactions on or off, change chat on the stream.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
slow_mode_seconds | integer | 0–300. 0: off. |
paused | boolean | Nobody but you can post. |
pinned_message_id | string | null | A visible message to pin; null unpins. |
{
"slow_mode_seconds": 10
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatFeed | The feed header (no messages). |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_not_enabled. |
Post as host or moderator
POST /v1/streams/{id}/chat/messagesShown with a Host or Moderator badge viewers cannot fake. Links are allowed. Works while chat is paused.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
text | string | 1–200 characters. |
role | "host" | "moderator" | Default host. |
display_name | string | null | Up to 40 characters. Default: chat.host_name, else "Host" or "Moderator". |
{
"text": "Welcome, everyone!",
"role": "host"
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ChatOwnerMessage | The message. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_closed, chat_not_enabled. |
Delete a message
DELETE /v1/streams/{id}/chat/messages/{message_id}Hidden from everyone within about 2 s. Kept in your feed with deleted_at.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
message_id | path | string | Message id (msg_…). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatOwnerMessage | The message. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream or message (not_found). |
| 409 | Error | chat_not_enabled. |
Clear the chat
POST /v1/streams/{id}/chat/clearHides every message posted so far, and the pin. Your feed keeps them (cleared: true).
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatFeed | The feed header. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_not_enabled. |
List bans
GET /v1/streams/{id}/chat/bansThe bans that apply to this stream: its own, or its moderation group's.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatBanList | The bans, newest first. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
Ban a viewer
POST /v1/streams/{id}/chat/bansBans the viewer's session and their address, so a new browser on the same network stays banned. A viewer who came with a viewer token is banned by who they are instead: on every device, and without banning others behind the same address. Banned viewers are shadow-banned: their messages look sent to them and nobody else sees them. Scope: the moderation group when the stream has one, else this stream.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
message_id | string | One of their messages. Send one of message_id, session_id or viewer_id. |
session_id | string | Their session. |
viewer_id | string | Your id for them (a viewer token's sub), even before they post. |
delete_messages | boolean | Also delete every message they posted on this stream. Default false. |
{
"message_id": "msg_3k9x0a7q2m4b8c1d5e6f",
"delete_messages": true
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ChatBan | The ban (an existing one if they were already banned). |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_not_enabled. |
Lift a ban
DELETE /v1/streams/{id}/chat/bans/{ban_id}| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
ban_id | path | string | Ban id (ban_…). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Lifted: { "object": "chat_ban", "id": "ban_…", "deleted": true }. | |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such ban for this stream (not_found). |
Get your word list
GET /v1/streams/{id}/chat/words| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatWords | The list. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_not_enabled. |
Replace your word list
PUT /v1/streams/{id}/chat/wordsWords and phrases, matched as whole words in any case. Messages that contain one are stored and shown only to you. Shared by the moderation group when the stream has one.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
words | array of string |
{
"words": [
"spoiler",
"kötü söz"
]
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatWords | The list. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_not_enabled. |
Chat (public)
What viewers’ browsers call, with no API key: the hosted player, the hosted chat page, or your own chat UI.
Get a viewer session
POST /v1/embed/{id}/sessionOnce per browser and stream; keep it until expires_at. Any stream whose hosted player is on. No body for an anonymous viewer; with viewer_token, a session that knows who the viewer is (their name in chat, bans by person, a moderator role): see Viewer tokens.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body (optional)
| Field | Type | Description |
|---|---|---|
viewer_token | string | A JWT your server signed for this viewer with a viewer key (HS256, kid = the key id). See Viewer tokens. |
{
"viewer_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InZrXy4uLiJ9...."
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ViewerSession | The session. |
| 401 | Error | invalid_viewer_token: the message says why (signature, expiry, key, stream). viewer_token_required: a members-only stream, and no token. |
| 403 | Error | A browser on a site not in player.allowed_domains (origin_not_allowed). |
| 404 | Error | Unknown stream, or its hosted player is off. Codes: not_found. |
| 429 | Error | Too many requests (rate_limited). |
Renew a member's playback URL
POST /v1/embed/{id}/playbackMembers-only streams: new playback URLs for a viewer's session (from a viewer token), before the last ones expire. The hosted player does this by itself every few minutes. Refused once you removed the viewer (a ban by viewer_id) or their token's exp passed: that is how their video stops.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
token | string | The viewer session token (from a viewer token). |
{
"token": "vs2...."
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | MemberPlaybackRenewal | Their new URLs. |
| 401 | Error | invalid_session, or viewer_token_required (a session without a viewer token). |
| 403 | Error | viewer_removed (banned by who they are) or viewer_access_ended (their token's exp passed). |
| 404 | Error | Unknown stream. Codes: not_found. |
| 429 | Error | Too many requests (rate_limited). |
Read the chat
GET /v1/embed/{id}/chatThe same answer for every viewer for 2 s, so a whole audience costs one read per stream every 2 s. Use the CDN address https://play.joacdn.com/api/embed/{id}/chat from browsers. Keep the messages you show, add new ids, remove deleted_ids and everything up to cleared_at.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatRead | The chat. |
| 404 | Error | Unknown stream. Codes: not_found. |
| 429 | Error | Too many requests (rate_limited). |
Post a message
POST /v1/embed/{id}/chat/messagesStraight to https://api.justonair.com, never through the CDN. Show the viewer their own message at once and confirm it when it appears in the read. A banned viewer, or a message caught by the word filter, gets the same 201: it is stored for the owner and shown only to its sender.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
token | string | The viewer session token. |
nickname | string | 2–24 characters. Links are refused. Required, except for a session from a viewer token with a name: that name is used whatever you send. |
text | string | 1–200 characters. Links and bare domains are refused. |
{
"token": "vs1....",
"nickname": "Ayşe",
"text": "Merhaba!"
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ChatMessage | Accepted. |
| 400 | Error | invalid_request (text), invalid_nickname. |
| 401 | Error | invalid_session: get a new session. |
| 403 | Error | A browser on a site not in player.allowed_domains (origin_not_allowed). |
| 404 | Error | Unknown stream. Codes: not_found. |
| 409 | Error | chat_closed (with details.state) or chat_paused. |
| 422 | Error | chat_message_not_allowed: links are not allowed. |
| 429 | Error | chat_slow_mode, chat_rate_limited or chat_busy, with details.retry_after_seconds; or rate_limited. |
Send reactions
POST /v1/embed/{id}/chat/reactionsCount clicks in the browser and send them at most every reaction_sampling.interval_seconds, only while your session's u is below reaction_sampling.rate. No body: navigator.sendBeacon(url) works without a CORS preflight. Always 204 once valid; batches over a limit are dropped quietly.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
t | query | string | The viewer session token. |
r | query | string | Counts per emoji since the last batch, at most 10 each. Emoji: heart, clap, laugh, fire, party, wow. |
at | query | integer | The second of video the viewer was watching when they reacted: Unix seconds of the stream's EXT-X-PROGRAM-DATE-TIME (hls.js: hls.playingDate). Other players then draw these reactions when their own picture reaches it. Leave it out when you have no video clock. Ignored when more than 120 s behind or 10 s ahead of our clock. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 204 | Taken (or dropped quietly). | |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | invalid_session. |
| 403 | Error | A browser on a site not in player.allowed_domains (origin_not_allowed). |
| 404 | Error | Unknown stream. Codes: not_found. |
| 429 | Error | Too many requests (rate_limited). |
Chat moderators
Moderator links: you create them with your key; moderators act from the chat page with a moderator session, never your key.
Invite a moderator
POST /v1/streams/{id}/chat/moderatorsOne link per person. It works once and expires after 7 days unused. Once opened, they moderate for active_days, then invite them again if you want them back. With a moderation group, they moderate every stream of the group.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
name | string | Up to 40 characters. |
active_days | integer | How long they moderate after opening the link: 1–30 days. Default 30. Use 1 for a single show. |
{
"name": "Mert",
"active_days": 7
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ChatModerator | The moderator, with invite_url (shown only now). |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_not_enabled. |
| 429 | Error | limit_moderators (50 per stream or group). |
List moderators
GET /v1/streams/{id}/chat/moderators| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatModeratorList | Newest first; no links. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such stream in your account (not_found). |
| 409 | Error | chat_not_enabled. |
Remove a moderator
DELETE /v1/streams/{id}/chat/moderators/{moderator_id}Their link and session stop working at once (within 5 s).
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
moderator_id | path | string | Moderator id (mod_…). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatModerator | The moderator, revoked. |
| 401 | Error | Missing or invalid API key (unauthorized). |
| 404 | Error | No such moderator for this stream (not_found). |
Open a moderator link
POST /v1/embed/{id}/moderatorThe chat page does this when opened with #mod=…. Works once.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
Body
| Field | Type | Description |
|---|---|---|
invite | string | The part after #mod=. |
{
"invite": "inv_..."
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ModeratorSession | The moderator session. |
| 400 | Error | Invalid request (invalid_request). |
| 409 | Error | Already used, revoked, expired, or for another stream (invite_invalid). |
| 429 | Error | rate_limited. |
Who am I here
GET /v1/embed/{id}/modWhether this moderator session moderates this stream.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
X-Moderator-Token | header | string | The moderator session (from POST /v1/embed/{id}/moderator). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatModerator | The moderator. |
| 401 | Error | No valid moderator session for this stream, or the moderator was removed (moderator_unauthorized). |
| 404 | Error | Unknown stream or message. Codes: not_found. |
Slow mode, pause, pin (moderator)
PATCH /v1/embed/{id}/modNo API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
X-Moderator-Token | header | string | The moderator session (from POST /v1/embed/{id}/moderator). |
Body
| Field | Type | Description |
|---|---|---|
slow_mode_seconds | integer | 0–300. |
paused | boolean | |
pinned_message_id | string | null | null unpins. |
{
"paused": true
}Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | { object: "chat_state", state, slow_mode_seconds, paused, pinned_message_id }. | |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | No valid moderator session for this stream, or the moderator was removed (moderator_unauthorized). |
| 404 | Error | Unknown stream or message. Codes: not_found. |
Post as moderator
POST /v1/embed/{id}/mod/messagesWith the Moderator badge and their name. Works while paused.
No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
X-Moderator-Token | header | string | The moderator session (from POST /v1/embed/{id}/moderator). |
Body
| Field | Type | Description |
|---|---|---|
text | string | 1–200 characters; links allowed. |
{
"text": "Please keep it friendly."
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ChatOwnerMessage | The message. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | No valid moderator session for this stream, or the moderator was removed (moderator_unauthorized). |
| 404 | Error | Unknown stream or message. Codes: not_found. |
| 409 | Error | chat_closed. |
Delete a message (moderator)
DELETE /v1/embed/{id}/mod/messages/{message_id}No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
message_id | path | string | Message id (msg_…). |
X-Moderator-Token | header | string | The moderator session (from POST /v1/embed/{id}/moderator). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatOwnerMessage | The message, deleted_by: moderator. |
| 401 | Error | No valid moderator session for this stream, or the moderator was removed (moderator_unauthorized). |
| 404 | Error | Unknown stream or message. Codes: not_found. |
List bans (moderator)
GET /v1/embed/{id}/mod/bansNo API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
X-Moderator-Token | header | string | The moderator session (from POST /v1/embed/{id}/moderator). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | ChatBanList | The bans. |
| 401 | Error | No valid moderator session for this stream, or the moderator was removed (moderator_unauthorized). |
| 404 | Error | Unknown stream or message. Codes: not_found. |
Ban a viewer (moderator)
POST /v1/embed/{id}/mod/bansNo API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
X-Moderator-Token | header | string | The moderator session (from POST /v1/embed/{id}/moderator). |
Body
| Field | Type | Description |
|---|---|---|
message_id | string | |
session_id | string | |
viewer_id | string | |
delete_messages | boolean |
{
"message_id": "msg_3k9x0a7q2m4b8c1d5e6f",
"delete_messages": true
}Responses
| Status | Body | Meaning |
|---|---|---|
| 201 | ChatBan | The ban, created_by: moderator. |
| 400 | Error | Invalid request (invalid_request). |
| 401 | Error | No valid moderator session for this stream, or the moderator was removed (moderator_unauthorized). |
| 404 | Error | Unknown stream or message. Codes: not_found. |
Lift a ban (moderator)
DELETE /v1/embed/{id}/mod/bans/{ban_id}No API key needed.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Stream id. |
ban_id | path | string | Ban id (ban_…). |
X-Moderator-Token | header | string | The moderator session (from POST /v1/embed/{id}/moderator). |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Lifted. | |
| 401 | Error | No valid moderator session for this stream, or the moderator was removed (moderator_unauthorized). |
| 404 | Error | Unknown stream or message. Codes: not_found. |
Objects
Error
| Field | Type | Description |
|---|---|---|
error | object |
{
"error": {
"code": "invalid_request",
"message": "name must be shorter than or equal to 100 characters",
"request_id": "req_8k2m0q4b7c1d8e3a9f5x"
}
}PlayerSettings
How the hosted player presents the stream. On PATCH, a field left out is unchanged and null clears it.
| Field | Type | Description |
|---|---|---|
enabled | boolean | Whether the hosted player plays this stream. Default true. The embed read behind embed_url is public: while this is on, anyone who knows the stream id can get a playback URL valid for the whole stream. Turn it off when you control access yourself with short-lived playback tokens (paywalls, members-only); the watch page then shows the stream as unavailable. |
show_name | boolean | Show the stream name to viewers on the hosted player. Default true. False keeps the name out of the public embed read entirely. |
require_viewer_token | boolean | Members only. Default false. True: the hosted player plays the stream only for viewers who come with a viewer token, each with their own playback URL that lasts a few minutes and is renewed until their token's exp. The public embed read then has no playback URL. |
max_height | 480 | 720 | 1080 | null | The tallest quality the hosted player offers: 480, 720 or 1080. Null (default): every quality. Lowers what viewers download; it is not access control. |
watch_minutes_limit | integer | null | Watch-time budget in viewer-minutes, counted by the hosted player. When it is used up the watch page closes (embed status closed) and players stop within about a minute; the stream keeps running. Null (default): no budget. Changing it reopens a closed page if the new budget is not used up. |
watch_minutes_limit_includes_replay | boolean | The budget also counts replay viewing after the end; when it is used up the replay closes too (embed status closed, no replay URL). Default false: the budget is the live show and the replay is never closed by it. Changing it reopens a closed page if the budget is not used up. |
closed_at | string | null | Read only. When the watch-time budget ran out and the watch page closed; null while open. |
allowed_domains | array | null | Sites allowed to embed the hosted player and chat page, and to post to the stream's chat from a browser. example.com (that site over https), *.example.com (its subdomains), or a full origin with scheme and port for development. Empty (default) or null: anywhere. Browsers refuse to show the player inside any other site; chat refuses posts from other sites. Not a lock on the video: see Chat and reactions. Takes up to a minute to apply. |
ThumbnailSettings
The thumbnail setting. See Thumbnails.
| Field | Type | Description |
|---|---|---|
public | boolean | Default false. True: the hosted player shows the newest frame as its poster, and thumbnail.public_url serves it to anyone with the stream id (link previews, your own stream lists). Leave it off for private streams. |
ChatSettings
Viewer chat and reactions (beta). See Chat and reactions. On PATCH, a field left out is unchanged.
| Field | Type | Description |
|---|---|---|
enabled | boolean | Viewer chat on this stream: in the hosted player, on the hosted chat page and through the public chat endpoints. Default false. Off whenever player.enabled is false. |
reactions | boolean | Emoji reactions. Default false. |
moderation_group | string | null | Bans and your word list apply to every stream of your account with the same key, e.g. one per host. 1–64 characters: letters, digits and _ . : @ -. Null (default): this stream only. |
host_name | string | null | The name on your own posts when a post gives none. Up to 40 characters. Default null ("Host"). |
visible_after_end | boolean | Keep the chat visible, read-only, on the watch page after the stream ends (until it is deleted 30 days later). Default false: hidden from viewers 10 minutes after the end; you keep it. |
builtin_word_filter | boolean | The built-in Turkish and English word filter. Default true. Your own words (/chat/words) apply either way. |
Thumbnail
A frame taken once a minute while the stream is live (the first about 10 s in). Kept with the recording and deleted with it. See Thumbnails.
| Field | Type | Description |
|---|---|---|
public | boolean | Whether the frame is public (the setting). |
url | string | null | For you: a signed link to the newest frame, a JPEG up to 640 px wide. Valid about an hour; the same link for ten minutes at a time, so browsers can cache it. Null before the first frame and once deleted. |
captured_at | string | null | When url was taken. |
public_url | string | null | While public is true: a stable address anyone may load, redirecting to the newest frame (or a placeholder before the first). Null while not public. |
Ingest
What the ingest node last measured arriving. Null until the first measurement.
| Field | Type | Description |
|---|---|---|
width | integer | null | Frame width in pixels. |
height | integer | null | Frame height in pixels. |
kbps | integer | null | Bitrate of everything received (video, audio, overhead), averaged over about 30 s. |
observed_at | string | When this was measured. |
limit_warning | string | null | Set while a limit is broken: limit_bitrate or limit_resolution. Still broken 20 s later, the stream ends with that end_reason. |
keyframe_interval_seconds | number | null | Average seconds between the publisher’s keyframes. Null for browser (WHIP) publishers. |
keyframe_warning | boolean | True above 2.5 s. Set your encoder to a 2 s keyframe interval. A warning only; never ends a stream. |
Recording
The recording: one MP4 of the top quality, made after the stream ends. Null while pending.
| Field | Type | Description |
|---|---|---|
status | "recording" | "processing" | "ready" | "deleting" | "deleted" | "failed" | "not_recorded" | "none" | "legacy" | recording while live, then processing, ready, deleting, deleted, failed, not_recorded (record: false) or none (never went live). |
bytes | integer | null | MP4 size. |
duration_seconds | number | null | MP4 length. |
retention_days | integer | null | Days kept after it is ready. Null: until you delete it. |
ready_at | string | null | When the MP4 became downloadable. |
delete_at | string | null | When it will be deleted: the retention date, or 7 days after the balance reached zero, whichever is earlier. |
delete_reason | string | null | retention or zero_balance. |
deleted_at | string | null | When it was deleted. |
Cost
What this stream has cost so far at current rates. Only on GET /v1/streams/{id}. Amounts are decimal strings.
| Field | Type | Description |
|---|---|---|
total_usd | string | Everything below. |
delivery_bytes | integer | Bytes delivered to viewers, counted up to delivery_counted_until. |
delivery_usd | string | Delivery cost. |
delivery_counted_until | string | null | CDN logs are read an hour at a time, so delivery trails reality by up to about 80 minutes. |
ingest_seconds | integer | Seconds of publishing. |
ingest_usd | string | Encoding (abr_basic) or passthrough cost. |
storage_gb_hours | number | Recording storage used. |
storage_usd | string | Recording storage cost. |
Viewers
Viewer counts. While the stream runs, now is estimated from the hosted player: exact up to about 400 viewers, within about 5% above. After the fact, the CDN logs give the exact count for every player (hosted, your own, apps), about an hour later; peak and watch_minutes use them once they exist. Only on GET /v1/streams/{id}.
| Field | Type | Description |
|---|---|---|
now | object | null | Live estimate from the hosted player. Null when nobody is on the player or the stream is over. |
peak | integer | null | Most viewers in any one minute. |
peak_at | string | null | The start of that minute. |
watch_minutes | integer | null | Total minutes watched, all viewers together. |
source | "cdn" | "player" | null | Where peak and watch_minutes come from: cdn (every player, exact) or player (hosted player estimate, until the CDN count arrives). |
cdn_counted_until | string | null | CDN logs are read up to this time. |
replay_watch_minutes | integer | Minutes watched in the replay after the end, all viewers together. Exact from the CDN logs (every player, the hosted one or your own) up to cdn_counted_until, the hosted player's count after it. Not part of watch_minutes, which is the live audience. |
ViewerSeries
| Field | Type | Description |
|---|---|---|
object | string | Always viewer_series. |
stream_id | string | Stream id. Also the folder of its video on the CDN. |
player | array of object | Per minute, from the hosted player (live estimate). |
cdn | array of object | Per minute, from the CDN logs: average viewers watching at once, every player included. |
countries | array of object | Where the watch time came from, from the CDN logs (every player), largest first, up to 30. Grows hour by hour while the stream runs. |
replay_days | array of object | Replay viewing per UTC day, oldest first: exact from the CDN logs for the hours already read, the hosted player's count after. A day appears once anyone watched the replay that day. |
{
"object": "viewer_series",
"stream_id": "str_e1bzk3dxw9z9allei6n7",
"player": [
{
"minute": "2026-10-09T18:41:00.000Z",
"watching": 117,
"waiting": 0,
"buffering": 1
}
],
"cdn": [
{
"minute": "2026-10-09T18:41:00.000Z",
"viewers": 121.4
}
],
"countries": [
{
"country": "TR",
"watch_minutes": 1720,
"share_pct": 80.4
},
{
"country": "DE",
"watch_minutes": 420,
"share_pct": 19.6
}
],
"replay_days": []
}WebhookEndpoint
| Field | Type | Description |
|---|---|---|
object | string | Always webhook_endpoint. |
id | string | whk_… |
url | string | Where events are POSTed. https only. |
description | string | null | Your own note. |
events | array of "stream.live" | "stream.ended" | "stream.expired" | "stream.cancelled" | "recording.ready" | "recording.failed" | "recording.deleted" | "credit.low" | "credit.depleted" | "recordings.deletion_scheduled" | "balance.negative" | "balance.statement" | "balance.threshold" | Event types sent to this endpoint. |
all_events | boolean | True when subscribed to everything, including event types added later. |
enabled | boolean | False: nothing is sent. |
created_at | string | |
secret | string | whsec_…, for verifying signatures. Only on create, GET /v1/webhooks/{id} and rotation. |
{
"object": "webhook_endpoint",
"id": "whk_7m2k9x0q4b7c1d8e3a9f",
"url": "https://example.com/webhooks/justonair",
"description": "Production",
"events": [
"stream.live",
"stream.ended",
"recording.ready"
],
"all_events": false,
"enabled": true,
"created_at": "2026-10-01T09:00:00.000Z",
"secret": "whsec_..."
}WebhookEndpointList
| Field | Type | Description |
|---|---|---|
object | string | Always list. |
data | array of WebhookEndpoint | |
event_types | array of string | Every type an endpoint can subscribe to. |
{
"object": "list",
"data": [
{
"object": "webhook_endpoint",
"id": "whk_7m2k9x0q4b7c1d8e3a9f",
"url": "https://example.com/webhooks/justonair",
"description": "Production",
"events": [
"stream.live",
"stream.ended",
"recording.ready"
],
"all_events": false,
"enabled": true,
"created_at": "2026-10-01T09:00:00.000Z"
}
],
"event_types": [
"stream.live",
"stream.ended",
"recording.ready",
"credit.low"
]
}WebhookDeliveryList
| Field | Type | Description |
|---|---|---|
object | string | Always list. |
data | array of WebhookDelivery |
{
"object": "list",
"data": [
{
"object": "webhook_delivery",
"id": "dlv_9x0q4b7c1d8e3a9f5k2m",
"event_id": "evt_4b7c1d8e3a9f5k2m9x0q",
"event_type": "stream.live",
"stream_id": "str_e1bzk3dxw9z9allei6n7",
"status": "succeeded",
"attempts": 1,
"max_attempts": 8,
"next_attempt_at": null,
"last_attempt_at": "2026-10-09T18:05:13.000Z",
"last_status_code": 204,
"last_error": null,
"last_duration_ms": 182,
"delivered_at": "2026-10-09T18:05:13.000Z",
"created_at": "2026-10-09T18:05:12.000Z",
"payload": {
"type": "stream.live",
"timestamp": "2026-10-09T18:05:12.000Z",
"data": {
"object": "stream",
"id": "str_e1bzk3dxw9z9allei6n7",
"name": "Friday show",
"status": "live",
"channel_id": null,
"metadata": {
"show_id": "fri-42"
},
"created_at": "2026-10-09T18:00:00.000Z",
"went_live_at": "2026-10-09T18:05:12.000Z",
"ended_at": null,
"end_reason": null,
"recording": null
}
}
}
]
}WebhookDelivery
| Field | Type | Description |
|---|---|---|
object | string | Always webhook_delivery. |
id | string | dlv_… |
event_id | string | evt_…, the webhook-id header. |
event_type | string | |
stream_id | string | null | |
status | "pending" | "succeeded" | "failed" | |
attempts | integer | |
max_attempts | integer | |
next_attempt_at | string | null | |
last_attempt_at | string | null | |
last_status_code | integer | null | What your server answered. |
last_error | string | null | Why the last attempt failed (answered 500, a timeout, a DNS error, …). |
last_duration_ms | integer | null | |
delivered_at | string | null | |
created_at | string | |
payload | WebhookEvent |
{
"object": "webhook_delivery",
"id": "dlv_9x0q4b7c1d8e3a9f5k2m",
"event_id": "evt_4b7c1d8e3a9f5k2m9x0q",
"event_type": "stream.live",
"stream_id": "str_e1bzk3dxw9z9allei6n7",
"status": "succeeded",
"attempts": 1,
"max_attempts": 8,
"next_attempt_at": null,
"last_attempt_at": "2026-10-09T18:05:13.000Z",
"last_status_code": 204,
"last_error": null,
"last_duration_ms": 182,
"delivered_at": "2026-10-09T18:05:13.000Z",
"created_at": "2026-10-09T18:05:12.000Z",
"payload": {
"type": "stream.live",
"timestamp": "2026-10-09T18:05:12.000Z",
"data": {
"object": "stream",
"id": "str_e1bzk3dxw9z9allei6n7",
"name": "Friday show",
"status": "live",
"channel_id": null,
"metadata": {
"show_id": "fri-42"
},
"created_at": "2026-10-09T18:00:00.000Z",
"went_live_at": "2026-10-09T18:05:12.000Z",
"ended_at": null,
"end_reason": null,
"recording": null
}
}
}WebhookEvent
The body of every webhook. Headers: webhook-id, webhook-timestamp, webhook-signature (Standard Webhooks).
| Field | Type | Description |
|---|---|---|
type | "stream.live" | "stream.ended" | "stream.expired" | "stream.cancelled" | "recording.ready" | "recording.failed" | "recording.deleted" | "credit.low" | "credit.depleted" | "recordings.deletion_scheduled" | "balance.negative" | "balance.statement" | "balance.threshold" | "webhook.test" | |
timestamp | string | When it happened. |
data | object | For stream and recording events, the stream at that moment (object: stream). For credit.low and credit.depleted, your credit (object: credit). For recordings.deletion_scheduled, what will be deleted and when (object: recordings_deletion). For balance.* (postpaid accounts), the amount owed (object: balance). For webhook.test, the endpoint. |
Stream
| Field | Type | Description |
|---|---|---|
id | string | Stream id. Also the folder of its video on the CDN. |
object | string | Always stream. |
name | string | null | Your label, up to 100 characters. Shown on the hosted player unless player.show_name is false. |
status | "pending" | "live" | "ended" | "expired" | "cancelled" | pending (waiting for the publisher, up to 30 min), live, ended, expired (nothing connected in time) or cancelled (deleted before going live). |
channel_id | string | null | The channel whose key started this stream. Null for streams you created with POST /v1/streams. |
profile | "abr_basic" | "passthrough" | abr_basic: several qualities for viewers. passthrough: exactly what you send. |
record | boolean | Whether an MP4 is made after the stream ends. |
replay | boolean | After the end, the hosted player plays the recording to viewers, once it is ready and for as long as it is kept. See Replay. |
recording | Recording | |
node_ready | boolean | The ingest server is up. False for about a minute when a new server has to start. |
rtmp_url | string | null | RTMP server URL for OBS or ffmpeg. Use with stream_key. |
playback_url | string | null | Signed HLS URL for your own player. Null once the stream is finished (the live video is gone; see replay and the recording). Re-signed on every read. |
playback_url_expires_at | string | null | When playback_url stops working. |
embed_url | string | The hosted player page. Put it in an iframe or share it as a link. |
renditions | array of string | Qualities viewers will get, e.g. ["source", "480p"]. |
max_ingest_resolution | integer | The tallest video you declared you will send: 480, 720 or 1080. |
max_duration_seconds | integer | The stream ends after this long live. 4 h for new accounts, 24 h for trusted ones. |
metadata | object | null | Your own JSON, up to 2 KB. Never shown to viewers. |
player | PlayerSettings | |
thumbnail | Thumbnail | |
chat | ChatSettings | |
reservation_expires_at | string | null | While pending: when the reserved slot is released and the stream expires. |
reservation_expires_in_seconds | integer | null | The same as a countdown, computed by the server. |
created_at | string | |
went_live_at | string | null | |
ended_at | string | null | |
end_reason | string | null | Why it ended: deleted, disconnected, duration_limit, reservation_ttl, limit_bitrate, limit_resolution, insufficient_credit, simulcast_not_supported, provision_failed. |
ingest | Ingest | |
cost | Cost | |
viewers | Viewers | |
viewers_now | integer | null | Watching on the hosted player right now (the same estimate as viewers.now.watching). Null unless the stream is pending or live and someone is on the player. Also in the list, so one call shows every live audience. |
{
"id": "str_e1bzk3dxw9z9allei6n7",
"object": "stream",
"name": "Friday show",
"status": "live",
"channel_id": null,
"profile": "abr_basic",
"record": true,
"replay": false,
"recording": {
"status": "recording",
"bytes": null,
"duration_seconds": null,
"retention_days": 30,
"ready_at": null,
"delete_at": null,
"delete_reason": null,
"deleted_at": null
},
"node_ready": true,
"rtmp_url": "rtmp://ingest-1.justonair.com:1935/abr-basic",
"playback_url": "https://live.joacdn.com/bcdn_token=HS256-...&token_path=%2Fstr_e1bzk3dxw9z9allei6n7%2F&expires=1791579600/str_e1bzk3dxw9z9allei6n7/master.m3u8",
"playback_url_expires_at": "2026-10-09T20:30:00.000Z",
"embed_url": "https://play.joacdn.com/str_e1bzk3dxw9z9allei6n7",
"renditions": [
"source",
"480p"
],
"max_ingest_resolution": 720,
"max_duration_seconds": 14400,
"metadata": {
"show_id": "fri-42"
},
"player": {
"enabled": true,
"show_name": true,
"require_viewer_token": false,
"max_height": null,
"watch_minutes_limit": null,
"allowed_domains": [],
"closed_at": null
},
"thumbnail": {
"public": false,
"url": "https://live.joacdn.com/bcdn_token=HS256-...&expires=1791576000/str_e1bzk3dxw9z9allei6n7/thumbs/latest.jpg",
"captured_at": "2026-10-09T18:41:00.000Z",
"public_url": null
},
"chat": {
"enabled": true,
"reactions": true,
"moderation_group": null,
"host_name": null,
"visible_after_end": false,
"builtin_word_filter": true
},
"reservation_expires_at": null,
"reservation_expires_in_seconds": null,
"created_at": "2026-10-09T18:00:00.000Z",
"went_live_at": "2026-10-09T18:05:12.000Z",
"ended_at": null,
"end_reason": null,
"ingest": {
"width": 1280,
"height": 720,
"kbps": 2710,
"observed_at": "2026-10-09T18:41:58.000Z",
"limit_warning": null,
"keyframe_interval_seconds": 2,
"keyframe_warning": false
},
"viewers_now": 118,
"cost": {
"total_usd": "0.122000",
"delivery_bytes": 1912602624,
"delivery_usd": "0.053400",
"delivery_counted_until": "2026-10-09T18:00:00.000Z",
"ingest_seconds": 2206,
"ingest_usd": "0.110300",
"storage_gb_hours": 0,
"storage_usd": "0.000000"
},
"viewers": {
"now": {
"watching": 118,
"waiting": 0,
"buffering_pct": 0.8,
"measured_at": "2026-10-09T18:42:00.000Z",
"exact": true
},
"peak": 131,
"peak_at": "2026-10-09T18:31:00.000Z",
"watch_minutes": 2140,
"source": "player",
"cdn_counted_until": "2026-10-09T18:00:00.000Z",
"replay_watch_minutes": 0
}
}CreatedStream
A stream plus its secrets. Returned once, by the create call (and by replacing the key). Store them; they are never shown again.
| Field | Type | Description |
|---|---|---|
id | string | Stream id. Also the folder of its video on the CDN. |
object | string | Always stream. |
name | string | null | Your label, up to 100 characters. Shown on the hosted player unless player.show_name is false. |
status | "pending" | "live" | "ended" | "expired" | "cancelled" | pending (waiting for the publisher, up to 30 min), live, ended, expired (nothing connected in time) or cancelled (deleted before going live). |
channel_id | string | null | The channel whose key started this stream. Null for streams you created with POST /v1/streams. |
profile | "abr_basic" | "passthrough" | abr_basic: several qualities for viewers. passthrough: exactly what you send. |
record | boolean | Whether an MP4 is made after the stream ends. |
replay | boolean | After the end, the hosted player plays the recording to viewers, once it is ready and for as long as it is kept. See Replay. |
recording | Recording | |
node_ready | boolean | The ingest server is up. False for about a minute when a new server has to start. |
rtmp_url | string | null | RTMP server URL for OBS or ffmpeg. Use with stream_key. |
playback_url | string | null | Signed HLS URL for your own player. Null once the stream is finished (the live video is gone; see replay and the recording). Re-signed on every read. |
playback_url_expires_at | string | null | When playback_url stops working. |
embed_url | string | The hosted player page. Put it in an iframe or share it as a link. |
renditions | array of string | Qualities viewers will get, e.g. ["source", "480p"]. |
max_ingest_resolution | integer | The tallest video you declared you will send: 480, 720 or 1080. |
max_duration_seconds | integer | The stream ends after this long live. 4 h for new accounts, 24 h for trusted ones. |
metadata | object | null | Your own JSON, up to 2 KB. Never shown to viewers. |
player | PlayerSettings | |
thumbnail | Thumbnail | |
chat | ChatSettings | |
reservation_expires_at | string | null | While pending: when the reserved slot is released and the stream expires. |
reservation_expires_in_seconds | integer | null | The same as a countdown, computed by the server. |
created_at | string | |
went_live_at | string | null | |
ended_at | string | null | |
end_reason | string | null | Why it ended: deleted, disconnected, duration_limit, reservation_ttl, limit_bitrate, limit_resolution, insufficient_credit, simulcast_not_supported, provision_failed. |
ingest | Ingest | |
cost | Cost | |
viewers | Viewers | |
viewers_now | integer | null | Watching on the hosted player right now (the same estimate as viewers.now.watching). Null unless the stream is pending or live and someone is on the player. Also in the list, so one call shows every live audience. |
stream_key | string | RTMP stream key, {id}?key={secret}. OBS: paste as Stream Key with rtmp_url as Server. One-shot: works for this stream only. |
whip_url | string | WHIP endpoint for browsers and WebRTC encoders. Contains the secret. |
{
"id": "str_e1bzk3dxw9z9allei6n7",
"object": "stream",
"name": "Friday show",
"status": "pending",
"channel_id": null,
"profile": "abr_basic",
"record": true,
"replay": false,
"recording": null,
"node_ready": true,
"rtmp_url": "rtmp://ingest-1.justonair.com:1935/abr-basic",
"playback_url": "https://live.joacdn.com/bcdn_token=HS256-...&token_path=%2Fstr_e1bzk3dxw9z9allei6n7%2F&expires=1791579600/str_e1bzk3dxw9z9allei6n7/master.m3u8",
"playback_url_expires_at": "2026-10-09T20:30:00.000Z",
"embed_url": "https://play.joacdn.com/str_e1bzk3dxw9z9allei6n7",
"renditions": [
"source",
"480p"
],
"max_ingest_resolution": 720,
"max_duration_seconds": 14400,
"metadata": {
"show_id": "fri-42"
},
"player": {
"enabled": true,
"show_name": true,
"require_viewer_token": false,
"max_height": null,
"watch_minutes_limit": null,
"allowed_domains": [],
"closed_at": null
},
"thumbnail": {
"public": false,
"url": null,
"captured_at": null,
"public_url": null
},
"chat": {
"enabled": true,
"reactions": true,
"moderation_group": null,
"host_name": null,
"visible_after_end": false,
"builtin_word_filter": true
},
"reservation_expires_at": "2026-10-09T18:30:00.000Z",
"reservation_expires_in_seconds": 1800,
"created_at": "2026-10-09T18:00:00.000Z",
"went_live_at": null,
"ended_at": null,
"end_reason": null,
"ingest": null,
"stream_key": "str_e1bzk3dxw9z9allei6n7?key=...",
"whip_url": "https://ingest-1.justonair.com:3334/abr-basic/str_e1bzk3dxw9z9allei6n7?direction=whip&key=..."
}StreamList
| Field | Type | Description |
|---|---|---|
object | string | Always list. |
data | array of Stream | |
has_more | boolean | More streams after the last one. Pass its id as starting_after. |
{
"object": "list",
"data": [
{
"id": "str_e1bzk3dxw9z9allei6n7",
"object": "stream",
"name": "Friday show",
"status": "live",
"channel_id": null,
"profile": "abr_basic",
"record": true,
"replay": false,
"recording": {
"status": "recording",
"bytes": null,
"duration_seconds": null,
"retention_days": 30,
"ready_at": null,
"delete_at": null,
"delete_reason": null,
"deleted_at": null
},
"node_ready": true,
"rtmp_url": "rtmp://ingest-1.justonair.com:1935/abr-basic",
"playback_url": "https://live.joacdn.com/bcdn_token=HS256-...&token_path=%2Fstr_e1bzk3dxw9z9allei6n7%2F&expires=1791579600/str_e1bzk3dxw9z9allei6n7/master.m3u8",
"playback_url_expires_at": "2026-10-09T20:30:00.000Z",
"embed_url": "https://play.joacdn.com/str_e1bzk3dxw9z9allei6n7",
"renditions": [
"source",
"480p"
],
"max_ingest_resolution": 720,
"max_duration_seconds": 14400,
"metadata": {
"show_id": "fri-42"
},
"player": {
"enabled": true,
"show_name": true,
"require_viewer_token": false,
"max_height": null,
"watch_minutes_limit": null,
"allowed_domains": [],
"closed_at": null
},
"thumbnail": {
"public": false,
"url": "https://live.joacdn.com/bcdn_token=HS256-...&expires=1791576000/str_e1bzk3dxw9z9allei6n7/thumbs/latest.jpg",
"captured_at": "2026-10-09T18:41:00.000Z",
"public_url": null
},
"chat": {
"enabled": true,
"reactions": true,
"moderation_group": null,
"host_name": null,
"visible_after_end": false,
"builtin_word_filter": true
},
"reservation_expires_at": null,
"reservation_expires_in_seconds": null,
"created_at": "2026-10-09T18:00:00.000Z",
"went_live_at": "2026-10-09T18:05:12.000Z",
"ended_at": null,
"end_reason": null,
"ingest": {
"width": 1280,
"height": 720,
"kbps": 2710,
"observed_at": "2026-10-09T18:41:58.000Z",
"limit_warning": null,
"keyframe_interval_seconds": 2,
"keyframe_warning": false
},
"viewers_now": 118
}
],
"has_more": true
}CreateStreamRequest
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. Blank means no name. |
profile | "abr_basic" | "passthrough" | Default abr_basic. |
max_resolution | 480 | 720 | 1080 | The tallest video you will send. Default 720. 1080 needs a trusted account. Sending more than you declare ends the stream after a 20 s warning. |
record | boolean | Make an MP4 after the stream ends. Default true. |
replay | boolean | After the end, the hosted player plays the recording. Default false. Needs record. |
recording_retention_days | integer | null | Days to keep the MP4, 1–3650. Omit for the account default (30). Null: keep until deleted. |
metadata | object | Your own JSON, up to 2 KB. |
player | PlayerSettings | |
thumbnail | ThumbnailSettings | |
chat | ChatSettings |
UpdateStreamRequest
Only these fields can change, in any status. Null clears a field; metadata is replaced whole.
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. |
replay | boolean | Turn replay on or off, also after the end. Needs record. |
metadata | object | null | |
player | PlayerSettings | |
thumbnail | ThumbnailSettings | |
chat | ChatSettings |
ChannelDefaults
The settings each of the channel’s streams starts with: the fields of POST /v1/streams without name and profile. On update, a field you send replaces the stored one, null removes it (back to the account default), one you leave out stays. A stream already on air keeps the settings it started with; change it with PATCH /v1/streams/{id}.
| Field | Type | Description |
|---|---|---|
max_resolution | 480 | 720 | 1080 | null | The tallest video you will send. Default 720. |
record | boolean | null | Make an MP4 of each stream. Default true. |
replay | boolean | null | Replay each stream on the hosted player after it ends. Default false. Between streams, the channel’s page plays the newest one. |
recording_retention_days | integer | null | Days to keep each MP4, 1–3650. Not set: the account default. |
metadata | object | null | Copied onto each stream. Up to 2 KB. |
player | object | |
thumbnail | object | |
chat | object | Chat for each stream. moderation_group defaults to the channel id, so bans carry from one stream to the next. |
Channel
| Field | Type | Description |
|---|---|---|
id | string | Channel id. Also the path of its hosted player page. |
object | string | Always channel. |
name | string | null | Your label, up to 100 characters. Each of the channel’s streams is named after it. |
status | "active" | "disabled" | active, or disabled: the key is refused and the player page says unavailable. |
profile | "abr_basic" | "passthrough" | Fixed for the life of the channel: it is part of rtmp_url. |
rtmp_url | string | RTMP server URL to save in OBS once. Use with stream_key. |
embed_url | string | The channel’s player page. It shows the stream on air, or a waiting page (with a countdown when scheduled_at is set). |
live_stream_id | string | null | The channel’s stream on air right now, or null. Its playback_url is on GET /v1/streams/{id}. |
scheduled_at | string | null | When the next stream is planned, for the waiting page’s countdown. Reserves nothing. |
defaults | ChannelDefaults | |
stream_key_rotated_at | string | null | When the key was last replaced. |
created_at | string | |
updated_at | string | |
deleted_at | string | null | Set on the answer to a delete. |
{
"id": "chn_7q2m4b8c1d5e6f3k9x0a",
"object": "channel",
"name": "Sunday service",
"status": "active",
"profile": "abr_basic",
"rtmp_url": "rtmp://rtmp.justonair.com:1935/abr-basic",
"embed_url": "https://play.joacdn.com/chn_7q2m4b8c1d5e6f3k9x0a",
"live_stream_id": "str_e1bzk3dxw9z9allei6n7",
"scheduled_at": "2026-10-11T08:00:00.000Z",
"defaults": {
"max_resolution": 1080,
"recording_retention_days": 90,
"chat": {
"enabled": true,
"reactions": true
}
},
"stream_key_rotated_at": null,
"created_at": "2026-10-09T12:00:00.000Z",
"updated_at": "2026-10-09T12:00:00.000Z",
"deleted_at": null
}CreatedChannel
A channel plus its key. Returned when it is created and when the key is replaced. Store them; they are never shown again.
| Field | Type | Description |
|---|---|---|
id | string | Channel id. Also the path of its hosted player page. |
object | string | Always channel. |
name | string | null | Your label, up to 100 characters. Each of the channel’s streams is named after it. |
status | "active" | "disabled" | active, or disabled: the key is refused and the player page says unavailable. |
profile | "abr_basic" | "passthrough" | Fixed for the life of the channel: it is part of rtmp_url. |
rtmp_url | string | RTMP server URL to save in OBS once. Use with stream_key. |
embed_url | string | The channel’s player page. It shows the stream on air, or a waiting page (with a countdown when scheduled_at is set). |
live_stream_id | string | null | The channel’s stream on air right now, or null. Its playback_url is on GET /v1/streams/{id}. |
scheduled_at | string | null | When the next stream is planned, for the waiting page’s countdown. Reserves nothing. |
defaults | ChannelDefaults | |
stream_key_rotated_at | string | null | When the key was last replaced. |
created_at | string | |
updated_at | string | |
deleted_at | string | null | Set on the answer to a delete. |
stream_key | string | RTMP stream key, {channel id}?key={secret}. OBS: paste as Stream Key with rtmp_url as Server. Persistent: works for every stream of the channel until you replace it. |
whip_url | string | WHIP endpoint for browsers and WebRTC encoders. Contains the secret. |
{
"id": "chn_7q2m4b8c1d5e6f3k9x0a",
"object": "channel",
"name": "Sunday service",
"status": "active",
"profile": "abr_basic",
"rtmp_url": "rtmp://rtmp.justonair.com:1935/abr-basic",
"embed_url": "https://play.joacdn.com/chn_7q2m4b8c1d5e6f3k9x0a",
"live_stream_id": null,
"scheduled_at": "2026-10-11T08:00:00.000Z",
"defaults": {
"max_resolution": 1080,
"recording_retention_days": 90,
"chat": {
"enabled": true,
"reactions": true
}
},
"stream_key_rotated_at": null,
"created_at": "2026-10-09T12:00:00.000Z",
"updated_at": "2026-10-09T12:00:00.000Z",
"deleted_at": null,
"stream_key": "chn_7q2m4b8c1d5e6f3k9x0a?key=...",
"whip_url": "https://rtmp.justonair.com:3334/abr-basic/chn_7q2m4b8c1d5e6f3k9x0a?direction=whip&key=..."
}ChannelList
| Field | Type | Description |
|---|---|---|
object | string | Always list. |
data | array of Channel | |
has_more | boolean | More channels after the last one. Pass its id as starting_after. |
{
"object": "list",
"data": [
{
"id": "chn_7q2m4b8c1d5e6f3k9x0a",
"object": "channel",
"name": "Sunday service",
"status": "active",
"profile": "abr_basic",
"rtmp_url": "rtmp://rtmp.justonair.com:1935/abr-basic",
"embed_url": "https://play.joacdn.com/chn_7q2m4b8c1d5e6f3k9x0a",
"live_stream_id": "str_e1bzk3dxw9z9allei6n7",
"scheduled_at": "2026-10-11T08:00:00.000Z",
"defaults": {
"max_resolution": 1080,
"recording_retention_days": 90,
"chat": {
"enabled": true,
"reactions": true
}
},
"stream_key_rotated_at": null,
"created_at": "2026-10-09T12:00:00.000Z",
"updated_at": "2026-10-09T12:00:00.000Z",
"deleted_at": null
}
],
"has_more": false
}CreateChannelRequest
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. |
profile | "abr_basic" | "passthrough" | Default abr_basic. Cannot be changed later. |
defaults | ChannelDefaults | |
scheduled_at | string | null | When the next stream is planned (ISO 8601). |
UpdateChannelRequest
| Field | Type | Description |
|---|---|---|
name | string | null | Up to 100 characters. Used from the next stream on. |
status | "active" | "disabled" | disabled refuses the key from now on (a stream on air keeps running); active turns it back on. |
defaults | ChannelDefaults | |
scheduled_at | string | null |
PlaybackToken
| Field | Type | Description |
|---|---|---|
object | string | Always playback_token. |
stream_id | string | Stream id. Also the folder of its video on the CDN. |
playback_url | string | Signed HLS URL. |
expires_at | string | null |
{
"object": "playback_token",
"stream_id": "str_e1bzk3dxw9z9allei6n7",
"playback_url": "https://live.joacdn.com/bcdn_token=HS256-...&token_path=%2Fstr_e1bzk3dxw9z9allei6n7%2F&expires=1791579600/str_e1bzk3dxw9z9allei6n7/master.m3u8",
"expires_at": "2026-10-09T18:52:00.000Z"
}RecordingDownload
| Field | Type | Description |
|---|---|---|
object | string | Always recording_download. |
stream_id | string | Stream id. Also the folder of its video on the CDN. |
url | string | Signed link to the MP4 on the CDN, ending in ?download=1: a browser saves the file instead of playing it. Downloading it counts as delivery. |
bytes | integer | MP4 size. |
expires_at | string |
{
"object": "recording_download",
"stream_id": "str_e1bzk3dxw9z9allei6n7",
"url": "https://live.joacdn.com/bcdn_token=HS256-...&expires=1791583200/_rec/str_e1bzk3dxw9z9allei6n7/recording.mp4?download=1",
"bytes": 1287651328,
"expires_at": "2026-10-09T21:00:00.000Z"
}Embed
What the hosted player needs. Public: no key, any origin may read it.
| Field | Type | Description |
|---|---|---|
object | string | Always embed. |
id | string | The stream. For a channel id: the channel’s stream on air, or the channel id itself while nothing is (status pending, the waiting page). |
status | "pending" | "live" | "ended" | "unavailable" | "closed" | pending, live, ended, unavailable (expired or cancelled), or closed (the watch-time budget player.watch_minutes_limit is used up; the stream may still be running). |
title | string | null | The stream name when it is to be shown, otherwise null. |
playback_url | string | null | While live: a signed HLS URL, the same for every viewer. |
playback_url_expires_at | string | null | |
max_height | integer | null | Offer no quality taller than this (player.max_height). Null: all. |
went_live_at | string | null | |
ended_at | string | null | |
poll_after_seconds | integer | null | Ask again after this many seconds (5 pending, 60 live). Null: stop asking. |
beacon | object | null | Viewer counting: a player whose random number is below rate reports every interval_seconds (see Count viewers from your own player). Null once the stream is over. |
poster_url | string | null | The newest frame, when the owner made thumbnails public (thumbnail.public). Null otherwise, before the first frame, and while the hosted player is off. |
chat | object | null | Whether to load chat at all. Null when chat is off for this stream. The messages come from GET /v1/embed/{id}/chat. |
replay | object | null | After the end, when the owner turned replay on and the recording is ready: an MP4 to play (signed; the same for every viewer for a few hours). Null otherwise, also while the recording is still being made (then poll_after_seconds says when to ask again). |
access | "public" | "viewer_token" | public: anyone with the link watches. viewer_token: members only (player.require_viewer_token): this read has no playback URL; open a session with a viewer token to get one. |
channel | object | null | Read by channel id: the channel, and when its next stream is planned. Null when read by stream id. |
{
"object": "embed",
"id": "str_e1bzk3dxw9z9allei6n7",
"status": "live",
"title": "Friday show",
"playback_url": "https://live.joacdn.com/bcdn_token=HS256-...&token_path=%2Fstr_e1bzk3dxw9z9allei6n7%2F&expires=1791579600/str_e1bzk3dxw9z9allei6n7/master.m3u8",
"playback_url_expires_at": "2026-10-09T20:30:00.000Z",
"max_height": null,
"went_live_at": "2026-10-09T18:05:12.000Z",
"ended_at": null,
"poll_after_seconds": 60,
"beacon": {
"rate": 1,
"interval_seconds": 30
},
"poster_url": null,
"chat": {
"enabled": true,
"reactions": true,
"state": "open"
},
"channel": null,
"replay": null,
"access": "public"
}ChatState
open: viewers post and react. paused: messages visible, only the owner posts. read_only: after the end, kept visible by the owner. closed: not open (yet, or any more), nothing shown. off: chat is off for this stream.
One of open, paused, read_only, closed, off.
ViewerSession
A viewer session signed by JustOnAir. Needed to post and react; also accepted by viewer beats. Keep it per browser and stream (e.g. in localStorage) until it expires.
| Field | Type | Description |
|---|---|---|
object | string | Always viewer_session. |
token | string | Send as token (posts) or t (reactions, beats). Scoped to this stream. |
session_id | string | The session as moderators see it. |
u | number | This session's sampling number, 0 ≤ u < 1, drawn by the server. Send reaction batches only while u is below reaction_sampling.rate. |
expires_at | string | 24 hours after it was issued. |
viewer | object | null | Who the viewer is, when the session was opened with a viewer_token. Null for an anonymous viewer. See Viewer tokens. |
moderator | object | With a viewer token whose role is moderator: their moderator session, as a moderator link would give. Null otherwise, and when you removed this moderator. |
playback | object | Members-only streams, with a viewer token: this viewer's own playback URLs. Null for streams anyone may watch (the embed read has the URL). |
{
"object": "viewer_session",
"token": "vs2....",
"session_id": "vsn_k2m9x0q4b7c1d8e3",
"u": 0.4182,
"expires_at": "2026-10-10T18:40:00.000Z",
"viewer": {
"id": "user-123",
"name": "Ayşe Yılmaz",
"role": "viewer"
},
"moderator": null,
"playback": null
}MemberPlayback
One member's own playback URLs on a members-only stream. They stop working at expires_at (a few minutes, never past the viewer token's exp): renew them before, with POST /v1/embed/{id}/playback.
| Field | Type | Description |
|---|---|---|
url | string | null | The live HLS playlist, signed for this viewer. Null unless the stream is live. |
replay_url | string | null | The replay MP4, signed for this viewer. Null unless the stream ended and its replay is ready. |
expires_at | string |
MemberPlaybackRenewal
| Field | Type | Description |
|---|---|---|
object | string | Always member_playback. |
playback | object | Null when the stream is not members only. |
{
"object": "member_playback",
"playback": {
"url": "https://live.joacdn.com/bcdn_token=...&expires=1791548100&token_path=%2Fstr_e1bzk3dxw9z9allei6n7%2F/str_e1bzk3dxw9z9allei6n7/ts:master.m3u8",
"replay_url": null,
"expires_at": "2026-10-09T18:55:00.000Z"
}
}Attendance
One viewer known by a viewer token, and how long they watched this stream.
| Field | Type | Description |
|---|---|---|
object | string | Always attendance. |
viewer_id | string | Your id for the viewer (the token's sub). |
name | string | null | The token's name, the last one seen. |
watch_seconds | integer | Time spent playing the stream live in the hosted player (paused and waiting time not counted). |
replay_seconds | integer | Time spent playing the replay after the end (paused time not counted). Not part of watch_seconds. |
first_seen_at | string | |
last_seen_at | string |
AttendanceList
| Field | Type | Description |
|---|---|---|
object | string | Always list. |
data | array of Attendance | |
has_more | boolean | |
next_after | string | null | Pass as after for the next page. |
total | integer | Viewers on the list in all. |
{
"object": "list",
"data": [
{
"object": "attendance",
"viewer_id": "user-123",
"name": "Ayşe Yılmaz",
"watch_seconds": 2820,
"replay_seconds": 0,
"first_seen_at": "2026-10-09T18:00:12.000Z",
"last_seen_at": "2026-10-09T18:47:40.000Z"
}
],
"has_more": false,
"next_after": null,
"total": 1
}ChatMessage
A message as every viewer sees it. Always plain text: escape it, never render it as HTML.
| Field | Type | Description |
|---|---|---|
object | string | chat_message when returned on its own; absent inside lists. |
id | string | Message id. |
nickname | string | The sender's nickname, or the owner's display name. |
text | string | 1–200 characters. |
role | "host" | "moderator" | null | Set only on the owner's posts: show a Host or Moderator badge. A viewer can never set it, whatever their nickname. |
verified | boolean | The nickname is the name from your viewer token: nobody else can post under it. Show a check mark. |
created_at | string |
{
"object": "chat_message",
"id": "msg_3k9x0a7q2m4b8c1d5e6f",
"nickname": "Ayşe",
"text": "Merhaba!",
"role": null,
"verified": false,
"created_at": "2026-10-09T18:42:03.000Z"
}ChatRead
The public chat read: the same answer for every viewer for 2 s. Poll it every poll_after_seconds.
| Field | Type | Description |
|---|---|---|
object | string | Always chat. |
stream_id | string | Stream id. Also the folder of its video on the CDN. |
state | ChatState | |
slow_mode_seconds | integer | Seconds a viewer must wait between messages (the owner's slow mode, or automatic slow mode under heavy traffic). 0: off, though every viewer still waits 3 s. |
slow_mode_auto | boolean | Slow mode was raised automatically because chat is very busy. |
messages | array of ChatMessage | The last 50 visible messages, oldest first. |
deleted_ids | array of string | Messages deleted in the last 5 minutes: remove them if you show them. |
cleared_at | string | null | The owner cleared the chat: remove every message created at or before this. |
pinned | object | The pinned message, shown above the chat. |
reactions_enabled | boolean | Show the reaction bar. |
reactions | object | Reactions since the previous read, per emoji (estimated under load). Play them as a burst. Keys: heart ❤️ clap 👏 laugh 😂 fire 🔥 party 🎉 wow 😮. |
reaction_timeline | array of object | Reactions on the video clock: totals per second of video for the last 60 seconds, oldest first, seconds with none left out. at is the second of the stream's EXT-X-PROGRAM-DATE-TIME the reacting viewers were watching (Unix seconds). Every read has the whole window and a second's total can still grow, so draw what you haven't drawn yet when your own picture reaches at: see Reactions on the video clock. Use reactions instead when you have no video clock. Empty while reactions are off. |
reaction_sampling | object | null | Send reaction batches only while your session's u is below rate, at most every interval_seconds. Null while reactions are off. |
poll_after_seconds | integer | 2 while open or paused; longer otherwise. |
{
"object": "chat",
"stream_id": "str_e1bzk3dxw9z9allei6n7",
"state": "open",
"slow_mode_seconds": 0,
"slow_mode_auto": false,
"messages": [
{
"id": "msg_3k9x0a7q2m4b8c1d5e6f",
"nickname": "Ayşe",
"text": "Merhaba!",
"role": null,
"verified": false,
"created_at": "2026-10-09T18:42:03.000Z"
}
],
"deleted_ids": [],
"cleared_at": null,
"pinned": null,
"reactions_enabled": true,
"reactions": {
"heart": 12,
"fire": 3
},
"reaction_timeline": [
{
"at": 1791547186,
"reactions": {
"heart": 9
}
},
{
"at": 1791547187,
"reactions": {
"heart": 3,
"fire": 3
}
}
],
"reaction_sampling": {
"rate": 1,
"interval_seconds": 3
},
"poll_after_seconds": 2
}ChatOwnerMessage
A message as the owner sees it: everything, including what viewers never see and why. Never the viewer's IP address.
| Field | Type | Description |
|---|---|---|
object | string | chat_message when returned on its own; absent inside lists. |
id | string | Message id. |
nickname | string | The sender's nickname, or the owner's display name. |
text | string | 1–200 characters. |
role | "host" | "moderator" | null | Set only on the owner's posts: show a Host or Moderator badge. A viewer can never set it, whatever their nickname. |
verified | boolean | The nickname is the name from your viewer token: nobody else can post under it. Show a check mark. |
created_at | string | |
seq | integer | Position in this stream's chat, from 1. The feed's cursor. |
session_id | string | null | The viewer session (ban by it). Null on your own posts. |
viewer_id | string | null | Your id for the viewer, when they came with a viewer token (ban by it). Null otherwise. |
fingerprint | string | null | 6 characters derived from the viewer's address: the same fingerprint under a new nickname is probably the same person. |
network | string | null | The viewer's network, never the address: IPv4 /24 (85.105.12.0/24) or IPv6 /48. |
country | string | null | ISO country code, best effort (DB-IP Lite). Null when unknown. |
asn | string | null | The viewer's network operator (ISP, mobile carrier, hosting or VPN provider), best effort. Null when unknown. |
deleted_at | string | null | When it was deleted. |
deleted_by | "owner" | "moderator" | null | Who deleted it: you (API key or dashboard) or a moderator. |
deleted_by_moderator | object | null | The moderator, when deleted_by is moderator. |
filtered | boolean | Hit the word filter: stored, never shown to viewers. |
shadow | boolean | Sent by a banned viewer: shown only in their own player. |
cleared | boolean | Posted before the last clear. |
visible | boolean | Viewers see it. |
{
"object": "chat_message",
"id": "msg_3k9x0a7q2m4b8c1d5e6f",
"nickname": "Ayşe",
"text": "Merhaba!",
"role": null,
"verified": false,
"created_at": "2026-10-09T18:42:03.000Z",
"seq": 42,
"session_id": "vsn_k2m9x0q4b7c1d8e3",
"viewer_id": null,
"fingerprint": "k3x9qa",
"network": "85.105.12.0/24",
"country": "TR",
"asn": "Turk Telekom",
"deleted_at": null,
"deleted_by": null,
"deleted_by_moderator": null,
"filtered": false,
"shadow": false,
"cleared": false,
"visible": true
}ChatFeed
The owner's chat feed. Poll with after = the previous next_after (every 1–2 s while live is fine).
| Field | Type | Description |
|---|---|---|
object | string | Always chat_feed. |
stream_id | string | Stream id. Also the folder of its video on the CDN. |
state | ChatState | |
slow_mode_seconds | integer | Your slow mode. |
effective_slow_mode_seconds | integer | What viewers get: yours, or automatic slow mode when that is higher. |
slow_mode_auto | boolean | Automatic slow mode is in force. |
paused | boolean | |
pinned_message_id | string | null | |
cleared_at | string | null | |
moderation_group | string | null | |
busy | boolean | Chat hit its hard limit within the last minute: some posts got chat_busy. |
messages | array of ChatOwnerMessage | Messages after after, oldest first. |
deleted_ids | array of string | Deleted in the last 5 minutes, including messages from before after. |
next_after | integer | Pass as after next time. |
has_more | boolean | More messages after this page: ask again at once. |
reactions | object | |
totals | object |
{
"object": "chat_feed",
"stream_id": "str_e1bzk3dxw9z9allei6n7",
"state": "open",
"slow_mode_seconds": 0,
"effective_slow_mode_seconds": 0,
"slow_mode_auto": false,
"paused": false,
"pinned_message_id": null,
"cleared_at": null,
"moderation_group": null,
"busy": false,
"messages": [
{
"id": "msg_3k9x0a7q2m4b8c1d5e6f",
"nickname": "Ayşe",
"text": "Merhaba!",
"role": null,
"verified": false,
"created_at": "2026-10-09T18:42:03.000Z",
"seq": 42,
"session_id": "vsn_k2m9x0q4b7c1d8e3",
"viewer_id": null,
"fingerprint": "k3x9qa",
"network": "85.105.12.0/24",
"country": "TR",
"asn": "Turk Telekom",
"deleted_at": null,
"deleted_by": null,
"deleted_by_moderator": null,
"filtered": false,
"shadow": false,
"cleared": false,
"visible": true
}
],
"deleted_ids": [],
"next_after": 42,
"has_more": false,
"reactions": {
"recent": {
"heart": 12,
"fire": 3
},
"total": {
"heart": 840,
"clap": 210,
"fire": 95
}
},
"totals": {
"messages_posted": 42,
"messages_shown": 40
}
}ChatBan
| Field | Type | Description |
|---|---|---|
object | string | Always chat_ban. |
id | string | |
scope | "stream" | "group" | stream, or group when the stream has a chat.moderation_group. |
moderation_group | string | null | |
session_id | string | null | The banned session; null when the ban is by viewer_id. |
viewer_id | string | null | Your id for the viewer (viewer tokens): banned on every device. Null for anonymous viewers. |
fingerprint | string | null | The banned address, as a fingerprint. Null for a ban by viewer_id: people behind the same address are not banned with them. |
nickname | string | null | Their nickname when banned. |
created_by | "owner" | "moderator" | null | Who banned: you or a moderator. |
created_by_moderator | object | null | The moderator, when created_by is moderator. |
created_at | string |
{
"object": "chat_ban",
"id": "ban_x8k2m0q4b7c1d8e3a9f5",
"scope": "stream",
"moderation_group": null,
"session_id": "vsn_k2m9x0q4b7c1d8e3",
"viewer_id": null,
"fingerprint": "k3x9qa",
"nickname": "spammer",
"created_by": "owner",
"created_by_moderator": null,
"created_at": "2026-10-09T18:44:10.000Z"
}ChatBanList
| Field | Type | Description |
|---|---|---|
object | string | Always list. |
data | array of ChatBan | |
has_more | boolean |
{
"object": "list",
"data": [
{
"object": "chat_ban",
"id": "ban_x8k2m0q4b7c1d8e3a9f5",
"scope": "stream",
"moderation_group": null,
"session_id": "vsn_k2m9x0q4b7c1d8e3",
"viewer_id": null,
"fingerprint": "k3x9qa",
"nickname": "spammer",
"created_by": "owner",
"created_by_moderator": null,
"created_at": "2026-10-09T18:44:10.000Z"
}
],
"has_more": false
}ChatModerator
Someone you invited to moderate by link, or whom your viewer token made a moderator. See Moderators.
| Field | Type | Description |
|---|---|---|
object | string | Always chat_moderator. |
id | string | |
name | string | Shown with the Moderator badge on their posts. |
scope | "stream" | "group" | group when the stream has a moderation group (they moderate all its streams), else stream. |
moderation_group | string | null | |
status | "invited" | "active" | "expired" | "revoked" | invited (link not opened yet), active, expired (link unused for 7 days, or their active_days ran out) or revoked. |
invite_expires_at | string | null | Until the link is opened. |
active_days | integer | How long they moderate after opening the link, 1–30 days (default 30). |
active_until | string | null | When they stop being a moderator: active_days after the link was opened. Null until then. |
redeemed_at | string | null | |
revoked_at | string | null | |
last_seen_at | string | null | Their last moderation request (to the minute). |
viewer_id | string | null | Made a moderator by a viewer token: your id for them. They stay one for a day after each sign-in. Null for a moderator invited by link. |
created_at | string | |
invite_url | string | Only in the answer to creating them: the single-use link, https://play.joacdn.com/{id}/chat#mod=…. Send it privately; whoever opens it first becomes this moderator. |
{
"object": "chat_moderator",
"id": "mod_3k9x0a7q2m4b8c1d5e6f",
"name": "Mert",
"scope": "stream",
"moderation_group": null,
"status": "invited",
"invite_expires_at": "2026-10-16T18:00:00.000Z",
"active_days": 7,
"active_until": null,
"redeemed_at": null,
"revoked_at": null,
"last_seen_at": null,
"viewer_id": null,
"created_at": "2026-10-09T18:00:00.000Z",
"invite_url": "https://play.joacdn.com/str_e1bzk3dxw9z9allei6n7/chat#mod=inv_..."
}ChatModeratorList
| Field | Type | Description |
|---|---|---|
object | string | Always list. |
data | array of ChatModerator | |
has_more | boolean |
{
"object": "list",
"data": [
{
"object": "chat_moderator",
"id": "mod_3k9x0a7q2m4b8c1d5e6f",
"name": "Mert",
"scope": "stream",
"moderation_group": null,
"status": "invited",
"invite_expires_at": "2026-10-16T18:00:00.000Z",
"active_days": 7,
"active_until": null,
"redeemed_at": null,
"revoked_at": null,
"last_seen_at": null,
"viewer_id": null,
"created_at": "2026-10-09T18:00:00.000Z"
}
],
"has_more": false
}ModeratorSession
The moderator session a link turns into. Keep it in the browser; send it as X-Moderator-Token.
| Field | Type | Description |
|---|---|---|
object | string | Always moderator_session. |
token | string | |
expires_at | string | active_days after the link was opened (at most 30 days); revoking ends it at once. |
moderator | ChatModerator |
{
"object": "moderator_session",
"token": "...",
"expires_at": "2026-10-16T18:10:00.000Z",
"moderator": {
"object": "chat_moderator",
"id": "mod_3k9x0a7q2m4b8c1d5e6f",
"name": "Mert",
"scope": "stream",
"moderation_group": null,
"status": "active",
"invite_expires_at": null,
"active_days": 7,
"active_until": "2026-10-16T18:10:00.000Z",
"redeemed_at": "2026-10-09T18:10:00.000Z",
"revoked_at": null,
"last_seen_at": "2026-10-09T18:44:00.000Z",
"viewer_id": null,
"created_at": "2026-10-09T18:00:00.000Z"
}
}ChatWords
| Field | Type | Description |
|---|---|---|
object | string | Always chat_words. |
scope | "stream" | "group" | group when the stream has a moderation group (the list is shared), else stream. |
moderation_group | string | null | |
words | array of string | Your words and phrases. Whole words, any case. |
builtin_word_filter | boolean | Whether the built-in list also applies (chat.builtin_word_filter). |
{
"object": "chat_words",
"scope": "stream",
"moderation_group": null,
"words": [
"spoiler"
],
"builtin_word_filter": true
}NotificationSettings
Which emails the account gets before its credit runs out. Webhooks are not affected: each endpoint gets the events it subscribes to.
| Field | Type | Description |
|---|---|---|
object | string | Always notification_settings. |
low_balance_email | boolean | Email when credit left drops below low_balance_threshold_usd, and when it runs out. Default true. |
low_balance_threshold_usd | string | Dollars, 1 to 10000, two decimals. Default "5.00". Also when credit.low fires. |
recording_deletion_email | boolean | Email when the 7 days at zero balance start, then 24 hours and 6 hours before recordings are deleted. Default true. |
balance_statement_email | boolean | Postpaid accounts: email when the balance goes below zero, every 14 days while it stays there, and when the amount owed passes 100, 500 and 1,000 USD. Default true. |
{
"object": "notification_settings",
"low_balance_email": true,
"low_balance_threshold_usd": "5.00",
"recording_deletion_email": true,
"balance_statement_email": true
}Usage
| Field | Type | Description |
|---|---|---|
object | string | Always usage. |
billing_mode | "prepaid" | "postpaid" | prepaid (default: live streams end at zero) or postpaid (by agreement: the balance can go below zero and nothing stops). |
balance_usd | string | Credit minus everything charged so far. |
available_usd | string | Balance minus used-but-not-yet-charged. Live streams end when this reaches zero. |
balance_depleted_at | string | null | Set while the balance is at or below zero. |
recordings_delete_at | string | null | 7 days after the balance reached zero: when recordings will be deleted unless you top up. |
rates | object | |
days | array of object |
{
"object": "usage",
"billing_mode": "prepaid",
"balance_usd": "46.214300",
"available_usd": "46.091200",
"balance_depleted_at": null,
"recordings_delete_at": null,
"rates": {
"delivery_usd_per_gb": "0.030000",
"transcode_usd_per_minute": "0.003000",
"passthrough_usd_per_minute": "0.000500",
"storage_usd_per_gb_month": "0.030000"
},
"days": [
{
"date": "2026-10-08",
"delivery_bytes": 9663676416,
"transcode_seconds": 3600,
"passthrough_seconds": 0,
"storage_gb_hours": 28.8,
"watch_minutes": 6100,
"cost_usd": "0.471200",
"charged": true
}
]
}