Skip to main content

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

FieldDescription
totalVideosNumber of videos owned by this channel
totalSubscribersNumber of users subscribed to this channel
totalViewsSum of views across all channel videos
totalLikesCombined 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>"
ParameterDefaultMaxDescription
page1Page number
limit20100Videos 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

FieldDescription
videosArray of video documents for the current page
totalLikesPer-video: total number of likes on this video
totalCommentsPer-video: total number of comments on this video
pageCurrent page number
totalVideosTotal number of videos owned by the channel (across all pages)
totalPagesTotal number of pages given the current limit

Endpoint summary

MethodPathAuthDescription
GET/api/v1/dashboard/channelStats/:channelIdRequiredGet aggregated channel stats
GET/api/v1/dashboard/channel/videos/:channelIdRequiredList channel videos with engagement counts

Build docs developers (and LLMs) love