Introduction
Playlist management endpoints allow authenticated users to create, update, and delete their own playlists. All management operations require authentication and appropriate permissions.Authentication Requirements
To perform playlist management operations, you must:- Be authenticated with a valid user account
- Have the
AllowPlaylistManagementfeature enabled for your account - Be the owner of the playlist (for update and delete operations)
Create Playlist
name(required) - Playlist name (string)description(optional) - Playlist description (string)visibility(required) - Visibility setting (integer: 0=Public, 1=Private, 2=Unlisted)
Playlist Limits
The system enforces a limit on the number of playlists a user can create. This is validated by theUserExceedsPlaylistLimit middleware. If you’ve reached your limit, you’ll receive an error response:
Update Playlist
{playlist}- Playlist hashid
name- Update the playlist namedescription- Update the playlist descriptionvisibility- Change visibility (0=Public, 1=Private, 2=Unlisted)
Delete Playlist
{playlist}- Playlist hashid
- Deletion is permanent and uses
forceDelete(not soft delete) - All tracks associated with the playlist are also deleted
- Associated playlist images are removed
- This action triggers a
PlaylistDeletedevent
Visibility Settings
Public Playlists (visibility: 0)
- Visible to all users
- Included in playlist search results
- Appear in public playlist listings
- Indexed for search functionality
Private Playlists (visibility: 1)
- Only visible to the playlist owner
- Not searchable or discoverable by other users
- Only accessible when authenticated as the owner
Unlisted Playlists (visibility: 2)
- Accessible via direct link (hashid)
- Not included in public listings or search results
- Anyone with the link can view the playlist
User Playlists
Get My Playlists
Events
Playlist management operations trigger the following events:- PlaylistCreated - Fired when a new playlist is created
- PlaylistUpdated - Fired when a playlist is updated
- PlaylistDeleted - Fired when a playlist is deleted
Authorization Checks
The API performs the following authorization checks:- Feature Flag: The
AllowPlaylistManagementfeature must be enabled - Ownership: Users can only modify playlists they own
- Limits: Users cannot exceed the maximum number of playlists
403 Forbidden or appropriate error response.
Best Practices
Naming Playlists
- Use descriptive, meaningful names
- Consider including the theme (e.g., “Action OPs”, “Romantic EDs”)
- Avoid special characters that may cause issues
Descriptions
- Provide context about what the playlist contains
- Mention any specific criteria or theme
- Keep descriptions concise but informative
Visibility Management
- Start with unlisted (2) if you’re unsure about sharing
- Use private (1) for personal work-in-progress playlists
- Switch to public (0) when ready to share with the community
Before Deleting
- Consider changing to private instead of deleting
- Remember that deletion is permanent
- Export track information if you might want to recreate the playlist later
Error Responses
401 Unauthorized
You’re not authenticated. Include a valid bearer token.403 Forbidden
You don’t have permission to perform this action (not the owner or feature disabled).404 Not Found
The playlist doesn’t exist or you don’t have access to it.422 Unprocessable Entity
Validation failed on your request data.Related Resources
- Playlist Overview - Understanding playlist structure and main endpoints
- Playlist Track Management - Managing tracks within playlists