API reference
A clean JSON API to manage streams and destinations, pull recordings, clips, analytics and highlights, and drive the 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 to get
an interactive client with every endpoint, parameter and example — or generate a typed SDK from it.
curl https://streamrepeater.com/api/openapi.json -o streamrepeater-openapi.json
Authentication
All endpoints are authenticated using a Sanctum Personal Access Token. You can generate or revoke these tokens from your dashboard under Settings → API tokens. Requests are rate-limited to 60 / minute per IP, and all 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 scoped to the workspaces you belong to. Tokens can be read-only or read/write. Mutating stream and destination endpoints require 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 with a message; validation failures (422) also include an errors map keyed by field. Other common statuses: 401 (missing/invalid token), 403 (token lacks the ability, role or workspace access), 404 (not found or not visible to you). Growing feeds — chat and events — accept ?after=<id> to poll only newer rows.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /tenants | List workspaces you can access. |
| GET | /channels | List streams with their tenant, destinations and relay status. |
| GET | /channels/{channel}/ingest | Ingest + playback URLs and keys for a stream. |
| GET | /channels/{channel}/status | Current channel 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 (protocol, url, 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 and flag a destination for watchdog removal. |
| DELETE | /channels/{channel} | Disable and flag a channel and its destinations for watchdog removal. |
| GET | /channels/{channel}/relays | Per-destination relay status with the latest events. |
| PATCH | /channels/{channel} | Update a stream's title, enabled flag 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 | Last 24h of bandwidth (in/out bps) and viewer samples. |
| GET | /channels/{channel}/highlights | Auto-detected chat-spike highlight moments. |
| GET | /tenants/{tenant}/chat | Recent unified-chat messages incl. emotes (poll with ?after=<id>). |
| POST | /tenants/{tenant}/chat/reply | Send a chat message as the broadcaster (platform, message). |
| POST | /tenants/{tenant}/chat/messages/{message}/moderate | Moderate a message: delete, timeout or ban. |
| GET | /tenants/{tenant}/integrations | List connected platforms (Twitch/Kick/YouTube/…) and their status. |
| GET | /tenants/{tenant}/automations | List automation rules with their event type, conditions and actions. |
| GET | /tenants/{tenant}/automation-runs | Recent automation-rule run history (status per fired event). |
| GET | /tenants/{tenant}/events | Recent event feed (poll with ?after=<id>). |
| POST | /tenants/{tenant}/events | Fire a custom event into the rules engine (type, context). |
| GET | /tenants/{tenant}/devices | List connected LAN devices (via the Local Agent). |
| GET | /tenants/{tenant}/connectors | Local Agent fleet: version, liveness, 3D-printer status, Now Playing track and self-update rollback state. |
| GET | /channels/{channel}/lan-sources | LAN ingest sources on a channel (source URL is credential-masked). |
| GET | /tenants/{tenant}/games | Recent stream-game sessions + an all-time wins leaderboard. |
| GET | /tenants/{tenant}/raffles | Prize-draw campaigns (metadata + counts only — never the entrant data). |
| GET | /tenants/{tenant}/loops | Always-on loop sources across the workspace. |
| GET | /tenants/{tenant}/music | The royalty-free music library + this workspace's radio settings and player URL. |
| POST | /channels/{channel}/clips | Create a clip from a recording (source_start, start_offset_seconds, duration_seconds). |
| GET | /tenants/{tenant}/webhooks | List developer webhook endpoints (the signing secret is never returned). |
| POST | /tenants/{tenant}/webhooks | Create a webhook endpoint (url + events); the signing secret is returned once. |
| DELETE | /tenants/{tenant}/webhooks/{webhook} | Delete a webhook endpoint. |
| GET | /tenants/{tenant}/overlays | List overlays (each with its render/data URLs) + the Main blanket URL. |
| POST | /tenants/{tenant}/overlays | Create an overlay (name; optional width, height, widgets). |
| PATCH | /tenants/{tenant}/overlays/{overlay} | Update an overlay (name / size / widgets). |
| DELETE | /tenants/{tenant}/overlays/{overlay} | Delete an overlay. |
| POST | /tenants/{tenant}/overlays/{overlay}/set-main | Make it the Main overlay rendered by the stable blanket URL. |
| GET | /tenants/{tenant}/timers | List scheduled-message timers. |
| POST | /tenants/{tenant}/timers | Create a timer (messages, interval_minutes; optional platforms, name). |
| PATCH | /tenants/{tenant}/timers/{timer} | Update a timer (enabled, messages, interval, …). |
| DELETE | /tenants/{tenant}/timers/{timer} | Delete a timer. |
Destination parameters
POST and PUT destination requests accept either a custom destination or a saved preset payload. For a custom destination, send name, protocol (rtmp, rtsp or srt) and url. Optional video_settings can include resolution (source, 1080p, 720p, 480p) and bitrate in Kbps. The toggle endpoint 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: channel 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 channel
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: channel 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 the live cross-platform chat feed, reply as the broadcaster, and moderate — the same engine as the dashboard chat panel. Replies support twitch, kick and youtube (where connected with the needed scope); moderation actions are delete, timeout (10 min) and ban. Chat endpoints require the workspace to have integrations enabled, and 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 your connected platforms, automation rules and event history — and, most usefully, fire your own events into the rules engine. A custom event runs every matching rule's actions (lights, Discord, webhooks, OBS…), so an external system — a donation page, your backend, a Zap — can drive your on-stream automations. Secrets are never returned: connection tokens and action payloads are omitted from the responses.
# 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 that listen for custom.* events in Integrations → Automations, then reference your context fields (e.g. {{ amount }}) in the action templates.
Event webhooks
Create developer webhooks from Settings -> Developer webhooks. Each delivery is a JSON POST signed with X-Streamrepeater-Signature, where the value is sha256= plus an HMAC-SHA256 of the raw request body using the endpoint's 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: stream.live, stream.offline, destination.failed, recording.started and bandwidth.warning. The settings page can also send a ping test event. Endpoints can be created, listed and deleted via the API (/tenants/{tenant}/webhooks) as well as the dashboard — the signing secret is returned once on creation.
Need help integrating? Get in touch.