Skip to main content
POST
Create a scene playlist

Authorizations

Authorization
string
header
required

OAuth 2.1 authorization-code flow with PKCE.

FlowAuthorization Code
Authorization URL
https://auth.streamloop.app/api/auth/oauth2/authorize
Token URL
https://auth.streamloop.app/api/auth/oauth2/token
Scopes1
streamloop:write
Create and control streams, destinations, and playlists

Headers

X-Workspace-Id
string

Workspace this request operates in — the workspace id (wksp_…) or the organization id, from GET /workspaces. Required with an API key, which carries no workspace (400 WORKSPACE_REQUIRED without it). With an OAuth token it defaults to the workspace the token was issued for. Responds 403 WORKSPACE_FORBIDDEN when the caller is not a current member, rather than falling back to another workspace.

Idempotency-Key
string

Optional client-generated key. A repeated request with the same key, method and path (by the same caller in the same workspace) replays the original response, with Idempotency-Replayed: true, for 24 hours instead of running again — safe retries. The same key with a different body is refused with 422 IDEMPOTENCY_KEY_REUSED (nothing runs): use a new key for each new request. A 5xx answer is not remembered (a retry runs).

Body

application/json
kind
enum<string>
required
Available options:
video,
audio
name
string
required
sceneId
string
required

The scene that owns the playlist (scn_*), in the active workspace.

Response

Created.

createdAt
string<date-time>
required
id
string
required
kind
enum<string>
required
Available options:
video,
audio
mode
enum<string>
required
Available options:
sequential,
shuffle
name
string
required
version
integer
required

The draft's version, bumped by 1 per committed edit batch. Pass it back to playlist edits for optimistic concurrency.

sceneId
string | null

The scene that owns this playlist (scn_…); null for a stream playlist.

streamID
string | null