The Subscriptions API manages channel follow relationships. Subscribing and unsubscribing use the same endpoint with a toggle pattern. You cannot subscribe to your own channel. The public subscriber count endpoint requires no authentication.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/subscription/subscribe/:channelId
Protected — requires
Authorization: Bearer <accessToken>MongoDB ObjectId of the channel (user) to subscribe to.
400 (missing channelId, self-subscription attempt), 404 (channel not found)
GET /api/v1/subscription/channelSubscriberCount/:channelId
Get the total number of subscribers for a channel. This endpoint is public — no authentication required.MongoDB ObjectId of the channel.
400 (missing channelId), 404 (channel not found)
GET /api/v1/subscription/subscribedChannels/:subscriberId
Protected — requires
Authorization: Bearer <accessToken>. You can only view your own subscriptions.Your user ID (must match the authenticated user).
Page number. Defaults to
1.Items per page. Defaults to
20, maximum 100.400 (missing subscriberId), 403 (subscriberId doesn’t match authenticated user)
GET /api/v1/subscription/channelSubscribers/:channelId
Protected — requires
Authorization: Bearer <accessToken>. You can only view subscribers of your own channel.Your channel’s user ID (must match the authenticated user).
Page number. Defaults to
1.Items per page. Defaults to
20, maximum 100.400 (missing channelId), 403 (channelId doesn’t match authenticated user), 404 (channel not found)