JustOnAir docs
View as Markdown

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

HTTP
POST /v1/streams

Reserves 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.

ParameterInTypeDescription
Idempotency-KeyheaderstringAny 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)

FieldTypeDescription
namestring | nullUp to 100 characters. Blank means no name.
profile"abr_basic" | "passthrough"Default abr_basic.
max_resolution480 | 720 | 1080The 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.
recordbooleanMake an MP4 after the stream ends. Default true.
replaybooleanAfter the end, the hosted player plays the recording. Default false. Needs record.
recording_retention_daysinteger | nullDays to keep the MP4, 1–3650. Omit for the account default (30). Null: keep until deleted.
metadataobjectYour own JSON, up to 2 KB.
playerPlayerSettings
thumbnailThumbnailSettings
chatChatSettings
JSON
{
  "name": "Friday show",
  "max_resolution": 720,
  "replay": true,
  "metadata": {
    "show_id": "fri-42"
  },
  "chat": {
    "enabled": true,
    "reactions": true
  }
}

Responses

StatusBodyMeaning
201CreatedStreamCreated. Store stream_key and whip_url now.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
402ErrorCredit below the 1.00 USD minimum (insufficient_credit).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
422ErrorThis Idempotency-Key was used with a different body (idempotency_key_reused).
429ErrorAn account limit: limit_pending_streams, limit_creation_rate, limit_ingest_hours, limit_resolution.
503ErrorNo ingest capacity right now (no_capacity). Retry shortly.

List streams

HTTP
GET /v1/streams

Newest first.

ParameterInTypeDescription
limitqueryinteger
starting_afterquerystringId of the last stream on the previous page.
statusquery"pending" | "live" | "ended" | "expired" | "cancelled"
channel_idquerystringOnly the streams of this channel.

Responses

StatusBodyMeaning
200StreamListA page of streams.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).

Get a stream

HTTP
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.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200StreamThe stream.
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
404ErrorNo such stream in your account (not_found).

Update a stream

HTTP
PATCH /v1/streams/{id}

Rename it, replace its metadata, or change player settings. Works in any status.

ParameterInTypeDescription
idpathstringStream id.

Body. Only these fields can change, in any status. Null clears a field; metadata is replaced whole.

FieldTypeDescription
namestring | nullUp to 100 characters.
replaybooleanTurn replay on or off, also after the end. Needs record.
metadataobject | null
playerPlayerSettings
thumbnailThumbnailSettings
chatChatSettings
JSON
{
  "name": "Friday show (moved)",
  "player": {
    "allowed_domains": [
      "example.com",
      "*.example.com"
    ]
  }
}

Responses

StatusBodyMeaning
200StreamThe stream.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
404ErrorNo such stream in your account (not_found).

End or cancel a stream

HTTP
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.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200StreamThe stream, now ended or cancelled.
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
404ErrorNo such stream in your account (not_found).

Replace a lost stream key

HTTP
POST /v1/streams/{id}/stream-key

Only while pending. The old key and WHIP URL stop working at once.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200CreatedStreamThe stream with new stream_key and whip_url.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409ErrorLive or finished (stream_not_pending).

Viewers per minute

HTTP
GET /v1/streams/{id}/viewers

The viewer curve: live estimates from the hosted player, and exact counts from the CDN logs about an hour later.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ViewerSeriesPer-minute counts from both sources.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).

Who watched

HTTP
GET /v1/streams/{id}/attendance

Viewers 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.

ParameterInTypeDescription
idpathstringStream id.
afterquerystringThe previous page's next_after.
limitqueryinteger

Responses

StatusBodyMeaning
200AttendanceListOne page of viewers.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo 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

HTTP
POST /v1/channels

Returns 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)

FieldTypeDescription
namestring | nullUp to 100 characters.
profile"abr_basic" | "passthrough"Default abr_basic. Cannot be changed later.
defaultsChannelDefaults
scheduled_atstring | nullWhen the next stream is planned (ISO 8601).
JSON
{
  "name": "Sunday service",
  "defaults": {
    "max_resolution": 1080,
    "recording_retention_days": 90,
    "chat": {
      "enabled": true,
      "reactions": true
    }
  },
  "scheduled_at": "2026-10-11T08:00:00Z"
}

Responses

StatusBodyMeaning
201CreatedChannelCreated. Store stream_key and whip_url now.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
429ErrorAn account limit: limit_channels, limit_resolution.
503ErrorNo ingest capacity right now (no_capacity). Retry shortly.

List channels

HTTP
GET /v1/channels

Newest first. A channel’s streams: GET /v1/streams?channel_id=.

ParameterInTypeDescription
limitqueryinteger
starting_afterquerystringId of the last channel on the previous page.

Responses

StatusBodyMeaning
200ChannelListA page of channels.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).

Get a channel

HTTP
GET /v1/channels/{id}

live_stream_id is the channel’s stream on air right now.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ChannelThe channel.
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
404ErrorNo such stream in your account (not_found).

Update a channel

HTTP
PATCH /v1/channels/{id}

Name, status, defaults and scheduled_at. Applies from the next stream.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
namestring | nullUp 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.
defaultsChannelDefaults
scheduled_atstring | null
JSON
{
  "scheduled_at": "2026-10-18T08:00:00Z",
  "defaults": {
    "recording_retention_days": null
  }
}

Responses

StatusBodyMeaning
200ChannelThe channel.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
404ErrorNo such stream in your account (not_found).
429Errorlimit_resolution.

Delete a channel

HTTP
DELETE /v1/channels/{id}

The key stops working and a stream on air is ended. The channel’s past streams and their recordings stay.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ChannelThe channel, with deleted_at.
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
404ErrorNo such stream in your account (not_found).

Replace a channel’s key

HTTP
POST /v1/channels/{id}/stream-key

The 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.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200CreatedChannelThe channel with the new stream_key and whip_url.
401ErrorMissing or invalid API key (unauthorized).
403ErrorAccount pending approval or suspended (account_pending, tenant_suspended).
404ErrorNo such stream in your account (not_found).

Playback

Signed URLs for your own player.

Sign a playback URL

HTTP
POST /v1/streams/{id}/playback-token

A fresh signed HLS URL, for example a short one per viewer minted by your backend. Refused once the stream is finished.

ParameterInTypeDescription
idpathstringStream id.

Body (optional)

FieldTypeDescription
expires_inintegerSeconds. Default: until the stream could no longer be live, plus an hour.
JSON
{
  "expires_in": 600
}

Responses

StatusBodyMeaning
200PlaybackTokenSigned URL.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409ErrorThe 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

HTTP
DELETE /v1/streams/{id}/recording

Deletes the MP4 now, or marks it to be deleted as soon as it exists.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200StreamThe stream; recording.status is deleted or deleting.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
HTTP
POST /v1/streams/{id}/recording/download
ParameterInTypeDescription
idpathstringStream id.

Body (optional)

FieldTypeDescription
expires_ininteger
JSON
{
  "expires_in": 3600
}

Responses

StatusBodyMeaning
200RecordingDownloadA signed link to the MP4.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409ErrorNot ready (recording_not_ready, with details.status).

Account

Balance and usage.

Balance and usage

HTTP
GET /v1/usage
ParameterInTypeDescription
daysqueryinteger

Responses

StatusBodyMeaning
200UsageBalance, rates and usage per UTC day.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).

Email settings

HTTP
GET /v1/account/notifications

Responses

StatusBodyMeaning
200NotificationSettingsThe settings.
401ErrorMissing or invalid API key (unauthorized).

Change email settings

HTTP
PATCH /v1/account/notifications

Send only the fields to change.

Body

FieldTypeDescription
low_balance_emailboolean
low_balance_threshold_usdnumber | string1 to 10000, at most two decimals: 12.5 or "12.50".
recording_deletion_emailboolean
balance_statement_emailboolean
JSON
{
  "low_balance_threshold_usd": "20.00"
}

Responses

StatusBodyMeaning
200NotificationSettingsThe settings after the change.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).

Webhooks

Endpoints that get stream and recording events, and their delivery log.

List webhook endpoints

HTTP
GET /v1/webhooks

Without secrets. Also returns event_types, every type an endpoint can subscribe to.

Responses

StatusBodyMeaning
200WebhookEndpointListYour endpoints.
401ErrorMissing or invalid API key (unauthorized).

Add a webhook endpoint

HTTP
POST /v1/webhooks

Up to 5 per account. The answer includes secret; see Webhooks for verifying signatures.

Body

FieldTypeDescription
urlstringhttps URL on the public internet, up to 2000 characters.
eventsarray 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.
descriptionstringUp to 200 characters.
JSON
{
  "url": "https://example.com/webhooks/justonair",
  "events": [
    "stream.live",
    "stream.ended",
    "recording.ready"
  ],
  "description": "Production"
}

Responses

StatusBodyMeaning
201WebhookEndpointThe endpoint, with its secret.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
429Error5 endpoints already (limit_webhook_endpoints).

Get a webhook endpoint

HTTP
GET /v1/webhooks/{id}

With its secret.

ParameterInTypeDescription
idpathstringEndpoint id (whk_…).

Responses

StatusBodyMeaning
200WebhookEndpointThe endpoint.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such endpoint (not_found).

Change a webhook endpoint

HTTP
PATCH /v1/webhooks/{id}
ParameterInTypeDescription
idpathstringEndpoint id (whk_…).

Body

FieldTypeDescription
urlstring
eventsarray 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"
descriptionstring | null
enabledbooleanFalse stops sending; queued deliveries fail.
JSON
{
  "events": [
    "stream.live",
    "stream.ended"
  ],
  "enabled": true
}

Responses

StatusBodyMeaning
200WebhookEndpointThe endpoint.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such endpoint (not_found).

Delete a webhook endpoint

HTTP
DELETE /v1/webhooks/{id}

Its delivery log goes with it.

ParameterInTypeDescription
idpathstringEndpoint id (whk_…).

Responses

StatusBodyMeaning
204Deleted.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such endpoint (not_found).

Rotate the signing secret

HTTP
POST /v1/webhooks/{id}/secret

The old secret keeps signing alongside the new one for 24 hours.

ParameterInTypeDescription
idpathstringEndpoint id (whk_…).

Responses

StatusBodyMeaning
200WebhookEndpointThe endpoint with the new secret.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such endpoint (not_found).

Send a test event

HTTP
POST /v1/webhooks/{id}/test

Queues a webhook.test; it is sent within a couple of seconds.

ParameterInTypeDescription
idpathstringEndpoint id (whk_…).

Responses

StatusBodyMeaning
202WebhookDeliveryThe queued delivery.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such endpoint (not_found).

Delivery log

HTTP
GET /v1/webhooks/{id}/deliveries

Newest first, kept 30 days.

ParameterInTypeDescription
idpathstringEndpoint id (whk_…).
limitqueryinteger
statusquery"pending" | "succeeded" | "failed"

Responses

StatusBodyMeaning
200WebhookDeliveryListDeliveries, newest first.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such endpoint (not_found).

Send a delivery again

HTTP
POST /v1/webhooks/{id}/deliveries/{delivery_id}/retry

A failed delivery gets one more attempt now; a pending one is brought forward.

ParameterInTypeDescription
idpathstringEndpoint id (whk_…).
delivery_idpathstringdlv_…

Responses

StatusBodyMeaning
202WebhookDeliveryThe delivery.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo pending or failed delivery with that id (not_found).

Embed

The hosted player’s public read.

Public stream status (hosted player)

HTTP
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.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200EmbedStatus and, while live, a signed URL.
404ErrorUnknown stream. Codes: not_found.
429ErrorToo many requests (rate_limited).

Public thumbnail

HTTP
GET /v1/embed/{id}/thumbnail.jpg

No 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.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
302To the newest frame (a signed CDN link) or the placeholder.
404ErrorUnknown stream, or its thumbnail is not public. Codes: not_found.
429ErrorToo many requests (rate_limited).

Report a viewer (sampled)

HTTP
POST /v1/embed/{id}/beat

Sent 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.

ParameterInTypeDescription
idpathstringStream id.
tquerystringA 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.
squerystringWithout t: a random id for this page load.
stquery"w" | "p" | "z" | "b"Waiting, playing, paused or buffering.
uquerynumberWithout t: the random draw, 0 ≤ u < 1. With t, use the session's u.

Responses

StatusBodyMeaning
204Counted (or the stream is over and there is nothing to count).
400ErrorInvalid request (invalid_request).
401ErrorInvalid or expired session token (invalid_session).
404ErrorUnknown stream. Codes: not_found.
429ErrorToo many requests (rate_limited).

Chat

Viewer chat and reactions (beta): your feed and moderation. See Chat and reactions.

Read the chat feed

HTTP
GET /v1/streams/{id}/chat

Every 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.

ParameterInTypeDescription
idpathstringStream id.
afterqueryintegerMessages with seq above this. Default 0.
limitqueryintegerDefault 100.

Responses

StatusBodyMeaning
200ChatFeedThe feed.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).

Slow mode, pause, pin

HTTP
PATCH /v1/streams/{id}/chat

Reaches viewers within about 2 s. To turn chat or reactions on or off, change chat on the stream.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
slow_mode_secondsinteger0–300. 0: off.
pausedbooleanNobody but you can post.
pinned_message_idstring | nullA visible message to pin; null unpins.
JSON
{
  "slow_mode_seconds": 10
}

Responses

StatusBodyMeaning
200ChatFeedThe feed header (no messages).
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_not_enabled.

Post as host or moderator

HTTP
POST /v1/streams/{id}/chat/messages

Shown with a Host or Moderator badge viewers cannot fake. Links are allowed. Works while chat is paused.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
textstring1–200 characters.
role"host" | "moderator"Default host.
display_namestring | nullUp to 40 characters. Default: chat.host_name, else "Host" or "Moderator".
JSON
{
  "text": "Welcome, everyone!",
  "role": "host"
}

Responses

StatusBodyMeaning
201ChatOwnerMessageThe message.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_closed, chat_not_enabled.

Delete a message

HTTP
DELETE /v1/streams/{id}/chat/messages/{message_id}

Hidden from everyone within about 2 s. Kept in your feed with deleted_at.

ParameterInTypeDescription
idpathstringStream id.
message_idpathstringMessage id (msg_…).

Responses

StatusBodyMeaning
200ChatOwnerMessageThe message.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream or message (not_found).
409Errorchat_not_enabled.

Clear the chat

HTTP
POST /v1/streams/{id}/chat/clear

Hides every message posted so far, and the pin. Your feed keeps them (cleared: true).

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ChatFeedThe feed header.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_not_enabled.

List bans

HTTP
GET /v1/streams/{id}/chat/bans

The bans that apply to this stream: its own, or its moderation group's.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ChatBanListThe bans, newest first.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).

Ban a viewer

HTTP
POST /v1/streams/{id}/chat/bans

Bans 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.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
message_idstringOne of their messages. Send one of message_id, session_id or viewer_id.
session_idstringTheir session.
viewer_idstringYour id for them (a viewer token's sub), even before they post.
delete_messagesbooleanAlso delete every message they posted on this stream. Default false.
JSON
{
  "message_id": "msg_3k9x0a7q2m4b8c1d5e6f",
  "delete_messages": true
}

Responses

StatusBodyMeaning
201ChatBanThe ban (an existing one if they were already banned).
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_not_enabled.

Lift a ban

HTTP
DELETE /v1/streams/{id}/chat/bans/{ban_id}
ParameterInTypeDescription
idpathstringStream id.
ban_idpathstringBan id (ban_…).

Responses

StatusBodyMeaning
200Lifted: { "object": "chat_ban", "id": "ban_…", "deleted": true }.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such ban for this stream (not_found).

Get your word list

HTTP
GET /v1/streams/{id}/chat/words
ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ChatWordsThe list.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_not_enabled.

Replace your word list

HTTP
PUT /v1/streams/{id}/chat/words

Words 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.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
wordsarray of string
JSON
{
  "words": [
    "spoiler",
    "kötü söz"
  ]
}

Responses

StatusBodyMeaning
200ChatWordsThe list.
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_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

HTTP
POST /v1/embed/{id}/session

Once 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.

ParameterInTypeDescription
idpathstringStream id.

Body (optional)

FieldTypeDescription
viewer_tokenstringA JWT your server signed for this viewer with a viewer key (HS256, kid = the key id). See Viewer tokens.
JSON
{
  "viewer_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InZrXy4uLiJ9...."
}

Responses

StatusBodyMeaning
201ViewerSessionThe session.
401Errorinvalid_viewer_token: the message says why (signature, expiry, key, stream). viewer_token_required: a members-only stream, and no token.
403ErrorA browser on a site not in player.allowed_domains (origin_not_allowed).
404ErrorUnknown stream, or its hosted player is off. Codes: not_found.
429ErrorToo many requests (rate_limited).

Renew a member's playback URL

HTTP
POST /v1/embed/{id}/playback

Members-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.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
tokenstringThe viewer session token (from a viewer token).
JSON
{
  "token": "vs2...."
}

Responses

StatusBodyMeaning
200MemberPlaybackRenewalTheir new URLs.
401Errorinvalid_session, or viewer_token_required (a session without a viewer token).
403Errorviewer_removed (banned by who they are) or viewer_access_ended (their token's exp passed).
404ErrorUnknown stream. Codes: not_found.
429ErrorToo many requests (rate_limited).

Read the chat

HTTP
GET /v1/embed/{id}/chat

The 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.

ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ChatReadThe chat.
404ErrorUnknown stream. Codes: not_found.
429ErrorToo many requests (rate_limited).

Post a message

HTTP
POST /v1/embed/{id}/chat/messages

Straight 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.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
tokenstringThe viewer session token.
nicknamestring2–24 characters. Links are refused. Required, except for a session from a viewer token with a name: that name is used whatever you send.
textstring1–200 characters. Links and bare domains are refused.
JSON
{
  "token": "vs1....",
  "nickname": "Ayşe",
  "text": "Merhaba!"
}

Responses

StatusBodyMeaning
201ChatMessageAccepted.
400Errorinvalid_request (text), invalid_nickname.
401Errorinvalid_session: get a new session.
403ErrorA browser on a site not in player.allowed_domains (origin_not_allowed).
404ErrorUnknown stream. Codes: not_found.
409Errorchat_closed (with details.state) or chat_paused.
422Errorchat_message_not_allowed: links are not allowed.
429Errorchat_slow_mode, chat_rate_limited or chat_busy, with details.retry_after_seconds; or rate_limited.

Send reactions

HTTP
POST /v1/embed/{id}/chat/reactions

Count 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.

ParameterInTypeDescription
idpathstringStream id.
tquerystringThe viewer session token.
rquerystringCounts per emoji since the last batch, at most 10 each. Emoji: heart, clap, laugh, fire, party, wow.
atqueryintegerThe 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

StatusBodyMeaning
204Taken (or dropped quietly).
400ErrorInvalid request (invalid_request).
401Errorinvalid_session.
403ErrorA browser on a site not in player.allowed_domains (origin_not_allowed).
404ErrorUnknown stream. Codes: not_found.
429ErrorToo 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

HTTP
POST /v1/streams/{id}/chat/moderators

One 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.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
namestringUp to 40 characters.
active_daysintegerHow long they moderate after opening the link: 1–30 days. Default 30. Use 1 for a single show.
JSON
{
  "name": "Mert",
  "active_days": 7
}

Responses

StatusBodyMeaning
201ChatModeratorThe moderator, with invite_url (shown only now).
400ErrorInvalid request (invalid_request).
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_not_enabled.
429Errorlimit_moderators (50 per stream or group).

List moderators

HTTP
GET /v1/streams/{id}/chat/moderators
ParameterInTypeDescription
idpathstringStream id.

Responses

StatusBodyMeaning
200ChatModeratorListNewest first; no links.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such stream in your account (not_found).
409Errorchat_not_enabled.

Remove a moderator

HTTP
DELETE /v1/streams/{id}/chat/moderators/{moderator_id}

Their link and session stop working at once (within 5 s).

ParameterInTypeDescription
idpathstringStream id.
moderator_idpathstringModerator id (mod_…).

Responses

StatusBodyMeaning
200ChatModeratorThe moderator, revoked.
401ErrorMissing or invalid API key (unauthorized).
404ErrorNo such moderator for this stream (not_found).
HTTP
POST /v1/embed/{id}/moderator

The chat page does this when opened with #mod=…. Works once.

No API key needed.

ParameterInTypeDescription
idpathstringStream id.

Body

FieldTypeDescription
invitestringThe part after #mod=.
JSON
{
  "invite": "inv_..."
}

Responses

StatusBodyMeaning
201ModeratorSessionThe moderator session.
400ErrorInvalid request (invalid_request).
409ErrorAlready used, revoked, expired, or for another stream (invite_invalid).
429Errorrate_limited.

Who am I here

HTTP
GET /v1/embed/{id}/mod

Whether this moderator session moderates this stream.

No API key needed.

ParameterInTypeDescription
idpathstringStream id.
X-Moderator-TokenheaderstringThe moderator session (from POST /v1/embed/{id}/moderator).

Responses

StatusBodyMeaning
200ChatModeratorThe moderator.
401ErrorNo valid moderator session for this stream, or the moderator was removed (moderator_unauthorized).
404ErrorUnknown stream or message. Codes: not_found.

Slow mode, pause, pin (moderator)

HTTP
PATCH /v1/embed/{id}/mod

No API key needed.

ParameterInTypeDescription
idpathstringStream id.
X-Moderator-TokenheaderstringThe moderator session (from POST /v1/embed/{id}/moderator).

Body

FieldTypeDescription
slow_mode_secondsinteger0–300.
pausedboolean
pinned_message_idstring | nullnull unpins.
JSON
{
  "paused": true
}

Responses

StatusBodyMeaning
200{ object: "chat_state", state, slow_mode_seconds, paused, pinned_message_id }.
400ErrorInvalid request (invalid_request).
401ErrorNo valid moderator session for this stream, or the moderator was removed (moderator_unauthorized).
404ErrorUnknown stream or message. Codes: not_found.

Post as moderator

HTTP
POST /v1/embed/{id}/mod/messages

With the Moderator badge and their name. Works while paused.

No API key needed.

ParameterInTypeDescription
idpathstringStream id.
X-Moderator-TokenheaderstringThe moderator session (from POST /v1/embed/{id}/moderator).

Body

FieldTypeDescription
textstring1–200 characters; links allowed.
JSON
{
  "text": "Please keep it friendly."
}

Responses

StatusBodyMeaning
201ChatOwnerMessageThe message.
400ErrorInvalid request (invalid_request).
401ErrorNo valid moderator session for this stream, or the moderator was removed (moderator_unauthorized).
404ErrorUnknown stream or message. Codes: not_found.
409Errorchat_closed.

Delete a message (moderator)

HTTP
DELETE /v1/embed/{id}/mod/messages/{message_id}

No API key needed.

ParameterInTypeDescription
idpathstringStream id.
message_idpathstringMessage id (msg_…).
X-Moderator-TokenheaderstringThe moderator session (from POST /v1/embed/{id}/moderator).

Responses

StatusBodyMeaning
200ChatOwnerMessageThe message, deleted_by: moderator.
401ErrorNo valid moderator session for this stream, or the moderator was removed (moderator_unauthorized).
404ErrorUnknown stream or message. Codes: not_found.

List bans (moderator)

HTTP
GET /v1/embed/{id}/mod/bans

No API key needed.

ParameterInTypeDescription
idpathstringStream id.
X-Moderator-TokenheaderstringThe moderator session (from POST /v1/embed/{id}/moderator).

Responses

StatusBodyMeaning
200ChatBanListThe bans.
401ErrorNo valid moderator session for this stream, or the moderator was removed (moderator_unauthorized).
404ErrorUnknown stream or message. Codes: not_found.

Ban a viewer (moderator)

HTTP
POST /v1/embed/{id}/mod/bans

No API key needed.

ParameterInTypeDescription
idpathstringStream id.
X-Moderator-TokenheaderstringThe moderator session (from POST /v1/embed/{id}/moderator).

Body

FieldTypeDescription
message_idstring
session_idstring
viewer_idstring
delete_messagesboolean
JSON
{
  "message_id": "msg_3k9x0a7q2m4b8c1d5e6f",
  "delete_messages": true
}

Responses

StatusBodyMeaning
201ChatBanThe ban, created_by: moderator.
400ErrorInvalid request (invalid_request).
401ErrorNo valid moderator session for this stream, or the moderator was removed (moderator_unauthorized).
404ErrorUnknown stream or message. Codes: not_found.

Lift a ban (moderator)

HTTP
DELETE /v1/embed/{id}/mod/bans/{ban_id}

No API key needed.

ParameterInTypeDescription
idpathstringStream id.
ban_idpathstringBan id (ban_…).
X-Moderator-TokenheaderstringThe moderator session (from POST /v1/embed/{id}/moderator).

Responses

StatusBodyMeaning
200Lifted.
401ErrorNo valid moderator session for this stream, or the moderator was removed (moderator_unauthorized).
404ErrorUnknown stream or message. Codes: not_found.

Objects

Error

FieldTypeDescription
errorobject
JSON
{
  "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.

FieldTypeDescription
enabledbooleanWhether 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_namebooleanShow the stream name to viewers on the hosted player. Default true. False keeps the name out of the public embed read entirely.
require_viewer_tokenbooleanMembers 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_height480 | 720 | 1080 | nullThe 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_limitinteger | nullWatch-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_replaybooleanThe 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_atstring | nullRead only. When the watch-time budget ran out and the watch page closed; null while open.
allowed_domainsarray | nullSites 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.

FieldTypeDescription
publicbooleanDefault 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.

FieldTypeDescription
enabledbooleanViewer 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.
reactionsbooleanEmoji reactions. Default false.
moderation_groupstring | nullBans 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_namestring | nullThe name on your own posts when a post gives none. Up to 40 characters. Default null ("Host").
visible_after_endbooleanKeep 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_filterbooleanThe 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.

FieldTypeDescription
publicbooleanWhether the frame is public (the setting).
urlstring | nullFor 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_atstring | nullWhen url was taken.
public_urlstring | nullWhile 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.

FieldTypeDescription
widthinteger | nullFrame width in pixels.
heightinteger | nullFrame height in pixels.
kbpsinteger | nullBitrate of everything received (video, audio, overhead), averaged over about 30 s.
observed_atstringWhen this was measured.
limit_warningstring | nullSet while a limit is broken: limit_bitrate or limit_resolution. Still broken 20 s later, the stream ends with that end_reason.
keyframe_interval_secondsnumber | nullAverage seconds between the publisher’s keyframes. Null for browser (WHIP) publishers.
keyframe_warningbooleanTrue 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.

FieldTypeDescription
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).
bytesinteger | nullMP4 size.
duration_secondsnumber | nullMP4 length.
retention_daysinteger | nullDays kept after it is ready. Null: until you delete it.
ready_atstring | nullWhen the MP4 became downloadable.
delete_atstring | nullWhen it will be deleted: the retention date, or 7 days after the balance reached zero, whichever is earlier.
delete_reasonstring | nullretention or zero_balance.
deleted_atstring | nullWhen it was deleted.

Cost

What this stream has cost so far at current rates. Only on GET /v1/streams/{id}. Amounts are decimal strings.

FieldTypeDescription
total_usdstringEverything below.
delivery_bytesintegerBytes delivered to viewers, counted up to delivery_counted_until.
delivery_usdstringDelivery cost.
delivery_counted_untilstring | nullCDN logs are read an hour at a time, so delivery trails reality by up to about 80 minutes.
ingest_secondsintegerSeconds of publishing.
ingest_usdstringEncoding (abr_basic) or passthrough cost.
storage_gb_hoursnumberRecording storage used.
storage_usdstringRecording 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}.

FieldTypeDescription
nowobject | nullLive estimate from the hosted player. Null when nobody is on the player or the stream is over.
peakinteger | nullMost viewers in any one minute.
peak_atstring | nullThe start of that minute.
watch_minutesinteger | nullTotal minutes watched, all viewers together.
source"cdn" | "player" | nullWhere peak and watch_minutes come from: cdn (every player, exact) or player (hosted player estimate, until the CDN count arrives).
cdn_counted_untilstring | nullCDN logs are read up to this time.
replay_watch_minutesintegerMinutes 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

FieldTypeDescription
objectstringAlways viewer_series.
stream_idstringStream id. Also the folder of its video on the CDN.
playerarray of objectPer minute, from the hosted player (live estimate).
cdnarray of objectPer minute, from the CDN logs: average viewers watching at once, every player included.
countriesarray of objectWhere 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_daysarray of objectReplay 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.
JSON
{
  "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

FieldTypeDescription
objectstringAlways webhook_endpoint.
idstringwhk_…
urlstringWhere events are POSTed. https only.
descriptionstring | nullYour own note.
eventsarray 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_eventsbooleanTrue when subscribed to everything, including event types added later.
enabledbooleanFalse: nothing is sent.
created_atstring
secretstringwhsec_…, for verifying signatures. Only on create, GET /v1/webhooks/{id} and rotation.
JSON
{
  "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

FieldTypeDescription
objectstringAlways list.
dataarray of WebhookEndpoint
event_typesarray of stringEvery type an endpoint can subscribe to.
JSON
{
  "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

FieldTypeDescription
objectstringAlways list.
dataarray of WebhookDelivery
JSON
{
  "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

FieldTypeDescription
objectstringAlways webhook_delivery.
idstringdlv_…
event_idstringevt_…, the webhook-id header.
event_typestring
stream_idstring | null
status"pending" | "succeeded" | "failed"
attemptsinteger
max_attemptsinteger
next_attempt_atstring | null
last_attempt_atstring | null
last_status_codeinteger | nullWhat your server answered.
last_errorstring | nullWhy the last attempt failed (answered 500, a timeout, a DNS error, …).
last_duration_msinteger | null
delivered_atstring | null
created_atstring
payloadWebhookEvent
JSON
{
  "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).

FieldTypeDescription
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"
timestampstringWhen it happened.
dataobjectFor 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

FieldTypeDescription
idstringStream id. Also the folder of its video on the CDN.
objectstringAlways stream.
namestring | nullYour 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_idstring | nullThe 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.
recordbooleanWhether an MP4 is made after the stream ends.
replaybooleanAfter the end, the hosted player plays the recording to viewers, once it is ready and for as long as it is kept. See Replay.
recordingRecording
node_readybooleanThe ingest server is up. False for about a minute when a new server has to start.
rtmp_urlstring | nullRTMP server URL for OBS or ffmpeg. Use with stream_key.
playback_urlstring | nullSigned 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_atstring | nullWhen playback_url stops working.
embed_urlstringThe hosted player page. Put it in an iframe or share it as a link.
renditionsarray of stringQualities viewers will get, e.g. ["source", "480p"].
max_ingest_resolutionintegerThe tallest video you declared you will send: 480, 720 or 1080.
max_duration_secondsintegerThe stream ends after this long live. 4 h for new accounts, 24 h for trusted ones.
metadataobject | nullYour own JSON, up to 2 KB. Never shown to viewers.
playerPlayerSettings
thumbnailThumbnail
chatChatSettings
reservation_expires_atstring | nullWhile pending: when the reserved slot is released and the stream expires.
reservation_expires_in_secondsinteger | nullThe same as a countdown, computed by the server.
created_atstring
went_live_atstring | null
ended_atstring | null
end_reasonstring | nullWhy it ended: deleted, disconnected, duration_limit, reservation_ttl, limit_bitrate, limit_resolution, insufficient_credit, simulcast_not_supported, provision_failed.
ingestIngest
costCost
viewersViewers
viewers_nowinteger | nullWatching 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.
JSON
{
  "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.

FieldTypeDescription
idstringStream id. Also the folder of its video on the CDN.
objectstringAlways stream.
namestring | nullYour 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_idstring | nullThe 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.
recordbooleanWhether an MP4 is made after the stream ends.
replaybooleanAfter the end, the hosted player plays the recording to viewers, once it is ready and for as long as it is kept. See Replay.
recordingRecording
node_readybooleanThe ingest server is up. False for about a minute when a new server has to start.
rtmp_urlstring | nullRTMP server URL for OBS or ffmpeg. Use with stream_key.
playback_urlstring | nullSigned 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_atstring | nullWhen playback_url stops working.
embed_urlstringThe hosted player page. Put it in an iframe or share it as a link.
renditionsarray of stringQualities viewers will get, e.g. ["source", "480p"].
max_ingest_resolutionintegerThe tallest video you declared you will send: 480, 720 or 1080.
max_duration_secondsintegerThe stream ends after this long live. 4 h for new accounts, 24 h for trusted ones.
metadataobject | nullYour own JSON, up to 2 KB. Never shown to viewers.
playerPlayerSettings
thumbnailThumbnail
chatChatSettings
reservation_expires_atstring | nullWhile pending: when the reserved slot is released and the stream expires.
reservation_expires_in_secondsinteger | nullThe same as a countdown, computed by the server.
created_atstring
went_live_atstring | null
ended_atstring | null
end_reasonstring | nullWhy it ended: deleted, disconnected, duration_limit, reservation_ttl, limit_bitrate, limit_resolution, insufficient_credit, simulcast_not_supported, provision_failed.
ingestIngest
costCost
viewersViewers
viewers_nowinteger | nullWatching 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_keystringRTMP stream key, {id}?key={secret}. OBS: paste as Stream Key with rtmp_url as Server. One-shot: works for this stream only.
whip_urlstringWHIP endpoint for browsers and WebRTC encoders. Contains the secret.
JSON
{
  "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

FieldTypeDescription
objectstringAlways list.
dataarray of Stream
has_morebooleanMore streams after the last one. Pass its id as starting_after.
JSON
{
  "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

FieldTypeDescription
namestring | nullUp to 100 characters. Blank means no name.
profile"abr_basic" | "passthrough"Default abr_basic.
max_resolution480 | 720 | 1080The 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.
recordbooleanMake an MP4 after the stream ends. Default true.
replaybooleanAfter the end, the hosted player plays the recording. Default false. Needs record.
recording_retention_daysinteger | nullDays to keep the MP4, 1–3650. Omit for the account default (30). Null: keep until deleted.
metadataobjectYour own JSON, up to 2 KB.
playerPlayerSettings
thumbnailThumbnailSettings
chatChatSettings

UpdateStreamRequest

Only these fields can change, in any status. Null clears a field; metadata is replaced whole.

FieldTypeDescription
namestring | nullUp to 100 characters.
replaybooleanTurn replay on or off, also after the end. Needs record.
metadataobject | null
playerPlayerSettings
thumbnailThumbnailSettings
chatChatSettings

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}.

FieldTypeDescription
max_resolution480 | 720 | 1080 | nullThe tallest video you will send. Default 720.
recordboolean | nullMake an MP4 of each stream. Default true.
replayboolean | nullReplay each stream on the hosted player after it ends. Default false. Between streams, the channel’s page plays the newest one.
recording_retention_daysinteger | nullDays to keep each MP4, 1–3650. Not set: the account default.
metadataobject | nullCopied onto each stream. Up to 2 KB.
playerobject
thumbnailobject
chatobjectChat for each stream. moderation_group defaults to the channel id, so bans carry from one stream to the next.

Channel

FieldTypeDescription
idstringChannel id. Also the path of its hosted player page.
objectstringAlways channel.
namestring | nullYour 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_urlstringRTMP server URL to save in OBS once. Use with stream_key.
embed_urlstringThe channel’s player page. It shows the stream on air, or a waiting page (with a countdown when scheduled_at is set).
live_stream_idstring | nullThe channel’s stream on air right now, or null. Its playback_url is on GET /v1/streams/{id}.
scheduled_atstring | nullWhen the next stream is planned, for the waiting page’s countdown. Reserves nothing.
defaultsChannelDefaults
stream_key_rotated_atstring | nullWhen the key was last replaced.
created_atstring
updated_atstring
deleted_atstring | nullSet on the answer to a delete.
JSON
{
  "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.

FieldTypeDescription
idstringChannel id. Also the path of its hosted player page.
objectstringAlways channel.
namestring | nullYour 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_urlstringRTMP server URL to save in OBS once. Use with stream_key.
embed_urlstringThe channel’s player page. It shows the stream on air, or a waiting page (with a countdown when scheduled_at is set).
live_stream_idstring | nullThe channel’s stream on air right now, or null. Its playback_url is on GET /v1/streams/{id}.
scheduled_atstring | nullWhen the next stream is planned, for the waiting page’s countdown. Reserves nothing.
defaultsChannelDefaults
stream_key_rotated_atstring | nullWhen the key was last replaced.
created_atstring
updated_atstring
deleted_atstring | nullSet on the answer to a delete.
stream_keystringRTMP 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_urlstringWHIP endpoint for browsers and WebRTC encoders. Contains the secret.
JSON
{
  "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

FieldTypeDescription
objectstringAlways list.
dataarray of Channel
has_morebooleanMore channels after the last one. Pass its id as starting_after.
JSON
{
  "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

FieldTypeDescription
namestring | nullUp to 100 characters.
profile"abr_basic" | "passthrough"Default abr_basic. Cannot be changed later.
defaultsChannelDefaults
scheduled_atstring | nullWhen the next stream is planned (ISO 8601).

UpdateChannelRequest

FieldTypeDescription
namestring | nullUp 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.
defaultsChannelDefaults
scheduled_atstring | null

PlaybackToken

FieldTypeDescription
objectstringAlways playback_token.
stream_idstringStream id. Also the folder of its video on the CDN.
playback_urlstringSigned HLS URL.
expires_atstring | null
JSON
{
  "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

FieldTypeDescription
objectstringAlways recording_download.
stream_idstringStream id. Also the folder of its video on the CDN.
urlstringSigned 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.
bytesintegerMP4 size.
expires_atstring
JSON
{
  "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.

FieldTypeDescription
objectstringAlways embed.
idstringThe 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).
titlestring | nullThe stream name when it is to be shown, otherwise null.
playback_urlstring | nullWhile live: a signed HLS URL, the same for every viewer.
playback_url_expires_atstring | null
max_heightinteger | nullOffer no quality taller than this (player.max_height). Null: all.
went_live_atstring | null
ended_atstring | null
poll_after_secondsinteger | nullAsk again after this many seconds (5 pending, 60 live). Null: stop asking.
beaconobject | nullViewer 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_urlstring | nullThe newest frame, when the owner made thumbnails public (thumbnail.public). Null otherwise, before the first frame, and while the hosted player is off.
chatobject | nullWhether to load chat at all. Null when chat is off for this stream. The messages come from GET /v1/embed/{id}/chat.
replayobject | nullAfter 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.
channelobject | nullRead by channel id: the channel, and when its next stream is planned. Null when read by stream id.
JSON
{
  "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.

FieldTypeDescription
objectstringAlways viewer_session.
tokenstringSend as token (posts) or t (reactions, beats). Scoped to this stream.
session_idstringThe session as moderators see it.
unumberThis session's sampling number, 0 ≤ u < 1, drawn by the server. Send reaction batches only while u is below reaction_sampling.rate.
expires_atstring24 hours after it was issued.
viewerobject | nullWho the viewer is, when the session was opened with a viewer_token. Null for an anonymous viewer. See Viewer tokens.
moderatorobjectWith a viewer token whose role is moderator: their moderator session, as a moderator link would give. Null otherwise, and when you removed this moderator.
playbackobjectMembers-only streams, with a viewer token: this viewer's own playback URLs. Null for streams anyone may watch (the embed read has the URL).
JSON
{
  "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.

FieldTypeDescription
urlstring | nullThe live HLS playlist, signed for this viewer. Null unless the stream is live.
replay_urlstring | nullThe replay MP4, signed for this viewer. Null unless the stream ended and its replay is ready.
expires_atstring

MemberPlaybackRenewal

FieldTypeDescription
objectstringAlways member_playback.
playbackobjectNull when the stream is not members only.
JSON
{
  "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.

FieldTypeDescription
objectstringAlways attendance.
viewer_idstringYour id for the viewer (the token's sub).
namestring | nullThe token's name, the last one seen.
watch_secondsintegerTime spent playing the stream live in the hosted player (paused and waiting time not counted).
replay_secondsintegerTime spent playing the replay after the end (paused time not counted). Not part of watch_seconds.
first_seen_atstring
last_seen_atstring

AttendanceList

FieldTypeDescription
objectstringAlways list.
dataarray of Attendance
has_moreboolean
next_afterstring | nullPass as after for the next page.
totalintegerViewers on the list in all.
JSON
{
  "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.

FieldTypeDescription
objectstringchat_message when returned on its own; absent inside lists.
idstringMessage id.
nicknamestringThe sender's nickname, or the owner's display name.
textstring1–200 characters.
role"host" | "moderator" | nullSet only on the owner's posts: show a Host or Moderator badge. A viewer can never set it, whatever their nickname.
verifiedbooleanThe nickname is the name from your viewer token: nobody else can post under it. Show a check mark.
created_atstring
JSON
{
  "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.

FieldTypeDescription
objectstringAlways chat.
stream_idstringStream id. Also the folder of its video on the CDN.
stateChatState
slow_mode_secondsintegerSeconds 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_autobooleanSlow mode was raised automatically because chat is very busy.
messagesarray of ChatMessageThe last 50 visible messages, oldest first.
deleted_idsarray of stringMessages deleted in the last 5 minutes: remove them if you show them.
cleared_atstring | nullThe owner cleared the chat: remove every message created at or before this.
pinnedobjectThe pinned message, shown above the chat.
reactions_enabledbooleanShow the reaction bar.
reactionsobjectReactions since the previous read, per emoji (estimated under load). Play them as a burst. Keys: heart ❤️ clap 👏 laugh 😂 fire 🔥 party 🎉 wow 😮.
reaction_timelinearray of objectReactions 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_samplingobject | nullSend reaction batches only while your session's u is below rate, at most every interval_seconds. Null while reactions are off.
poll_after_secondsinteger2 while open or paused; longer otherwise.
JSON
{
  "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.

FieldTypeDescription
objectstringchat_message when returned on its own; absent inside lists.
idstringMessage id.
nicknamestringThe sender's nickname, or the owner's display name.
textstring1–200 characters.
role"host" | "moderator" | nullSet only on the owner's posts: show a Host or Moderator badge. A viewer can never set it, whatever their nickname.
verifiedbooleanThe nickname is the name from your viewer token: nobody else can post under it. Show a check mark.
created_atstring
seqintegerPosition in this stream's chat, from 1. The feed's cursor.
session_idstring | nullThe viewer session (ban by it). Null on your own posts.
viewer_idstring | nullYour id for the viewer, when they came with a viewer token (ban by it). Null otherwise.
fingerprintstring | null6 characters derived from the viewer's address: the same fingerprint under a new nickname is probably the same person.
networkstring | nullThe viewer's network, never the address: IPv4 /24 (85.105.12.0/24) or IPv6 /48.
countrystring | nullISO country code, best effort (DB-IP Lite). Null when unknown.
asnstring | nullThe viewer's network operator (ISP, mobile carrier, hosting or VPN provider), best effort. Null when unknown.
deleted_atstring | nullWhen it was deleted.
deleted_by"owner" | "moderator" | nullWho deleted it: you (API key or dashboard) or a moderator.
deleted_by_moderatorobject | nullThe moderator, when deleted_by is moderator.
filteredbooleanHit the word filter: stored, never shown to viewers.
shadowbooleanSent by a banned viewer: shown only in their own player.
clearedbooleanPosted before the last clear.
visiblebooleanViewers see it.
JSON
{
  "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).

FieldTypeDescription
objectstringAlways chat_feed.
stream_idstringStream id. Also the folder of its video on the CDN.
stateChatState
slow_mode_secondsintegerYour slow mode.
effective_slow_mode_secondsintegerWhat viewers get: yours, or automatic slow mode when that is higher.
slow_mode_autobooleanAutomatic slow mode is in force.
pausedboolean
pinned_message_idstring | null
cleared_atstring | null
moderation_groupstring | null
busybooleanChat hit its hard limit within the last minute: some posts got chat_busy.
messagesarray of ChatOwnerMessageMessages after after, oldest first.
deleted_idsarray of stringDeleted in the last 5 minutes, including messages from before after.
next_afterintegerPass as after next time.
has_morebooleanMore messages after this page: ask again at once.
reactionsobject
totalsobject
JSON
{
  "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

FieldTypeDescription
objectstringAlways chat_ban.
idstring
scope"stream" | "group"stream, or group when the stream has a chat.moderation_group.
moderation_groupstring | null
session_idstring | nullThe banned session; null when the ban is by viewer_id.
viewer_idstring | nullYour id for the viewer (viewer tokens): banned on every device. Null for anonymous viewers.
fingerprintstring | nullThe banned address, as a fingerprint. Null for a ban by viewer_id: people behind the same address are not banned with them.
nicknamestring | nullTheir nickname when banned.
created_by"owner" | "moderator" | nullWho banned: you or a moderator.
created_by_moderatorobject | nullThe moderator, when created_by is moderator.
created_atstring
JSON
{
  "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

FieldTypeDescription
objectstringAlways list.
dataarray of ChatBan
has_moreboolean
JSON
{
  "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.

FieldTypeDescription
objectstringAlways chat_moderator.
idstring
namestringShown 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_groupstring | 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_atstring | nullUntil the link is opened.
active_daysintegerHow long they moderate after opening the link, 1–30 days (default 30).
active_untilstring | nullWhen they stop being a moderator: active_days after the link was opened. Null until then.
redeemed_atstring | null
revoked_atstring | null
last_seen_atstring | nullTheir last moderation request (to the minute).
viewer_idstring | nullMade 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_atstring
invite_urlstringOnly 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.
JSON
{
  "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

FieldTypeDescription
objectstringAlways list.
dataarray of ChatModerator
has_moreboolean
JSON
{
  "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.

FieldTypeDescription
objectstringAlways moderator_session.
tokenstring
expires_atstringactive_days after the link was opened (at most 30 days); revoking ends it at once.
moderatorChatModerator
JSON
{
  "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

FieldTypeDescription
objectstringAlways chat_words.
scope"stream" | "group"group when the stream has a moderation group (the list is shared), else stream.
moderation_groupstring | null
wordsarray of stringYour words and phrases. Whole words, any case.
builtin_word_filterbooleanWhether the built-in list also applies (chat.builtin_word_filter).
JSON
{
  "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.

FieldTypeDescription
objectstringAlways notification_settings.
low_balance_emailbooleanEmail when credit left drops below low_balance_threshold_usd, and when it runs out. Default true.
low_balance_threshold_usdstringDollars, 1 to 10000, two decimals. Default "5.00". Also when credit.low fires.
recording_deletion_emailbooleanEmail when the 7 days at zero balance start, then 24 hours and 6 hours before recordings are deleted. Default true.
balance_statement_emailbooleanPostpaid 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.
JSON
{
  "object": "notification_settings",
  "low_balance_email": true,
  "low_balance_threshold_usd": "5.00",
  "recording_deletion_email": true,
  "balance_statement_email": true
}

Usage

FieldTypeDescription
objectstringAlways 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_usdstringCredit minus everything charged so far.
available_usdstringBalance minus used-but-not-yet-charged. Live streams end when this reaches zero.
balance_depleted_atstring | nullSet while the balance is at or below zero.
recordings_delete_atstring | null7 days after the balance reached zero: when recordings will be deleted unless you top up.
ratesobject
daysarray of object
JSON
{
  "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
    }
  ]
}