{"info":{"_postman_id":"4d5f9eef-3d31-41eb-846c-7c8681ab991c","name":"Video Streaming Platform API","description":"<html><head></head><body><h1 id=\"video-streaming-platform-api\">Video Streaming Platform API</h1>\n<p>A comprehensive REST API for building and managing a full-featured video streaming platform. This API covers the complete lifecycle of a streaming service — from user authentication and video content management to social engagement and creator analytics.</p>\n<p>All requests are authenticated using a <strong>Bearer token</strong> passed via the <code></code> variable, and all endpoints are prefixed with the base URL defined in <code>{{base_url}}</code>.</p>\n<hr>\n<h2 id=\"modules\">Modules</h2>\n<h3 id=\"👤-users\">👤 Users</h3>\n<p>Handles the full authentication lifecycle for platform users.</p>\n<ul>\n<li>Register User, Login User, Logout User, Get Current User</li>\n</ul>\n<h3 id=\"🎬-videos\">🎬 Videos</h3>\n<p>Manages core video content on the platform, with support for pagination and search.</p>\n<ul>\n<li>Publish a Video, Get All Videos, Get Video by ID</li>\n</ul>\n<h3 id=\"💬-social\">💬 Social</h3>\n<p>Powers user engagement and interaction features across the platform.</p>\n<ul>\n<li>Subscribe to a Channel, Like a Video, Add a Comment to a Video</li>\n</ul>\n<h3 id=\"📊-dashboard--community\">📊 Dashboard &amp; Community</h3>\n<p>Provides creator tools for publishing community content and tracking channel performance.</p>\n<ul>\n<li>Create a Tweet (community post), Get Channel Stats</li>\n</ul>\n<hr>\n<h2 id=\"authentication\">Authentication</h2>\n<p>All protected endpoints require a Bearer token. Set the <code></code> variable in your active environment with a valid token obtained from the <strong>Login User</strong> endpoint.</p>\n<h2 id=\"base-url\">Base URL</h2>\n<p>Configure the <code>{{base_url}}</code> environment variable to point to your target server (e.g., <code>https://api.yourplatform.com</code>).</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Video Streaming Platform API","slug":"video-streaming-platform-api"}],"owner":"53529101","collectionId":"4d5f9eef-3d31-41eb-846c-7c8681ab991c","publishedId":"2sBXwyGSaY","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-06-28T12:10:31.000Z"},"item":[{"name":"Users","item":[{"name":"Register User","id":"d29cd735-2fbd-4c5f-a346-bcf2f9d354f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"type":"text","key":"fullName","value":"Guna Shekar Gandupalli"},{"type":"text","key":"email","value":"gunashekar@gmail.com"},{"type":"text","key":"username","value":"ggs0316"},{"type":"text","key":"password","value":"Guna@2006"},{"type":"file","key":"avatar","src":["postman-cloud:///1f17224e-c529-4420-ac26-71b7c2f92b4e","file"]},{"type":"file","key":"coverImage","src":["postman-cloud:///1f172251-319a-4440-80c0-2befcba56995","file"]}]},"url":"{{base_url}}/users/register","description":"<h2 id=\"register-user\">Register User</h2>\n<p>Creates a new user account on the Video Streaming Platform. Submit user details (such as <code>username</code>, <code>email</code>, <code>password</code>, and optionally a <code>fullName</code> or <code>avatar</code>) in the request body as <code>multipart/form-data</code> or JSON.</p>\n<p><strong>Authentication:</strong> Not required — this is a public endpoint.</p>\n<blockquote>\n<p>After successful registration, use the <strong>Login User</strong> endpoint to obtain a session token.</p>\n</blockquote>\n","urlObject":{"path":["users","register"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"d2fee9c6-ac2f-47d5-b7b5-52b2e676773d","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/users/register"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 201,\n  \"data\": {\n    \"_id\": \"6a41081816e969a6bc59a2df\",\n    \"fullName\": \"Guna Shekar Gandupalli\",\n    \"username\": \"ggs0316\",\n    \"email\": \"gunashekar@gmail.com\",\n    \"avatar\": \"https://res.cloudinary.com/demo/image/upload/v1/avatars/ggs0316.jpg\",\n    \"coverImage\": \"https://res.cloudinary.com/demo/image/upload/v1/covers/ggs0316.jpg\",\n    \"watchHistory\": [],\n    \"createdAt\": \"2024-06-01T10:00:00.000Z\",\n    \"updatedAt\": \"2024-06-01T10:00:00.000Z\"\n  },\n  \"message\": \"User registered successfully\",\n  \"success\": true\n}"}],"_postman_id":"d29cd735-2fbd-4c5f-a346-bcf2f9d354f9"},{"name":"Login User","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200', function () {","    pm.response.to.have.status(200);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.be.an('object');","})","","pm.test('data contains accessToken and refreshToken', function () {","    var data = pm.response.json().data;","    pm.expect(data).to.have.property('accessToken');","    pm.expect(data).to.have.property('refreshToken');","})","","pm.test('Both tokens are non-empty strings', function () {","    var data = pm.response.json().data;","    pm.expect(data.accessToken).to.be.a('string').and.to.have.length.above(0);","    pm.expect(data.refreshToken).to.be.a('string').and.to.have.length.above(0);","})","","pm.test('Save accessToken to collection variable', function () {","    var data = pm.response.json().data;","    pm.collectionVariables.set('token', data.accessToken);","    pm.expect(data.accessToken).to.be.a('string');","})"]}}],"id":"2f094b2d-fb03-41e4-b7e6-019c265ca9bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"email\": \"gunashekar@gmail.com\", \"password\": \"Guna@2006\"}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/users/login","description":"<h2 id=\"login-user\">Login User</h2>\n<p>Authenticates an existing user and returns a session token (access token and/or refresh token) upon success. Send the user's credentials in the JSON request body.</p>\n<p><strong>Body Fields:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td><code>string</code></td>\n<td>The registered email address of the user</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td><code>string</code></td>\n<td>The user's account password</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> Not required — this is a public endpoint.</p>\n<blockquote>\n<p>Store the returned token securely and include it as a <code>Bearer</code> token in the <code>Authorization</code> header for all protected endpoints.</p>\n</blockquote>\n","urlObject":{"path":["users","login"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"4a330ec7-1a3e-4c4e-b729-8598d5b0947a","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"email\": \"gunashekar@gmail.com\", \"password\": \"Guna@2006\"}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/users/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 200,\n  \"data\": {\n    \"user\": {\n      \"_id\": \"6a41081816e969a6bc59a2df\",\n      \"fullName\": \"Guna Shekar Gandupalli\",\n      \"username\": \"ggs0316\",\n      \"email\": \"gunashekar@gmail.com\",\n      \"avatar\": \"https://res.cloudinary.com/demo/image/upload/v1/avatars/ggs0316.jpg\",\n      \"coverImage\": \"https://res.cloudinary.com/demo/image/upload/v1/covers/ggs0316.jpg\"\n    },\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2YTQxMDgxODE2ZTk2OWE2YmM1OWEyZGYiLCJpYXQiOjE3MTcyMzQ4MDB9.abc123\",\n    \"refreshToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2YTQxMDgxODE2ZTk2OWE2YmM1OWEyZGYiLCJpYXQiOjE3MTcyMzQ4MDB9.xyz789\"\n  },\n  \"message\": \"User logged in successfully\",\n  \"success\": true\n}"}],"_postman_id":"2f094b2d-fb03-41e4-b7e6-019c265ca9bf"},{"name":"Logout User","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200', function () {","    pm.response.to.have.status(200);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a message field', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('message');","})","","pm.test('message is a string', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.message).to.be.a('string');","})"]}}],"id":"2fdd802b-a8d5-43fc-a0de-103ca86c38f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{supabase_service_role_api_key_090d}}"}]},"isInherited":false},"method":"POST","header":[],"url":"{{base_url}}/users/logout","description":"<h2 id=\"logout-user\">Logout User</h2>\n<p>Ends the current authenticated user's session by invalidating the active access/refresh token on the server side. No request body is required.</p>\n<p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>After a successful logout, the token will no longer be valid. The user must log in again to obtain a new session token.</p>\n</blockquote>\n","urlObject":{"path":["users","logout"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"5261a79d-a658-43f3-a2a6-37e4a09d9f57","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/users/logout"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 200,\n  \"data\": {},\n  \"message\": \"User logged out successfully\",\n  \"success\": true\n}"}],"_postman_id":"2fdd802b-a8d5-43fc-a0de-103ca86c38f2"},{"name":"Get Current User","id":"b392dd13-4c77-45b5-972f-e15db6c54260","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{supabase_service_role_api_key_090d}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer"}],"url":"{{base_url}}/users/current-user","description":"<h2 id=\"get-current-user\">Get Current User</h2>\n<p>Returns the full profile details of the currently authenticated user, including fields such as <code>username</code>, <code>email</code>, <code>fullName</code>, <code>avatar</code>, and account metadata. No request body or query parameters are needed.</p>\n<p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>Use this endpoint to verify the logged-in user's identity or to populate a user profile page in your application.</p>\n</blockquote>\n","urlObject":{"path":["users","current-user"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"5224e44c-7930-4d1c-92c4-49b306746dcd","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{base_url}}/users/current-user"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 200,\n  \"data\": {\n    \"_id\": \"6a41081816e969a6bc59a2df\",\n    \"fullName\": \"Guna Shekar Gandupalli\",\n    \"username\": \"ggs0316\",\n    \"email\": \"gunashekar@gmail.com\",\n    \"avatar\": \"https://res.cloudinary.com/demo/image/upload/v1/avatars/ggs0316.jpg\",\n    \"coverImage\": \"https://res.cloudinary.com/demo/image/upload/v1/covers/ggs0316.jpg\",\n    \"watchHistory\": [\"6a41081816e969a6bc59a2df\"],\n    \"createdAt\": \"2024-06-01T10:00:00.000Z\",\n    \"updatedAt\": \"2024-06-15T08:30:00.000Z\"\n  },\n  \"message\": \"Current user fetched successfully\",\n  \"success\": true\n}"}],"_postman_id":"b392dd13-4c77-45b5-972f-e15db6c54260"}],"id":"76a11738-2097-4145-a98b-a774004a25b1","description":"<p>This folder contains endpoints for managing user accounts and authentication on the Video Streaming Platform. It covers the full authentication lifecycle — from registering a new user and logging in, to retrieving the currently authenticated user's profile and logging out. All session-sensitive operations require a valid authentication token.</p>\n","_postman_id":"76a11738-2097-4145-a98b-a774004a25b1"},{"name":"Videos","item":[{"name":"Publish a Video","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200 or 201', function () {","    pm.expect(pm.response.code).to.be.oneOf([","        200,","        201","    ]);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.be.an('object');","})","","pm.test('data contains _id, title, description, videoFile, thumbnail', function () {","    var data = pm.response.json().data;","    pm.expect(data).to.have.property('_id');","    pm.expect(data).to.have.property('title');","    pm.expect(data).to.have.property('description');","    pm.expect(data).to.have.property('videoFile');","    pm.expect(data).to.have.property('thumbnail');","})","","pm.test('title is a non-empty string', function () {","    var data = pm.response.json().data;","    pm.expect(data.title).to.be.a('string').and.to.have.length.above(0);","})"]}}],"id":"bbea4607-e391-4f6c-b213-bd4e6b495a71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer "}],"body":{"mode":"formdata","formdata":[{"type":"text","key":"title","value":"nature videography"},{"type":"text","key":"description","value":"my first youtube video"},{"type":"file","key":"videoFile","src":"postman-cloud:///1f1722ba-7130-4dc0-97dd-100b866f00c5"},{"type":"file","key":"thumbnail","src":"postman-cloud:///1f1722bf-68b4-4ac0-b0c1-388d0bf58e8b"}]},"url":"{{base_url}}/videos","description":"<h2 id=\"publish-a-video\">Publish a Video</h2>\n<p>Uploads and publishes a new video to the platform. The request must be sent as <code>multipart/form-data</code> to support file uploads.</p>\n<p><strong>Body Fields (multipart/form-data):</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>title</code></td>\n<td><code>string</code></td>\n<td>The title of the video</td>\n</tr>\n<tr>\n<td><code>description</code></td>\n<td><code>string</code></td>\n<td>A brief description of the video content</td>\n</tr>\n<tr>\n<td><code>videoFile</code></td>\n<td><code>file</code></td>\n<td>The video file to upload</td>\n</tr>\n<tr>\n<td><code>thumbnail</code></td>\n<td><code>file</code></td>\n<td>A thumbnail image for the video</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>Ensure the video and thumbnail files meet the platform's supported format and size requirements before uploading.</p>\n</blockquote>\n","urlObject":{"path":["videos"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"e8998a8c-94db-4fbc-81b1-70a757cc34d9","name":"201 Created","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/videos"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 201,\n  \"data\": {\n    \"_id\": \"7b52091927f070b7cd60b3e0\",\n    \"title\": \"nature videography\",\n    \"description\": \"my first youtube video\",\n    \"videoFile\": \"https://res.cloudinary.com/demo/video/upload/v1/videos/nature_videography.mp4\",\n    \"thumbnail\": \"https://res.cloudinary.com/demo/image/upload/v1/thumbnails/nature_videography.jpg\",\n    \"duration\": 142.5,\n    \"views\": 0,\n    \"isPublished\": true,\n    \"owner\": \"6a41081816e969a6bc59a2df\",\n    \"createdAt\": \"2024-06-10T12:00:00.000Z\",\n    \"updatedAt\": \"2024-06-10T12:00:00.000Z\"\n  },\n  \"message\": \"Video published successfully\",\n  \"success\": true\n}"}],"_postman_id":"bbea4607-e391-4f6c-b213-bd4e6b495a71"},{"name":"Get All Videos","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200', function () {","    pm.response.to.have.status(200);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.be.an('object');","})","","pm.test('data contains a docs or videos array', function () {","    var data = pm.response.json().data;","    var hasVideos = data.hasOwnProperty('docs') || data.hasOwnProperty('videos');","    pm.expect(hasVideos).to.be.true;","    var arr = data.docs || data.videos;","    pm.expect(arr).to.be.an('array');","})","","pm.test('Response time is less than 2000ms', function () {","    pm.expect(pm.response.responseTime).to.be.below(2000);","})"]}}],"id":"e6ea9883-25b1-4e8e-b1df-18fe6dd874d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer "}],"url":"{{base_url}}/videos?page=1&limit=10&query=coding","description":"<h2 id=\"get-all-videos\">Get All Videos</h2>\n<p>Returns a paginated list of videos available on the platform, with optional search/filter support. Use query parameters to control pagination and filter results by keyword.</p>\n<p><strong>Query Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>page</code></td>\n<td><code>integer</code></td>\n<td>The page number to retrieve (default: <code>1</code>)</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td><code>integer</code></td>\n<td>Number of videos per page (default: <code>10</code>)</td>\n</tr>\n<tr>\n<td><code>query</code></td>\n<td><code>string</code></td>\n<td>Search keyword to filter videos by title or description</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n","urlObject":{"path":["videos"],"host":["{{base_url}}"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"},{"key":"query","value":"coding"}],"variable":[]}},"response":[{"id":"9a7eb6db-20c5-4ba1-a9a1-0c1ad45beac1","name":"200 OK","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"{{base_url}}/videos"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 200,\n  \"data\": {\n    \"docs\": [\n      {\n        \"_id\": \"7b52091927f070b7cd60b3e0\",\n        \"title\": \"nature videography\",\n        \"description\": \"my first youtube video\",\n        \"thumbnail\": \"https://res.cloudinary.com/demo/image/upload/v1/thumbnails/nature_videography.jpg\",\n        \"duration\": 142.5,\n        \"views\": 320,\n        \"isPublished\": true,\n        \"owner\": {\n          \"_id\": \"6a41081816e969a6bc59a2df\",\n          \"username\": \"ggs0316\",\n          \"avatar\": \"https://res.cloudinary.com/demo/image/upload/v1/avatars/ggs0316.jpg\"\n        },\n        \"createdAt\": \"2024-06-10T12:00:00.000Z\"\n      },\n      {\n        \"_id\": \"8c63102a38g181c8de71c4f1\",\n        \"title\": \"coding tutorial - Node.js basics\",\n        \"description\": \"learn node.js from scratch\",\n        \"thumbnail\": \"https://res.cloudinary.com/demo/image/upload/v1/thumbnails/nodejs_basics.jpg\",\n        \"duration\": 3600,\n        \"views\": 1540,\n        \"isPublished\": true,\n        \"owner\": {\n          \"_id\": \"6a41081816e969a6bc59a2df\",\n          \"username\": \"ggs0316\",\n          \"avatar\": \"https://res.cloudinary.com/demo/image/upload/v1/avatars/ggs0316.jpg\"\n        },\n        \"createdAt\": \"2024-06-08T09:00:00.000Z\"\n      }\n    ],\n    \"totalDocs\": 2,\n    \"limit\": 10,\n    \"page\": 1,\n    \"totalPages\": 1,\n    \"hasPrevPage\": false,\n    \"hasNextPage\": false\n  },\n  \"message\": \"Videos fetched successfully\",\n  \"success\": true\n}"}],"_postman_id":"e6ea9883-25b1-4e8e-b1df-18fe6dd874d1"},{"name":"Get Video by ID","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200', function () {","    pm.response.to.have.status(200);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.be.an('object');","})","","pm.test('data contains _id, title, description', function () {","    var data = pm.response.json().data;","    pm.expect(data).to.have.property('_id');","    pm.expect(data).to.have.property('title');","    pm.expect(data).to.have.property('description');","})","","pm.test('_id is a non-empty string', function () {","    var data = pm.response.json().data;","    pm.expect(data._id).to.be.a('string').and.to.have.length.above(0);","})"]}}],"id":"dbd5a947-a249-4159-8912-a528d4fdfe6c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer "}],"url":"{{base_url}}/videos/6a41081816e969a6bc59a2df","description":"<h2 id=\"get-video-by-id\">Get Video by ID</h2>\n<p>Fetches the complete details of a single video, including its title, description, file URL, thumbnail, view count, likes, and owner information.</p>\n<p><strong>Path Parameter:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>videoId</code></td>\n<td><code>string</code></td>\n<td>The unique identifier of the video to retrieve</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>Replace <code>{videoId}</code> in the URL with the actual ID of the video you want to fetch.</p>\n</blockquote>\n","urlObject":{"path":["videos","6a41081816e969a6bc59a2df"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"0880a248-e153-4f67-9f13-d82acab19c6e","name":"200 OK","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{base_url}}/videos/:videoId","host":["{{base_url}}"],"path":["videos",":videoId"],"variable":[{"key":"videoId","value":"7b52091927f070b7cd60b3e0","enabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"statusCode\": 200,\n  \"data\": {\n    \"_id\": \"6a41081816e969a6bc59a2df\",\n    \"title\": \"nature videography\",\n    \"description\": \"my first youtube video\",\n    \"videoFile\": \"https://res.cloudinary.com/demo/video/upload/v1/videos/nature_videography.mp4\",\n    \"thumbnail\": \"https://res.cloudinary.com/demo/image/upload/v1/thumbnails/nature_videography.jpg\",\n    \"duration\": 142.5,\n    \"views\": 320,\n    \"isPublished\": true,\n    \"likesCount\": 45,\n    \"owner\": {\n      \"_id\": \"6a41081816e969a6bc59a2df\",\n      \"fullName\": \"Guna Shekar Gandupalli\",\n      \"username\": \"ggs0316\",\n      \"avatar\": \"https://res.cloudinary.com/demo/image/upload/v1/avatars/ggs0316.jpg\",\n      \"subscribersCount\": 120,\n      \"isSubscribed\": false\n    },\n    \"createdAt\": \"2024-06-10T12:00:00.000Z\",\n    \"updatedAt\": \"2024-06-15T08:30:00.000Z\"\n  },\n  \"message\": \"Video fetched successfully\",\n  \"success\": true\n}"}],"_postman_id":"dbd5a947-a249-4159-8912-a528d4fdfe6c"}],"id":"17f28eca-8b82-4019-9af1-26a2f71e682c","description":"<p>This folder contains endpoints for managing video content on the platform. It supports publishing new videos, retrieving a paginated and searchable list of all videos, and fetching the details of a specific video by its ID. These endpoints form the core of the platform's content delivery functionality.</p>\n","_postman_id":"17f28eca-8b82-4019-9af1-26a2f71e682c"},{"name":"Social","item":[{"name":"Subscribe to a Channel","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200', function () {","    pm.response.to.have.status(200);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object or message field', function () {","    var jsonData = pm.response.json();","    var hasDataOrMessage = jsonData.hasOwnProperty('data') || jsonData.hasOwnProperty('message');","    pm.expect(hasDataOrMessage).to.be.true;","})","","pm.test('Response time is less than 2000ms', function () {","    pm.expect(pm.response.responseTime).to.be.below(2000);","})"]}}],"id":"9d040ca3-1b11-4fd3-8c2e-8b8497bcfc3f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer "}],"url":"{{base_url}}/subscriptions/c/6a41081816e969a6bc59a2df","description":"<h2 id=\"subscribe-to-a-channel\">Subscribe to a Channel</h2>\n<p>Toggles a subscription to the specified channel. If the authenticated user is not currently subscribed, this endpoint subscribes them; if they are already subscribed, it unsubscribes them.</p>\n<p><strong>Path Parameter:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>userId</code></td>\n<td><code>string</code></td>\n<td>The unique ID of the channel owner (creator) to subscribe/unsubscribe from</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>No request body is needed. The response will indicate the current subscription state after the toggle.</p>\n</blockquote>\n","urlObject":{"path":["subscriptions","c","6a41081816e969a6bc59a2df"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"9cee57ee-5451-4450-a18a-772937387f10","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/subscriptions/c/:channelId","host":["{{base_url}}"],"path":["subscriptions","c",":channelId"],"variable":[{"key":"channelId"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\"statusCode\": 200, \"data\": {\"subscribed\": true, \"channel\": \"6a41081816e969a6bc59a2df\"}, \"message\": \"Subscribed successfully\", \"success\": true}"}],"_postman_id":"9d040ca3-1b11-4fd3-8c2e-8b8497bcfc3f"},{"name":"Like a Video","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200', function () {","    pm.response.to.have.status(200);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object or message field', function () {","    var jsonData = pm.response.json();","    var hasDataOrMessage = jsonData.hasOwnProperty('data') || jsonData.hasOwnProperty('message');","    pm.expect(hasDataOrMessage).to.be.true;","})","","pm.test('Response time is less than 2000ms', function () {","    pm.expect(pm.response.responseTime).to.be.below(2000);","})"]}}],"id":"c4e86f5a-a309-4a2d-99c4-4eca20d06279","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer "}],"url":"{{base_url}}/likes/toggle/v/6a41081816e969a6bc59a2df","description":"<h2 id=\"like-a-video\">Like a Video</h2>\n<p>Toggles a like on the specified video. If the authenticated user has not yet liked the video, this endpoint adds a like; if they have already liked it, the like is removed.</p>\n<p><strong>Path Parameter:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>videoId</code></td>\n<td><code>string</code></td>\n<td>The unique identifier of the video to like or unlike</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>No request body is needed. The response will reflect the updated like status for the video.</p>\n</blockquote>\n","urlObject":{"path":["likes","toggle","v","6a41081816e969a6bc59a2df"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"2e9aa1a5-9658-446b-8d33-a8d3ed6d593d","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/likes/toggle/v/:videoId","host":["{{base_url}}"],"path":["likes","toggle","v",":videoId"],"variable":[{"key":"videoId"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\"statusCode\": 200, \"data\": {\"liked\": true, \"video\": \"6a41081816e969a6bc59a2df\", \"likedBy\": \"6a41081816e969a6bc59a2df\"}, \"message\": \"Video liked successfully\", \"success\": true}"}],"_postman_id":"c4e86f5a-a309-4a2d-99c4-4eca20d06279"},{"name":"Add a Comment to a Video","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200 or 201', function () {","    pm.expect(pm.response.code).to.be.oneOf([","        200,","        201","    ]);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.be.an('object');","})","","pm.test('data contains _id and content', function () {","    var data = pm.response.json().data;","    pm.expect(data).to.have.property('_id');","    pm.expect(data).to.have.property('content');","})","","pm.test('content is a non-empty string', function () {","    var data = pm.response.json().data;","    pm.expect(data.content).to.be.a('string').and.to.have.length.above(0);","})"]}}],"id":"e1c20621-3a49-4123-8a21-b6f97166d419","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer "},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"content\": \"This is an awesome video!\"}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/comments/6a41081816e969a6bc59a2df","description":"<h2 id=\"add-a-comment-to-a-video\">Add a Comment to a Video</h2>\n<p>Posts a new comment on the specified video on behalf of the authenticated user.</p>\n<p><strong>Path Parameter:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>videoId</code></td>\n<td><code>string</code></td>\n<td>The unique identifier of the video to comment on</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body Fields (JSON):</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>content</code></td>\n<td><code>string</code></td>\n<td>The text content of the comment</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>Replace <code>{videoId}</code> in the URL with the target video's ID. The comment will be associated with the authenticated user's account.</p>\n</blockquote>\n","urlObject":{"path":["comments","6a41081816e969a6bc59a2df"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"d898de0b-0318-44b1-8c53-74e6acfa1532","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"content\": \"This is an awesome video!\"}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/comments/:videoId","host":["{{base_url}}"],"path":["comments",":videoId"],"variable":[{"key":"videoId"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\"statusCode\": 201, \"data\": {\"_id\": \"9d74213b49h292d9ef82d5g2\", \"content\": \"This is an awesome video!\", \"video\": \"6a41081816e969a6bc59a2df\", \"owner\": \"6a41081816e969a6bc59a2df\", \"createdAt\": \"2024-06-15T09:45:00.000Z\", \"updatedAt\": \"2024-06-15T09:45:00.000Z\"}, \"message\": \"Comment added successfully\", \"success\": true}"}],"_postman_id":"e1c20621-3a49-4123-8a21-b6f97166d419"}],"id":"65d10b59-7eb5-4de7-9a6f-d01b844f610f","description":"<p>This folder contains endpoints for user engagement and social interactions on the platform. It enables users to subscribe to channels, toggle likes on videos, and post comments on video content. These features drive community participation and content discovery across the platform.</p>\n","_postman_id":"65d10b59-7eb5-4de7-9a6f-d01b844f610f"},{"name":"Dashboard & Community","item":[{"name":"Create a Tweet","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200 or 201', function () {","    pm.expect(pm.response.code).to.be.oneOf([","        200,","        201","    ]);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.be.an('object');","})","","pm.test('data contains _id and content', function () {","    var data = pm.response.json().data;","    pm.expect(data).to.have.property('_id');","    pm.expect(data).to.have.property('content');","})","","pm.test('content is a non-empty string', function () {","    var data = pm.response.json().data;","    pm.expect(data.content).to.be.a('string').and.to.have.length.above(0);","})"]}}],"id":"d54a55e3-9ed0-4d53-ae67-c3c6669ad9df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer "},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"content\": \"Hello world, this is my first community post!\"}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/tweets","description":"<h2 id=\"create-a-tweet\">Create a Tweet</h2>\n<p>Publishes a short-form community post (tweet) to the authenticated creator's channel feed. Tweets are visible to the creator's subscribers and followers as community updates.</p>\n<p><strong>Body Fields (JSON):</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>content</code></td>\n<td><code>string</code></td>\n<td>The text content of the community post (tweet)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>Use this endpoint to share announcements, updates, or short messages with your channel's audience without uploading a full video.</p>\n</blockquote>\n","urlObject":{"path":["tweets"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"0ccdb63d-a0b0-4292-b9d7-a61171d29ecb","name":"201 Created","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"content\": \"Hello world, this is my first community post!\"}","options":{"raw":{"language":"json"}}},"url":"https://{{base_url}}/tweets"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\"statusCode\": 201, \"data\": {\"_id\": \"ae85324c50i303eaf093e6h3\", \"content\": \"Hello world, this is my first community post!\", \"owner\": \"6a41081816e969a6bc59a2df\", \"createdAt\": \"2024-06-20T14:00:00.000Z\", \"updatedAt\": \"2024-06-20T14:00:00.000Z\"}, \"message\": \"Tweet created successfully\", \"success\": true}"}],"_postman_id":"d54a55e3-9ed0-4d53-ae67-c3c6669ad9df"},{"name":"Get Channel Stats","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test('Status code is 200', function () {","    pm.response.to.have.status(200);","})","","pm.test('Response is JSON', function () {","    pm.response.to.be.json;","})","","pm.test('Response has a data object', function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.be.an('object');","})","","pm.test('data contains numeric stats fields', function () {","    var data = pm.response.json().data;","    var statFields = [","        'totalVideos',","        'totalViews',","        'totalSubscribers',","        'totalLikes'","    ];","    var foundNumericField = statFields.some(function (field) {","        return data.hasOwnProperty(field) && typeof data[field] === 'number';","    });","    if (!foundNumericField) {","        var anyNumeric = Object.values(data).some(function (val) {","            return typeof val === 'number';","        });","        pm.expect(anyNumeric).to.be.true;","    } else {","        pm.expect(foundNumericField).to.be.true;","    }","})","","pm.test('Response time is less than 2000ms', function () {","    pm.expect(pm.response.responseTime).to.be.below(2000);","})"]}}],"id":"ce3c199b-d647-4fa5-80e5-05be5c6a948c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer "}],"url":"{{base_url}}/dashboard/stats","description":"<h2 id=\"get-channel-stats\">Get Channel Stats</h2>\n<p>Returns aggregated performance statistics for the authenticated creator's channel. This includes metrics such as total video views, subscriber count, total likes, and the number of published videos.</p>\n<p><strong>Authentication:</strong> 🔒 Required — include a valid <code>Bearer</code> token in the <code>Authorization</code> header.</p>\n<blockquote>\n<p>No query parameters or request body are needed. The stats returned are scoped to the channel owned by the currently authenticated user. Use this endpoint to power a creator dashboard or analytics view.</p>\n</blockquote>\n","urlObject":{"path":["dashboard","stats"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"68abe352-9686-4454-806a-d9c40fd04b69","name":"200 OK","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://{{base_url}}/dashboard/stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\"statusCode\": 200, \"data\": {\"totalVideos\": 12, \"totalViews\": 48320, \"totalSubscribers\": 1045, \"totalLikes\": 3870}, \"message\": \"Channel stats fetched successfully\", \"success\": true}"}],"_postman_id":"ce3c199b-d647-4fa5-80e5-05be5c6a948c"}],"id":"ecb3467c-974d-400f-b3c8-7316bde6a127","description":"<p>This folder contains endpoints for channel management and community content creation. It allows creators to post short-form tweets to their community feed and retrieve aggregated channel statistics via the dashboard. These endpoints are primarily intended for content creators looking to monitor performance and engage with their audience.</p>\n","_postman_id":"ecb3467c-974d-400f-b3c8-7316bde6a127"}],"variable":[{"key":"supabase_service_role_api_key_0gmc","secret":true},{"key":"supabase_service_role_api_key_090d","secret":true},{"key":"token","value":""}]}