Skip to content

Livestreams

Manage live video streams on Unleash Live. The endpoints below let you start and stop streams, list what is currently broadcasting, mint short-lived viewer tokens, and group devices into shareable channels.

Base URL

https://api.unleashlive.com

All endpoints require a Bearer token in the Authorization header. We recommend using a Personal Access Token (PAT). See the Authentication section for how to create one.

Authorization: Bearer <YOUR_PAT>

Channels group one or more devices so they can be watched together, optionally on a public watch page.

POST /v1/channels

Create a new channel scoped to the caller’s team. Channel names must be unique within the team and cannot exceed 100 characters.

FieldTypeDescription
nameString!Channel name. Max 100 characters.
{
"name": "Site Alpha"
}

GET /v1/channels

Lists all channels for the caller’s team.


PATCH /v1/channels/{id}

Update one or more mutable fields on a channel. Send only the fields you want to change.

ParameterTypeDescription
idStringChannel ID.
FieldTypeDescription
nameStringNew channel name. Must be unique within the team.
isPublicBooleanToggle public sharing. true generates a new publicUrl; false clears it.
deviceIdsString[]Replaces the channel’s device list. Every device must belong to the caller’s team.
{
"isPublic": true,
"deviceIds": ["deviceId1", "deviceId2"]
}

POST /v1/channels/{id}/devices/{deviceId}

Add a device to a channel. The device must belong to the caller’s team.

ParameterTypeDescription
idStringChannel ID.
deviceIdStringDevice ID.

DELETE /v1/channels/{id}/devices/{deviceId}

Remove a device from a channel. No-op if the device is not in the channel.

ParameterTypeDescription
idStringChannel ID.
deviceIdStringDevice ID.

DELETE /v1/channels/{id}

Delete a channel.

ParameterTypeDescription
idStringChannel ID.

These endpoints manage the lifecycle of a live stream: start, stop, and check status.

There are two parallel APIs:

  • Restream API (/v1/streams/from/*, /v1/streams/to/*): the caller supplies the sourceUrl (or destUrl) along with the device and stream key. Best for one-off flows or testing.
  • Device-scoped API (/v1/streams/api/*): sourceUrl and streamKey are looked up from the device record, so the request payload only carries IDs. Recommended for production integrations.
ValueDescription
STARTINGStart request accepted; provisioning is underway.
STREAMINGStream is live and status is being logged.
STOPPINGStop request accepted; the stream is winding down.
STOPPEDStopped by a user request.
FINISHEDStream ended on its own (source disconnected, etc.).
ERRORAn unrecoverable error was reported.

POST /v1/streams/from/start

Pull a remote RTMP or RTSP feed and ingest it as a stream on Unleash Live.

FieldTypeDescription
deviceIdString!Device to associate the stream with.
streamKeyString!Stream key for the team.
sourceUrlString!RTMP or RTSP URL to pull from.
{
"deviceId": "deviceId1",
"streamKey": "teamId1",
"sourceUrl": "rtsp://camera.example.com/live"
}
"STARTING"

POST /v1/streams/from/stop

Stop a stream that was started with Start Restream from Source.

FieldTypeDescription
deviceIdString!Device ID.
streamKeyString!Stream key.

POST /v1/streams/to/start

Relay an existing Unleash Live RTMP stream to an external RTMP destination (for example, a YouTube Live or social media ingest).

FieldTypeDescription
deviceIdString!Device whose stream to relay.
streamKeyString!Stream key.
destUrlString!RTMP URL to push to.

POST /v1/streams/to/stop

Stop an outbound restream started with Start Restream to Destination.

FieldTypeDescription
deviceIdString!Device ID.
streamKeyString!Stream key.

POST /v1/streams/api/{deviceId}/start

Start ingesting the source URL pre-configured on the given device. No request body is needed; the source URL and stream key are resolved from the device record.

ParameterTypeDescription
deviceIdStringDevice ID.
{
"streamId": "deviceId1-FROM"
}
StatusMeaning
400Stream is already running for this device.
403Device does not belong to the caller’s team.
412Device has no sourceUrl configured.

POST /v1/streams/api/stop

Stop a running stream by its streamId.

FieldTypeDescription
streamIdString!Stream identifier returned when starting it.
{
"streamId": "deviceId1-FROM"
}

POST /v1/streams/api/status

Check the current state of a stream. Useful for confirming that a stop request has completed.

FieldTypeDescription
streamIdString!Stream identifier.
{
"state": "STREAMING"
}

GET /v1/streams/api/{deviceId}/streamid

Return the streamId of the currently active stream for a device.

ParameterTypeDescription
deviceIdStringDevice ID.
{
"streamId": "deviceId1-FROM"
}

If the device is not currently streaming the endpoint returns HTTP 400.


GET /v1/streams/{streamKey}

List streams currently in the STREAMING state for the caller’s team. The active team is resolved from the auth token; {streamKey} is a legacy path segment kept for routing, so pass any non-empty string.


Mint a JWT that grants temporary access to a device’s HLS or DASH stream through the external streaming CDN. Use this when you need to share a live feed with a third-party viewer (an embed, a TV monitor, an integration) without exposing platform credentials.

Provide either deviceId (single-device token) or teamId (team-wide token).

POST /v1/streams/external/token
FieldTypeDescription
deviceIdStringRequired if teamId is not provided.
teamIdStringRequired if deviceId is not provided.
aiAppIdsString[]Optional. AI add-on IDs to also include annotated stream URLs for.
durationIntegerToken lifetime in seconds. Minimum 60, maximum 43200 (12 hours). Defaults to 3600 (1 hour).
{
"deviceId": "device-abc123",
"duration": 3600
}
FieldTypeDescription
tokenStringSigned JWT to include in requests to the external streaming CDN.
scopeStringdevice or team. Matches what was requested.
deviceIdStringEchoed when scope is device.
teamIdStringTeam the token is bound to.
expiresInIntegerToken lifetime in seconds.
expiresAtIntegerUnix timestamp (seconds) at which the token expires.
streamUrls.hls / dashStringSigned playback URLs. Present when scope is device.
streamUrlPatternObjectTemplated URL pattern with a note field. Present when scope is team.
annotatedStreamUrlsArrayPer-aiAppId signed HLS URLs. Present when aiAppIds were supplied.
annotatedStreamUrlPatternsArrayPer-aiAppId URL patterns. Present when scope is team and aiAppIds were supplied.