The Comments API lets viewers add text comments to any video, list existing comments with pagination, update their own comments, and delete them. Read operations are public; write operations require a valid access token.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.
GET /api/v1/comments/videoComments/:videoId
Retrieve all comments for a specific video, sorted newest first. Each comment includes the owner’susername and avatar.
MongoDB ObjectId of the video.
Page number (1-indexed). Defaults to
1.Comments per page. Defaults to
10.404 (video not found)
POST /api/v1/comments/addComment/:videoId
Protected — requires
Authorization: Bearer <accessToken>MongoDB ObjectId of the video to comment on.
Comment text.
400 (missing content), 401 (not authenticated)
PATCH /api/v1/comments/updateComment/:commentId
Protected — requires
Authorization: Bearer <accessToken>MongoDB ObjectId of the comment to update.
Updated comment text.
400 (missing commentId or content), 401, 404 (comment not found)
DELETE /api/v1/comments/deleteComment/:commentId
Protected — requires
Authorization: Bearer <accessToken>MongoDB ObjectId of the comment to delete.
400 (missing or invalid commentId)