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 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 to 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:
https://vidtube-ke5w.onrender.com/api/v1

Authentication

Public endpoints work without any credentials. Protected endpoints (marked in the reference with a lock icon) require an access token issued by POST /users/login or POST /users/refresh-Token. Pass the token in the Authorization header:
Authorization: Bearer <your_access_token>
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 typeWhen to use
application/jsonAll non-file requests. Body size limit: 16 kb.
multipart/form-dataEndpoints 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": 200,
  "data": { },
  "message": "Success",
  "success": true
}
  • statusCode — mirrors the HTTP status code.
  • data — the resource or collection returned by the endpoint. May be null for operations that produce no output (for example, logout).
  • message — a human-readable description of the result.
  • successtrue when statusCode is below 400.

Error

{
  "statusCode": 400,
  "message": "Error description",
  "errors": [],
  "success": false
}
  • 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 — always false for error responses.
The data field is null on all error responses. Always check success or statusCode before reading data.

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.

Build docs developers (and LLMs) love