The VidTube API is a RESTful HTTP API served under a single base path. Every resource — users, videos, comments, likes, playlists, tweets, subscriptions, dashboard stats, and health — is available as a distinct group of endpoints. All requests and responses use JSON by default; you switch toDocumentation 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.
multipart/form-data only when uploading binary files such as videos, thumbnails, avatars, or cover images. Protected endpoints require a Bearer token in the Authorization header, which you obtain by logging in or refreshing your access token.
Base URL
All endpoints are relative to:Authentication
Public endpoints work without any credentials. Protected endpoints (marked in the reference with a lock icon) require an access token issued byPOST /users/login or POST /users/refresh-Token.
Pass the token in the Authorization header:
Access tokens expire after 1 hour by default. Use
POST /users/refresh-Token with your refresh token (valid for 10 days) to obtain a new access token without re-authenticating.Request format
| Content type | When to use |
|---|---|
application/json | All non-file requests. Body size limit: 16 kb. |
multipart/form-data | Endpoints that accept video, thumbnail, avatar, or coverImage fields. |
Response envelope
Every response — success or error — wraps its payload in a consistent envelope so you can handle responses uniformly.Success
statusCode— mirrors the HTTP status code.data— the resource or collection returned by the endpoint. May benullfor operations that produce no output (for example, logout).message— a human-readable description of the result.success—truewhenstatusCodeis below 400.
Error
statusCode— the HTTP error code (400, 401, 404, 500, and so on).message— a description of what went wrong.errors— an array of additional error detail objects, populated for validation failures. Empty for most errors.success— alwaysfalsefor error responses.
Resource groups
Users
Registration, login, token refresh, profile updates, avatar upload, watch history, and logout.
Videos
Upload, list, fetch by ID, update metadata, delete, and toggle publish status.
Comments
Add, list, edit, and delete comments on videos.
Likes
Like or unlike videos, comments, and tweets; retrieve your liked videos.
Playlists
Create and manage playlists, add or remove videos, and fetch playlists by user.
Tweets
Create, update, delete, and retrieve channel posts (tweets).
Subscriptions
Subscribe or unsubscribe to channels; list subscribers and subscribed channels.
Dashboard
Channel analytics including total views, subscribers, video count, and per-video like counts.
Healthcheck
Verify the API is live and accepting requests.