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 API provides analytics for your channel. Both endpoints are protected and enforce ownership — you can only query stats for your own channel (the channelId in the path must match your authenticated user ID).

GET /api/v1/dashboard/channelStats/:channelId

Protected — requires Authorization: Bearer <accessToken>. The channelId must match your user ID.
Get aggregate statistics for your channel: total videos, subscribers, cumulative video views, and total likes received across all videos, comments, and tweets.
channelId
string
required
Your channel’s user ID. Must match the authenticated user.
curl https://vidtube-ke5w.onrender.com/api/v1/dashboard/channelStats/664usr456... \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response (200)
{
  "statusCode": 200,
  "data": {
    "totalVideos": 24,
    "totalSubscribers": 1340,
    "totalViews": 98500,
    "totalLikes": 4200
  },
  "message": "Channel details fetched successfully.",
  "success": true
}
totalLikes counts likes on your videos, comments, and tweets — but excludes likes made by you (the channel owner).
Error codes: 400 (missing channelId, or channelId doesn’t match authenticated user), 404 (channel not found)

GET /api/v1/dashboard/channel/videos/:channelId

Protected — requires Authorization: Bearer <accessToken>. The channelId must match your user ID.
List all videos uploaded by your channel, sorted newest first, with per-video like and comment counts. Results are paginated.
channelId
string
required
Your channel’s user ID. Must match the authenticated user.
page
integer
Page number. Defaults to 1.
limit
integer
Videos per page. Defaults to 20, maximum 100.
curl "https://vidtube-ke5w.onrender.com/api/v1/dashboard/channel/videos/664usr456...?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response (200)
{
  "statusCode": 200,
  "data": {
    "videos": [
      {
        "_id": "664vid123...",
        "title": "My Latest Tutorial",
        "thumbnail": "https://res.cloudinary.com/...",
        "duration": "15: 42 seconds",
        "views": 3200,
        "isPublished": 1,
        "createdAt": "2024-05-01T10:00:00.000Z",
        "totalLikes": 180,
        "totalComments": 34
      }
    ],
    "page": 1,
    "totalVideos": 24,
    "totalPages": 2
  },
  "message": "Videos fetched successfully.",
  "success": true
}
Error codes: 400 (missing channelId), 404 (channel not found)

Build docs developers (and LLMs) love