Appearance
Playlists
Under /v1. Lists are cursor pages. Followers are social follows with targetType: "playlist".
Kinds: standard, smart (items from rules, refreshed by job), combined. Origin user | ai | editorial | system; AI playlists come from PlaylistsApi.createGenerated. Visibility public | unlisted | private. Status active | pending | declined | expired. Roles: owner, editor (details, items, order), contributor (adds, removes own).
| Method | Path | Auth | Body / query | Response |
|---|---|---|---|---|
| POST | /playlists | user | { title, description?, visibility?, profileId?, isCollaborative?, coverAssetId?, smart?: { rules[], settings } } | PlaylistView 201 |
| POST | /playlists/combined | user | { title, description?, visibility?, sourcePlaylistIds[], message? } | PlaylistView 201 (status pending) |
| GET | /me/playlists | user | page | own, member and co-curated |
| GET | /profiles/:profileId/playlists | guest | page | public active ones |
| GET | /playlists/:id | guest | PlaylistView | |
| PATCH | /playlists/:id | owner/editor | partial create body (visibility owner only) | PlaylistView |
| DELETE | /playlists/:id | owner | ok | |
| GET | /playlists/:id/items | guest (if visible) | page (ordered by rank) | { id, type, refId, durationMs, addedByUserId, sourcePlaylistId, addedAt }[] |
| POST | /playlists/:id/items | owner/editor/contributor | { items: [{ type: recording|episode, id }], afterItemId?: uuid|null } | { count } 201 |
| POST | /playlists/:id/items/remove | as above | { itemIds[] } | { count } |
| PATCH | /playlists/:id/items/:itemId/position | owner/editor | { afterItemId: uuid|null } (null = first) | ok |
| GET | /playlists/:id/members | viewer | { userId, role, createdAt }[] | |
| POST | /playlists/:id/members | owner | { userId, role } | ok 201 |
| DELETE | /playlists/:id/members/:userId | owner or self | ok | |
| POST | /playlists/:id/refresh | owner/editor (smart) | ok 202 | |
| GET | /playlists/:id/sources | owner / source owner | SourceView[] | |
| GET | /me/playlist-requests | user | page, decision? | requests to combine your playlists |
| POST | /playlist-requests/:id/decision | source owner | { decision: accepted|declined } | SourceView |
PlaylistView: id, ownerUserId, ownerProfileId, title, description, coverAssetId, visibility, kind, origin, status, isCollaborative, itemCount, totalDurationMs, followerCount, isFollowing, myRole, credits[{userId, role:"co_curator"}], requestExpiresAt, lastItemAddedAt, createdAt, updatedAt.
Smart rules: genre|mood|language is/is_not value, bpm|era between min max, liked is, explicit is_not, recently_added within_days days; settings { match: all|any, limit, sort, refreshHours }.
Combined flow: each other owner gets playlist.collab_request; the playlist becomes visible on the first acceptance, accepted owners become co-curators, a decline removes that source's items, and undecided sources expire after PLAYLIST_COMBINED_REQUEST_DAYS (job every 15 min). The requester gets playlist.collab_decided.
Errors: PLAYLIST_NOT_FOUND, PLAYLIST_FORBIDDEN, PLAYLIST_NOT_EDITABLE, PLAYLIST_ITEM_NOT_FOUND, PLAYLIST_ITEM_DUPLICATE, PLAYLIST_ITEM_UNAVAILABLE, PLAYLIST_FULL, PLAYLIST_RANK_INVALID, PLAYLIST_MEMBER_NOT_FOUND, PLAYLIST_MEMBER_EXISTS, PLAYLIST_RULES_INVALID, PLAYLIST_SOURCE_INVALID, PLAYLIST_SOURCE_NOT_FOUND, PLAYLIST_SOURCE_DECIDED, SOCIAL_BLOCKED.
Events: playlists.playlist.changed (snapshot, isListed/wasListed), playlists.playlist.deleted, playlists.items.added, playlists.source.decided.
Account privacy
While the owner is deactivated, public/unlisted playlists become private (collaborators keep access); reactivation restores the held visibility (playlist_deactivation_holds). Deletion soft-deletes the owner's playlists.