API reference
A JSON API to manage streams and destinations, retrieve recordings, clips, analytics and highlights, and control unified cross-platform chat programmatically.
Base URL
https://streamrepeater.com/api
https://streamrepeater.com/api/openapi.json. Import it into Postman, Insomnia, Swagger or any OpenAPI tool for an interactive client with every endpoint, parameter and example, or use it to generate a typed SDK.
curl https://streamrepeater.com/api/openapi.json -o streamrepeater-openapi.json
Authentication
All endpoints use a Sanctum Personal Access Token. Generate or revoke tokens in Settings → API tokens. Requests are limited to 60 per minute per IP, and errors are returned as JSON.
Send the token in the Authorization header as a Bearer token:
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" https://streamrepeater.com/api/channels
Your account is limited to the workspaces you belong to. Tokens can be read-only or read/write. Changing streams and destinations requires a write token and the Manage streams role in that workspace. Workspace and stream provisioning endpoints are admin-only and are documented in the admin console.
Errors & conventions
Errors return a JSON body containing message; validation failures (422) also include an errors map keyed by field. Other common statuses are 401 for a missing or invalid token, 403 when the token lacks an ability, role or workspace access, and 404 when a resource is missing or not visible. Growing chat and event feeds accept ?after=<id> to retrieve only newer rows.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /tenants | List workspaces you can access. |
| GET | /channels | List streams with their workspace, destinations and relay status. |
| GET | /channels/{channel}/ingest | Return ingest and playback URLs and credentials for a stream. |
| GET | /channels/{channel}/status | Return the current stream status, live viewer count and destination relay states. |
| GET | /channels/{channel}/destinations | List a stream’s outbound destinations. |
| POST | /channels/{channel}/destinations | Add a destination with its protocol, URL and name. |
| PUT | /channels/{channel}/destinations/{destination} | Update a destination’s name, protocol, URL and optional video settings. |
| PATCH | /channels/{channel}/destinations/{destination}/toggle | Enable or disable a destination with an explicit enabled boolean. |
| DELETE | /channels/{channel}/destinations/{destination} | Disable a destination and mark it for watchdog removal. |
| DELETE | /channels/{channel} | Disable a stream and its destinations and mark them for watchdog removal. |
| GET | /channels/{channel}/relays | Return relay status and recent events for each destination. |
| PATCH | /channels/{channel} | Update a stream’s title, enabled state or watch-page title. |
| GET | /channels/{channel}/recordings | List the stream’s recorded VOD segments. |
| GET | /channels/{channel}/clips | List clips created from the stream’s recordings. |
| GET | /channels/{channel}/analytics | Return the last 24 hours of bandwidth and viewer samples. |
| GET | /channels/{channel}/highlights | List automatically detected chat-spike highlight moments. |
| GET | /tenants/{tenant}/chat | List recent unified-chat messages, including emotes; use ?after=<id> to poll newer rows. |
| POST | /tenants/{tenant}/chat/reply | Send a chat message as the broadcaster using platform and message. |
| POST | /tenants/{tenant}/chat/messages/{message}/moderate | Moderate a message with delete, timeout or ban. |
| GET | /tenants/{tenant}/integrations | List connected platforms and their status. |
| GET | /tenants/{tenant}/automations | List automation rules with their event type, conditions and actions. |
| GET | /tenants/{tenant}/automation-runs | List recent automation-rule runs and the status of each fired event. |
| GET | /tenants/{tenant}/events | List recent events; use ?after=<id> to poll newer rows. |
| POST | /tenants/{tenant}/events | Send a custom type and context event into the rules engine. |
| GET | /tenants/{tenant}/devices | List LAN devices connected through the Local Agent. |
| GET | /tenants/{tenant}/connectors | List Local Agents with version, liveness, printer, Now Playing and update-rollback state. |
| GET | /channels/{channel}/lan-sources | List LAN ingest sources for a stream with credential-masked source URLs. |
| GET | /tenants/{tenant}/games | List recent stream-game sessions and the all-time wins leaderboard. |
| GET | /tenants/{tenant}/raffles | List prize-draw campaign metadata and counts without entrant data. |
| GET | /tenants/{tenant}/loops | List always-on loop sources across the workspace. |
| GET | /tenants/{tenant}/music | Return the royalty-free music library, workspace radio settings and player URL. |
| POST | /channels/{channel}/clips | Create a clip from a recording using source_start, start_offset_seconds and duration_seconds. |
| GET | /tenants/{tenant}/webhooks | List developer webhook endpoints without returning signing secrets. |
| POST | /tenants/{tenant}/webhooks | Create a webhook endpoint from url and events; return its signing secret once. |
| DELETE | /tenants/{tenant}/webhooks/{webhook} | Delete a webhook endpoint. |
| GET | /tenants/{tenant}/overlays | List overlays with their render and data URLs plus the stable Main URL. |
| POST | /tenants/{tenant}/overlays | Create an overlay with name and optional width, height and widgets. |
| PATCH | /tenants/{tenant}/overlays/{overlay} | Update an overlay’s name, size or widgets. |
| DELETE | /tenants/{tenant}/overlays/{overlay} | Delete an overlay. |
| POST | /tenants/{tenant}/overlays/{overlay}/set-main | Make this the Main overlay rendered by the stable blanket URL. |
| GET | /tenants/{tenant}/timers | List scheduled-message timers. |
| POST | /tenants/{tenant}/timers | Create a timer with messages and interval_minutes plus optional platforms and name. |
| PATCH | /tenants/{tenant}/timers/{timer} | Update a timer’s enabled state, messages, interval and other settings. |
| DELETE | /tenants/{tenant}/timers/{timer} | Delete a timer. |
AI Streams
Create and run always-on channels from AI-generated video, steer them on air and inspect why they are or are not generating. The workspace plan must include AI Streams; writes require a write token and the Manage streams role. Creation and editing use the dashboard checks, and a new stream stays off until start is called. Provider keys are managed only in the dashboard; the API reports connection and key health but never returns a key. See AI Streams help articles for product behaviour.
| Method | Path | Token | Description |
|---|---|---|---|
| POST | /tenants/{tenant}/ai-streams |
write | Create a validated AI stream without starting it. |
| GET | /tenants/{tenant}/ai-streams |
read | List AI streams and plan availability for the workspace. |
| PATCH | /tenants/{tenant}/ai-streams/{aiStream} |
write | Update validated stream settings without changing its running state. |
| DELETE | /tenants/{tenant}/ai-streams/{aiStream} |
write | Stop and delete a stream, its queue and run history while retaining saved library video. |
| GET | /tenants/{tenant}/ai-streams/{aiStream} |
read | Return one stream with run state, queue, running order and estimated spend. |
| POST | /tenants/{tenant}/ai-streams/{aiStream}/start |
write | Request that the stream go on air after start requirements pass. |
| POST | /tenants/{tenant}/ai-streams/{aiStream}/stop |
write | Clear the desired live state so the watchdog stops the publisher. |
| GET | /tenants/{tenant}/ai-streams/{aiStream}/status |
read | Return generation-block reasons, continuity, instruction source and per-channel health. |
| GET | /tenants/{tenant}/ai-streams/{aiStream}/clips |
read | List recent generated-clip metadata, newest first, using before for pagination. |
| GET | /tenants/{tenant}/ai-streams/{aiStream}/clips/{item}/download |
read | Download one still-playable generated clip as its normalized broadcast MP4. |
| GET | /tenants/{tenant}/ai-streams/{aiStream}/channels |
read | Return the feed and availability state of every assigned channel. |
| GET | /tenants/{tenant}/ai-streams/{aiStream}/beats |
read | Return the running order, Director cursor, loop count and content refusals. |
| POST | /tenants/{tenant}/ai-streams/{aiStream}/beats |
write | Add a beat at the end or after another beat, optionally cueing it next. |
| PATCH | /tenants/{tenant}/ai-streams/{aiStream}/beats/{beat} |
write | Update a beat instruction and clip length. |
| DELETE | /tenants/{tenant}/ai-streams/{aiStream}/beats/{beat} |
write | Remove a beat and reset the cursor when it was current. |
| POST | /tenants/{tenant}/ai-streams/{aiStream}/beats/{beat}/cue |
write | Move the Director cursor so this beat supplies the next commissioned clip. |
| GET | /tenants/{tenant}/ai-streams/{aiStream}/schedule |
read | Return all schedule entries, the active entry and the next 24 hours. |
| POST | /tenants/{tenant}/ai-streams/{aiStream}/schedule |
write | Add a weekly or one-off schedule entry in an IANA timezone. |
| PATCH | /tenants/{tenant}/ai-streams/{aiStream}/schedule/{entry} |
write | Update a schedule entry while retaining omitted fields. |
| DELETE | /tenants/{tenant}/ai-streams/{aiStream}/schedule/{entry} |
write | Delete a schedule entry and fall back to the running order. |
| POST | /tenants/{tenant}/ai-streams/{aiStream}/topic |
write | Push a temporary topic into the stream without starting it or jumping the clip queue. |
| GET | /tenants/{tenant}/ai-providers |
read | List AI video providers and key health without returning any key. |
| GET | /tenants/{tenant}/ai-streams/library |
read | List daily AI-stream recordings retained in the Video Library. |
| GET | /tenants/{tenant}/ai-streams/library/{recording}/download |
read | Download one retained AI-stream day as a stream-copied MP4. |
Push a topic into a live stream. Use this when an event such as a goal, sale or breaking story should take over the channel. The topic runs for minutes (30 by default), then the running order resumes where it stopped. Existing clips play first and clips_ahead reports how many. A topic never starts a stopped stream or raises its generation rate, and it passes the same content and spending checks.
curl -X POST -H "Authorization: Bearer YOUR_TOKEN_HERE" -H "Content-Type: application/json" \
-d '{"instruction":"Fans erupt as the home side scores","minutes":10,"label":"Goal! 1-0"}' \
https://streamrepeater.com/api/v1/tenants/1/ai-streams/5/topic
{
"ok": true,
"entry": { "id": 21, "kind": "date", "start_time": "19:42", "timezone": "UTC", "duration_minutes": 10 },
"on_air_now": true,
"clips_ahead": 2,
"stream_active": true,
"message": "The next clip this stream commissions will be about this topic. 2 clips already queued or being made will play first."
}
Play a particular beat next with POST …/beats/{beat}/cue, or create and cue one with {"instruction": "…", "cue": true}. Why is it quiet? GET …/status returns the same stable reason as the stream page: stopped, not-entitled, no-provider, no-prompt, no-key, spend-limit or null, together with guidance.
# Create a stream (never starts it), then start it
curl -X POST -H "Authorization: Bearer YOUR_TOKEN_HERE" -H "Content-Type: application/json" \
-d '{"name":"Harbour cam","channel_ids":[3],"provider":"luma","prompt":"A calm harbour at dawn","clip_seconds":8,"aspect":"16:9","buffer_target":3,"budget_limit":50,"clip_cost_estimate":0.4}' \
https://streamrepeater.com/api/v1/tenants/1/ai-streams
curl -X POST -H "Authorization: Bearer YOUR_TOKEN_HERE" https://streamrepeater.com/api/v1/tenants/1/ai-streams/5/start
Destination parameters
POST and PUT accept a custom destination or saved preset. A custom destination uses name, protocol (rtmp, rtsp or srt) and url. Optional video_settings may contain resolution (source, 1080p, 720p, 480p) and bitrate in Kbps. Toggle accepts {"enabled": true} or {"enabled": false}.
Example: list streams
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" https://streamrepeater.com/api/channels
[
{
"id": 1,
"path_name": "acme--main",
"status": "live",
"tenant": { "id": 1, "name": "Acme" },
"destinations": [
{ "id": 7, "name": "YouTube", "protocol": "rtmp",
"relay_process": { "status": "running" } }
]
}
]
Example: add a destination
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"name":"Twitch","protocol":"rtmp","url":"rtmp://live.twitch.tv/app/KEY"}' \
https://streamrepeater.com/api/channels/1/destinations
Example: update a destination
curl -X PUT -H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"name":"YouTube backup","protocol":"rtmp","url":"rtmps://a.rtmps.youtube.com:443/live2/KEY","video_settings":{"resolution":"720p","bitrate":3500}}' \
https://streamrepeater.com/api/channels/1/destinations/7
Example: pause a destination
curl -X PATCH -H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"enabled":false}' \
https://streamrepeater.com/api/channels/1/destinations/7/toggle
Example: delete a destination
curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN_HERE" \
https://streamrepeater.com/api/channels/1/destinations/7
{
"message": "Destination pending deletion.",
"destination": { "id": 7, "enabled": false, "pending_deletion": true }
}
Example: stream status
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" https://streamrepeater.com/api/channels/1/status
{
"channel_id": 1,
"path_name": "acme--main",
"status": "live",
"viewers": 7,
"destinations": [
{ "id": 7, "name": "YouTube", "enabled": true, "relay_status": "running" }
]
}
Example: delete a stream
curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN_HERE" \
https://streamrepeater.com/api/channels/1
{
"message": "Channel pending deletion.",
"channel_id": 1,
"pending_deletion": true
}
Example: stream analytics
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" https://streamrepeater.com/api/channels/1/analytics
{
"channel_id": 1,
"window": "24h",
"samples": [
{ "sampled_at": "2026-06-26T12:00:00Z", "inbound_bps": 5200000, "outbound_bps": 10400000, "viewers": 12 }
]
}
Example: list highlights
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" https://streamrepeater.com/api/channels/1/highlights
[
{ "id": 4, "occurred_at": "2026-06-26T14:32:00Z", "messages": 47, "intensity": 60,
"sample": [ { "author": "fan123", "message": "LETS GOOO" } ] }
]
Unified chat
Read live cross-platform chat, reply as the broadcaster and moderate through the same engine as the dashboard. Replies support twitch, kick and youtube when connected with the required scope. Actions are delete, timeout (10 minutes) and ban. Integrations must be enabled; writes require the Manage streams role.
# Poll new messages since the last id you saw
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
"https://streamrepeater.com/api/tenants/1/chat?after=1024"
# Reply as your channel
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" -H "Content-Type: application/json" \
-d '{"platform":"twitch","message":"thanks for the raid!"}' \
https://streamrepeater.com/api/tenants/1/chat/reply
# Time out a message’s author for 10 minutes
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" -H "Content-Type: application/json" \
-d '{"action":"timeout"}' \
https://streamrepeater.com/api/tenants/1/chat/messages/2048/moderate
Integrations & automations
Read connected platforms, automation rules and event history, and send your own events into the rules engine. A custom event runs every matching action, so an external service can drive lights, Discord, webhooks, OBS and other on-stream automation. Responses omit connection tokens and action secrets.
# Fire a custom event — runs every rule listening for "custom.donation"
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" -H "Content-Type: application/json" \
-d '{"type":"custom.donation","context":{"name":"Ada","amount":"5.00"}}' \
https://streamrepeater.com/api/tenants/1/events
{ "ok": true, "matched_rules": 2 }
# Read the recent event feed
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" "https://streamrepeater.com/api/tenants/1/events?after=900"
Create rules for custom.* events in Integrations → Automations, then reference context fields such as @{{ amount }} in action templates.
Event webhooks
Create developer webhooks under Settings → Developer webhooks. Each delivery is a JSON POST signed in X-Streamrepeater-Signature with sha256= followed by the HMAC-SHA256 of the raw body using the endpoint signing secret.
{
"id": "9b6f6b4d-2d13-4d4b-b3b8-54ff5d29c9ef",
"event": "stream.live",
"created_at": "2026-06-16T12:00:00+00:00",
"data": {
"channel": { "id": 1, "title": "Main Feed" },
"destination_count": 2
}
}
Available events include the canonical stream, destination, recording, bandwidth, AI-stream and AI-provider event identifiers shown above. Each carries message, details and its stream or provider; repeated events are collapsed like notification-bell items. AI events can trigger automation rules. Settings can send a ping test. Webhook endpoints can also be managed at /tenants/{tenant}/webhooks; the signing secret is returned once when created.
Need help integrating? Get in touch.