The Playlists API lets you organize videos into named collections. You can create a playlist, add videos to it, remove individual videos, rename it, or delete it entirely. Ownership is enforced — only the playlist creator can modify or delete it.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Pragyat-Nikunj/VidTube/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/v1/playlist/createPlaylist
Protected — requires
Authorization: Bearer <accessToken>Playlist name.
Playlist description.
400 (missing name or description)
GET /api/v1/playlist/user/:userId
List all playlists belonging to a user. Results are paginated and sorted newest first.MongoDB ObjectId of the user whose playlists to fetch.
Page number. Defaults to
1.Items per page. Defaults to
10.400 (missing or invalid userId)
GET /api/v1/playlist/:playlistId
Fetch a single playlist by ID, including its list of video IDs.MongoDB ObjectId of the playlist.
400 (invalid ID format), 404 (playlist not found)
PUT /api/v1/playlist/:playlistId/videos/:videoId
Protected — requires
Authorization: Bearer <accessToken>MongoDB ObjectId of the playlist.
MongoDB ObjectId of the video to add.
400 (invalid IDs, video already in playlist), 403 (not playlist owner), 404 (playlist or video not found)
DELETE /api/v1/playlist/:playlistId/videos/:videoId
Protected — requires
Authorization: Bearer <accessToken>MongoDB ObjectId of the playlist.
MongoDB ObjectId of the video to remove.
400 (video not in playlist), 403 (not playlist owner), 404
DELETE /api/v1/playlist/:playlistId
Protected — requires
Authorization: Bearer <accessToken>MongoDB ObjectId of the playlist to delete.
403 (not playlist owner), 404 (not found)
PATCH /api/v1/playlist/:playlistId
Protected — requires
Authorization: Bearer <accessToken>name or description) is required.
MongoDB ObjectId of the playlist.
New playlist name.
New playlist description.
400 (no fields provided, invalid ID), 403 (not playlist owner), 404