Playlists API

4 min read

Playlists API

Create, manage, and deploy playlists programmatically.

List Playlists

`` GET /v1/playlists ``

Query parameters:

  • page, limit — Pagination
  • search — Search by name

Response: ``json { "success": true, "data": [ { "id": "pl_abc123", "name": "Morning Menu", "mode": "sequential", "item_count": 5, "total_duration": 50, "created_at": "2025-01-15T10:30:00Z", "updated_at": "2025-01-16T14:00:00Z" } ] } ``

Create Playlist

`` POST /v1/playlists ``

Request body: ``json { "name": "Happy Hour Specials", "mode": "sequential", "items": [ { "content_id": "asset_abc", "duration": 10 }, { "content_id": "asset_def", "duration": 15 } ] } ``

Modes: sequential, shuffle, weighted

For weighted mode, include weight in each item: ``json { "content_id": "asset_abc", "duration": 10, "weight": 60 } ``

Get Playlist Detail

`` GET /v1/playlists/:id ``

Update Playlist

`` PATCH /v1/playlists/:id ``

Add Item to Playlist

`` POST /v1/playlists/:id/items ``

Remove Item from Playlist

`` DELETE /v1/playlists/:id/items/:item_id ``

Deploy Playlist

`` POST /v1/playlists/:id/deploy ``

Request body: ``json { "targets": [ { "type": "store", "id": "store_abc" }, { "type": "device", "id": "dev_xyz" }, { "type": "tag", "value": "menu-board" } ] } ``

Use the deploy endpoint to automate content distribution. For example, trigger a playlist deployment whenever your POS system updates the menu.

Delete Playlist

`` DELETE /v1/playlists/:id ``

Deploying a playlist via API generates a new manifest and pushes it to devices. Ensure the playlist contains valid content items before deploying to avoid blank screens.

Was this article helpful?