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.
The dashboard endpoints give you a consolidated view of your channel’s performance. Both endpoints are protected: only the authenticated channel owner can query their own stats. Attempting to access another channel’s dashboard data returns a 400 error. Use these endpoints to power creator-facing analytics dashboards, reporting tools, or automated summaries.
The channelId path parameter must match the authenticated user’s own ID. If it does not, the API returns 400 No authorized access to Channel. There is no admin override — each channel owner can only read their own data.
Channel stats
Returns aggregated totals across the entire channel: video count, subscriber count, total views, and total likes received on videos, comments, and tweets combined.
curl https://vidtube-ke5w.onrender.com/api/v1/dashboard/channelStats/<your_channel_id> \
-H "Authorization: Bearer <your_access_token>"
Response:
{
"statusCode": 200,
"data": {
"totalVideos": 24,
"totalSubscribers": 1042,
"totalViews": 87530,
"totalLikes": 3210
},
"message": "Channel details fetched successfully.",
"success": true
}
Field descriptions
| Field | Description |
|---|
totalVideos | Number of videos owned by this channel |
totalSubscribers | Number of users subscribed to this channel |
totalViews | Sum of views across all channel videos |
totalLikes | Combined likes received on the channel’s videos, comments, and tweets — likes from the channel owner themselves are excluded |
totalLikes aggregates likes across three content types simultaneously: video likes, comment likes, and tweet likes. The channel owner’s own likes are excluded from the count so the number reflects external engagement only.
Channel videos
Returns a paginated list of the channel’s videos. Each video in the result includes two extra computed fields: totalLikes (the number of likes on that video) and totalComments (the number of comments on that video). Results are sorted newest-first.
curl "https://vidtube-ke5w.onrender.com/api/v1/dashboard/channel/videos/<your_channel_id>?page=1&limit=20" \
-H "Authorization: Bearer <your_access_token>"
| Parameter | Default | Max | Description |
|---|
page | 1 | — | Page number |
limit | 20 | 100 | Videos per page |
Response:
{
"statusCode": 200,
"data": {
"videos": [
{
"_id": "64f1a2b3c4d5e6f7a8b9c0d1",
"title": "My First Video",
"description": "A short introduction to VidTube",
"videoFile": "https://res.cloudinary.com/your_cloud/video/upload/v1234567890/video.mp4",
"thumbnail": "https://res.cloudinary.com/your_cloud/image/upload/v1234567890/thumbnail.jpg",
"duration": "2: 34 seconds",
"views": 142,
"isPublished": 1,
"owner": "64e0a1b2c3d4e5f6a7b8c9d0",
"createdAt": "2024-09-01T12:00:00.000Z",
"updatedAt": "2024-09-01T12:00:00.000Z",
"totalLikes": 38,
"totalComments": 12
}
],
"page": 1,
"totalVideos": 24,
"totalPages": 2
},
"message": "Videos fetched successfully.",
"success": true
}
Response fields
| Field | Description |
|---|
videos | Array of video documents for the current page |
totalLikes | Per-video: total number of likes on this video |
totalComments | Per-video: total number of comments on this video |
page | Current page number |
totalVideos | Total number of videos owned by the channel (across all pages) |
totalPages | Total number of pages given the current limit |
Endpoint summary
| Method | Path | Auth | Description |
|---|
GET | /api/v1/dashboard/channelStats/:channelId | Required | Get aggregated channel stats |
GET | /api/v1/dashboard/channel/videos/:channelId | Required | List channel videos with engagement counts |