{"info":{"_postman_id":"0f742609-d6f7-4545-8722-b160feeaf7e4","name":"Social Media App","description":"<html><head></head><body><p>Social Media App API Documentation</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"49715513","collectionId":"0f742609-d6f7-4545-8722-b160feeaf7e4","publishedId":"2sBY4PPgB9","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-07-20T18:51:38.000Z"},"item":[{"name":"Auth","item":[{"name":"Signup","id":"2d6dc903-79e5-4c4a-b247-fa3b5fa80383","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"password123\",\n  \"rePassword\": \"password123\",\n  \"age\": 23,\n  \"phone\": \"01278396490\",\n  \"address\": \"Alexandria\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/auth/signup</code></p>\n<p>Register a new user account.</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>userName</td>\n<td>string</td>\n<td>Yes</td>\n<td>3-50 chars. Internally split into firstName + lastName via virtual</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>Valid email. Must be unique</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>Yes</td>\n<td>Min 8 characters</td>\n</tr>\n<tr>\n<td>rePassword</td>\n<td>string</td>\n<td>Yes</td>\n<td>Must match password</td>\n</tr>\n<tr>\n<td>age</td>\n<td>number</td>\n<td>Yes</td>\n<td>18-100</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>No</td>\n<td>Stored encrypted (AES-256)</td>\n</tr>\n<tr>\n<td>address</td>\n<td>string</td>\n<td>No</td>\n<td></td>\n</tr>\n<tr>\n<td>gender</td>\n<td>string</td>\n<td>No</td>\n<td>\"male\" or \"female\". Default: \"male\"</td>\n</tr>\n</tbody>\n</table>\n</div><p>On success: sends OTP confirmation email. OTP expires in 2 minutes. Max 3 OTP attempts within 5 minutes.</p>\n","urlObject":{"path":["auth","signup"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"b2b80b39-6253-41c6-87d0-db6f39e4198d","name":"Signup - Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"password123\",\n  \"rePassword\": \"password123\",\n  \"age\": 23,\n  \"phone\": \"01278396490\",\n  \"address\": \"Alexandria\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Signup Success\",\n  \"data\": {\n    \"_id\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"firstName\": \"Diaa\",\n    \"lastName\": \"Eldeen\",\n    \"userName\": \"Diaa Eldeen\",\n    \"email\": \"diaaelseady@gmail.com\",\n    \"age\": 23,\n    \"phone\": \"encrypted_string\",\n    \"address\": \"Alexandria\",\n    \"gender\": \"male\",\n    \"role\": \"user\",\n    \"provider\": \"local\",\n    \"confirmed\": false,\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\",\n    \"updatedAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"},{"id":"3c768c7e-8d13-465f-b276-ebba1de51e83","name":"Signup - Email Already Exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"userName\": \"Diaa Eldeen\",\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"password123\",\n  \"rePassword\": \"password123\",\n  \"age\": 23\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Email Already Exist\",\n  \"status\": 409\n}"},{"id":"5d6b3180-0471-4714-a906-b43e0208fc5c","name":"Signup - Validation Error","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"not-an-email\",\n  \"password\": \"123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": {\n    \"message\": \"Validation Error\",\n    \"errors\": [\n      { \"field\": \"email\", \"message\": \"Invalid email format\" },\n      { \"field\": \"password\", \"message\": \"Password must be at least 8 characters\" }\n    ]\n  },\n  \"status\": 400\n}"}],"_postman_id":"2d6dc903-79e5-4c4a-b247-fa3b5fa80383"},{"name":"Signup With Gmail","id":"de2fd200-935b-484f-b90d-143a9aa56f68","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"idToken\": \"google_id_token_here\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/gmail","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/auth/signup/gmail</code></p>\n<p>Register or login using a Google account.</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>idToken</td>\n<td>string</td>\n<td>Yes</td>\n<td>Google ID token obtained from Google Sign-In on the client</td>\n</tr>\n</tbody>\n</table>\n</div><p>If the email already exists with provider \"local\", the request will be rejected.\nIf the user does not exist, a new account is created with provider \"google\" and confirmed = true.\nReturns a JWT token (1h expiry).</p>\n","urlObject":{"path":["auth","signup","gmail"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"88c2a5d6-ed34-4c66-9983-8b27160aa73a","name":"Signup With Gmail - Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"idToken\": \"google_id_token_here\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/gmail"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"LogIn Succefully\",\n  \"data\": {\n    \"token\": \"{{supabase_service_role_api_key_0hsq}}...\"\n  }\n}"},{"id":"230d8155-f4e2-4beb-85db-ebee8421e4a0","name":"Signup With Gmail - Local Account Exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"idToken\": \"google_id_token_here\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/gmail"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Please Log In In System Only\",\n  \"status\": 400\n}"}],"_postman_id":"de2fd200-935b-484f-b90d-143a9aa56f68"},{"name":"Confirm Email","id":"8fdc6713-3bdf-4e25-9648-ed0a46b1a77d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/confirm-email","description":"<p><strong>Full URL:</strong> <code>PATCH https://social-app-backend-coral.vercel.app/auth/signup/confirm-email</code></p>\n<p>Confirm the user's email after signup using the OTP sent to their email.</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>The email used during signup</td>\n</tr>\n<tr>\n<td>otp</td>\n<td>string</td>\n<td>Yes</td>\n<td>Exactly 6 characters. Received via email. Expires in 2 minutes</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["auth","signup","confirm-email"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"be05e3df-97b8-4873-b584-e5ff1a8d9ee8","name":"Confirm Email - Success","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/confirm-email"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Email confirmed Succefully!\",\n  \"data\": {}\n}"},{"id":"d0add0ca-2567-4afd-b7ad-5dd0e2fce5bb","name":"Confirm Email - OTP Expired","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/confirm-email"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Otp Expired\",\n  \"status\": 500\n}"},{"id":"1f12ecc8-f4ca-4e9e-9462-25a0e2f4cd80","name":"Confirm Email - Invalid OTP","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/confirm-email"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Invalid Otp\",\n  \"status\": 500\n}"}],"_postman_id":"8fdc6713-3bdf-4e25-9648-ed0a46b1a77d"},{"name":"Resend OTP","id":"a664d3e0-566c-48b6-a6dc-fdd7967362ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/resend_otp","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/auth/signup/resend_otp</code></p>\n<p>Resend the email confirmation OTP.</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>The email used during signup</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>OTP Rate Limiting:</strong></p>\n<ul>\n<li>OTP expires in 2 minutes. Cannot resend before it expires.</li>\n<li>Max 3 attempts within 5 minutes.</li>\n<li>After 3 failed attempts, the email is blocked for 5 minutes.</li>\n</ul>\n","urlObject":{"path":["auth","signup","resend_otp"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"8f34ef97-f654-47a0-b23d-111831bffdfc","name":"Resend OTP - Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/resend_otp"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Otp Resend Succefully!\",\n  \"data\": {}\n}"},{"id":"b3cb353f-f314-4a6b-99ab-3f4624442434","name":"Resend OTP - Still Active","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/resend_otp"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"You Can Resend Otp After 90 Second\",\n  \"status\": 500\n}"},{"id":"b777c9fb-b1b1-4c9f-ae49-2424b93a688d","name":"Resend OTP - Blocked","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signup/resend_otp"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"You Have Exceeded The Max Number Of Tries\",\n  \"status\": 500\n}"}],"_postman_id":"a664d3e0-566c-48b6-a6dc-fdd7967362ad"},{"name":"Signin","event":[{"listen":"test","script":{"exec":["const res = pm.response.json();","if (res.data && res.data.token) {","  pm.collectionVariables.set('token', res.data.token);","}","if (res.data && res.data.refreshToken) {","  pm.collectionVariables.set('refreshToken', res.data.refreshToken);","}"],"type":"text/javascript","id":"14581303-869f-409c-9428-c0b18a073d13"}}],"id":"be3b1365-0492-4d96-a097-aa348ee6ec5b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"password123\",\n  \"fcm\": \"firebase_device_token_here\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signin","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/auth/signin</code></p>\n<p>Login with email and password.</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>Valid email</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>Yes</td>\n<td>Min 8 characters</td>\n</tr>\n<tr>\n<td>fcm</td>\n<td>string</td>\n<td>No</td>\n<td>Firebase device token. If provided, sends a login push notification to the device</td>\n</tr>\n</tbody>\n</table>\n</div><p>User must be confirmed (email verified) and provider must be \"local\".\nReturns <code>token</code> (1h expiry) and <code>refreshToken</code> (1 year expiry).</p>\n<blockquote>\n<p>The test script auto-saves <code>token</code> and <code>refreshToken</code> into collection variables.</p>\n</blockquote>\n","urlObject":{"path":["auth","signin"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"3ebf817c-2453-49c6-ba76-a12b5c5a646f","name":"Signin - Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"password123\",\n  \"fcm\": \"firebase_device_token_here\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signin"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"LogIn Succefully\",\n  \"data\": {\n    \"token\": \"{{supabase_service_role_api_key_0hsq}}...\",\n    \"refreshToken\": \"{{supabase_service_role_api_key_0hsq}}...\"\n  }\n}"},{"id":"31c4f547-a5b6-432b-8183-ce45a5537b84","name":"Signin - User Not Found or Not Confirmed","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"notfound@example.com\",\n  \"password\": \"password123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signin"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"User Not Exist Or Not Confirmed Yet !\",\n  \"status\": 409\n}"},{"id":"d079e912-f87e-4b81-bc61-fef39617ff3d","name":"Signin - Invalid Password","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"password\": \"wrongpassword\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/signin"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Invalid Password\",\n  \"status\": 400\n}"}],"_postman_id":"be3b1365-0492-4d96-a097-aa348ee6ec5b"},{"name":"Refresh Token","event":[{"listen":"test","script":{"exec":["const res = pm.response.json();","if (res.data) {","  pm.collectionVariables.set('token', res.data);","}"],"type":"text/javascript","id":"ea9c92e1-bad4-4707-aecd-f532d64c9613"}}],"id":"0ad052e9-e5d3-4f1c-842f-01136d391da8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"refreshtoken","value":"","description":"<p>The refresh token received from signin</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/auth/refreshToken","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/auth/refreshToken</code></p>\n<p>Get a new access token using the refresh token.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>refreshtoken</td>\n<td>string</td>\n<td>Yes</td>\n<td>The refresh token from signin (all lowercase key)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Returns a new <code>token</code> with 1h expiry.</p>\n<blockquote>\n<p>The test script auto-saves the new <code>token</code> into collection variables.</p>\n</blockquote>\n","urlObject":{"path":["auth","refreshToken"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"e7edba6b-e45d-41ea-abbd-4b108753f8d6","name":"Refresh Token - Success","originalRequest":{"method":"GET","header":[{"key":"refreshtoken","value":""}],"url":"https://social-app-backend-coral.vercel.app/auth/refreshToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": \"{{supabase_service_role_api_key_0hsq}}...\"\n}"},{"id":"049ab575-6d2b-4efb-a8bd-2edeecfd80e7","name":"Refresh Token - Token Not Provided","originalRequest":{"method":"GET","header":[],"url":"https://social-app-backend-coral.vercel.app/auth/refreshToken"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Token Not Provided\",\n  \"status\": 401\n}"}],"_postman_id":"0ad052e9-e5d3-4f1c-842f-01136d391da8"},{"name":"Forget Password","id":"fa730a09-f07a-4873-b577-285318d4cae0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/forgetPassword","description":"<p><strong>Full URL:</strong> <code>PATCH https://social-app-backend-coral.vercel.app/auth/forgetPassword</code></p>\n<p>Send an OTP to the user's email to start the password reset flow.</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>Must belong to a confirmed local account</td>\n</tr>\n</tbody>\n</table>\n</div><p>OTP expires in 2 minutes. Subject to the same rate limiting as Resend OTP (max 3 attempts, blocked for 5 minutes after exceeding).</p>\n<p><strong>Full Reset Flow:</strong> Forget Password -&gt; Confirm Password (verify OTP) -&gt; Reset Password</p>\n","urlObject":{"path":["auth","forgetPassword"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"8282b5e3-8cd4-48aa-8fb5-a273a619a645","name":"Forget Password - Success","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/forgetPassword"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Otp Send Succefully\",\n  \"data\": {}\n}"},{"id":"de4b8e60-6eab-4128-9725-2d89bcc60274","name":"Forget Password - User Not Found","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"notfound@example.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/forgetPassword"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"User Not Exist\",\n  \"status\": 500\n}"}],"_postman_id":"fa730a09-f07a-4873-b577-285318d4cae0"},{"name":"Confirm Password (Verify OTP)","id":"0ee23fde-805d-40dd-b289-9570db427362","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/confirmPassword","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/auth/confirmPassword</code></p>\n<p>Verify the OTP received after calling Forget Password. Must be called before Reset Password.</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>The email used in Forget Password</td>\n</tr>\n<tr>\n<td>otp</td>\n<td>string</td>\n<td>Yes</td>\n<td>Exactly 6 characters. Received via email</td>\n</tr>\n</tbody>\n</table>\n</div><p>On success: stores a <code>verified_otp</code> flag in Redis for 5 minutes, required by Reset Password.</p>\n","urlObject":{"path":["auth","confirmPassword"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"9cb7ae07-1640-49d0-b08d-98497bf7961e","name":"Confirm Password - Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/confirmPassword"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Otp Is Valid\",\n  \"data\": {}\n}"},{"id":"99ddd8de-29cb-4728-8094-8f31f17332f6","name":"Confirm Password - Invalid or Expired OTP","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"otp\": \"000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/confirmPassword"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Invalid or Expired OTP\",\n  \"status\": 500\n}"}],"_postman_id":"0ee23fde-805d-40dd-b289-9570db427362"},{"name":"Reset Password","id":"56126685-5817-4f7c-aa99-ab69a2e5fbf1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"newpassword123\",\n  \"rePassword\": \"newpassword123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/resetPassword","description":"<p><strong>Full URL:</strong> <code>PATCH https://social-app-backend-coral.vercel.app/auth/resetPassword</code></p>\n<p>Reset the user's password. Must be called after Confirm Password (OTP verified).</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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Yes</td>\n<td>The email used throughout the reset flow</td>\n</tr>\n<tr>\n<td>newPassword</td>\n<td>string</td>\n<td>Yes</td>\n<td>Min 8 characters</td>\n</tr>\n<tr>\n<td>rePassword</td>\n<td>string</td>\n<td>Yes</td>\n<td>Must match newPassword</td>\n</tr>\n</tbody>\n</table>\n</div><p>Requires <code>verified_otp</code> to be set in Redis (expires 5 minutes after Confirm Password).\nOn success: updates the password and sets <code>logOut</code> timestamp to invalidate old sessions.</p>\n","urlObject":{"path":["auth","resetPassword"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"71bb8762-de3e-4c48-a637-208c14e38828","name":"Reset Password - Success","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"newpassword123\",\n  \"rePassword\": \"newpassword123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/resetPassword"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Password Reset Succefully\",\n  \"data\": {}\n}"},{"id":"c76111f8-fec9-4a25-bcce-826b3f023a04","name":"Reset Password - OTP Not Verified","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"newpassword123\",\n  \"rePassword\": \"newpassword123\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/resetPassword"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Otp not verified\",\n  \"status\": 500\n}"},{"id":"f8201321-75dc-4d0b-a89c-e69a4854a00e","name":"Reset Password - Passwords Don't Match","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"diaaelseady@gmail.com\",\n  \"newPassword\": \"newpassword123\",\n  \"rePassword\": \"differentpassword\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/resetPassword"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": {\n    \"message\": \"Validation Error\",\n    \"errors\": [\n      { \"field\": \"rePassword\", \"message\": \"Passwords don't match\" }\n    ]\n  },\n  \"status\": 400\n}"}],"_postman_id":"56126685-5817-4f7c-aa99-ab69a2e5fbf1"}],"id":"3e6513f7-3a72-4acf-88ce-55b63d5ac7df","_postman_id":"3e6513f7-3a72-4acf-88ce-55b63d5ac7df","description":""},{"name":"User","item":[{"name":"Get Profile","id":"f18248fe-ceaa-4fca-9802-86fba8b19ccc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token from signin</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/user/profile","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/user/profile</code></p>\n<p>Get the currently authenticated user's profile.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token from signin</td>\n</tr>\n</tbody>\n</table>\n</div><p>Phone number is automatically decrypted before returning.</p>\n","urlObject":{"path":["user","profile"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"0fefdd49-e079-405f-a5e8-5d56217927f9","name":"Get Profile - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://social-app-backend-coral.vercel.app/user/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"_id\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"firstName\": \"Diaa\",\n    \"lastName\": \"Eldeen\",\n    \"userName\": \"Diaa Eldeen\",\n    \"email\": \"diaaelseady@gmail.com\",\n    \"age\": 23,\n    \"phone\": \"01278396490\",\n    \"address\": \"Alexandria\",\n    \"gender\": \"male\",\n    \"role\": \"user\",\n    \"provider\": \"local\",\n    \"confirmed\": true,\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\",\n    \"updatedAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"},{"id":"914db42f-fa18-4eef-accd-06fcdec805e7","name":"Get Profile - Unauthorized","originalRequest":{"method":"GET","header":[],"url":"https://social-app-backend-coral.vercel.app/user/profile"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Token Not Provided\",\n  \"status\": 401\n}"}],"_postman_id":"f18248fe-ceaa-4fca-9802-86fba8b19ccc"},{"name":"Update Profile","id":"38d340da-729e-4d17-9fd3-c999eddd50c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT access token from signin</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Diaa\",\n  \"lastName\": \"Eldeen\",\n  \"age\": 23,\n  \"phone\": \"01278396490\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/user/updateProfile","description":"<p><strong>Full URL:</strong> <code>PATCH https://social-app-backend-coral.vercel.app/user/updateProfile</code></p>\n<p>Update the authenticated user's profile information.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>firstName</td>\n<td>string</td>\n<td>Yes</td>\n<td>3-30 chars. Letters, numbers, spaces, - and _ only</td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>string</td>\n<td>Yes</td>\n<td>3-30 chars. Letters, numbers, spaces, - and _ only</td>\n</tr>\n<tr>\n<td>age</td>\n<td>number</td>\n<td>Yes</td>\n<td>Integer, min 18</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>No</td>\n<td>Egyptian number: 010/011/012/015 + 8 digits. Stored encrypted</td>\n</tr>\n<tr>\n<td>gender</td>\n<td>string</td>\n<td>No</td>\n<td>\"male\" or \"female\"</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user","updateProfile"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"bb064401-ae1e-42d0-ad9c-083454f5551b","name":"Update Profile - Success","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"Diaa\",\n  \"lastName\": \"Eldeen\",\n  \"age\": 23,\n  \"phone\": \"01278396490\",\n  \"gender\": \"male\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/user/updateProfile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"_id\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"firstName\": \"Diaa\",\n    \"lastName\": \"Eldeen\",\n    \"userName\": \"Diaa Eldeen\",\n    \"email\": \"diaaelseady@gmail.com\",\n    \"age\": 23,\n    \"phone\": \"encrypted_string\",\n    \"gender\": \"male\",\n    \"role\": \"user\",\n    \"provider\": \"local\",\n    \"confirmed\": true,\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\",\n    \"updatedAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"},{"id":"72fbdbd6-5c1f-4937-8854-09f77da1b642","name":"Update Profile - Validation Error","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"firstName\": \"J\",\n  \"lastName\": \"D\",\n  \"age\": 15\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/user/updateProfile"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": {\n    \"message\": \"Validation Error\",\n    \"errors\": [\n      { \"field\": \"firstName\", \"message\": \"firstName must be at least 3 characters\" },\n      { \"field\": \"age\", \"message\": \"You must be at least 18 years old\" }\n    ]\n  },\n  \"status\": 400\n}"}],"_postman_id":"38d340da-729e-4d17-9fd3-c999eddd50c5"},{"name":"Update Password","id":"7006f13c-e659-415b-b702-e470bf8f57af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT access token from signin</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"password123\",\n  \"newPassword\": \"newpassword456\",\n  \"confirmPassword\": \"newpassword456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/user/updatePassword","description":"<p><strong>Full URL:</strong> <code>PATCH https://social-app-backend-coral.vercel.app/user/updatePassword</code></p>\n<p>Change the authenticated user's password.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>oldPassword</td>\n<td>string</td>\n<td>Yes</td>\n<td>Current password for verification</td>\n</tr>\n<tr>\n<td>newPassword</td>\n<td>string</td>\n<td>Yes</td>\n<td>Min 8 characters</td>\n</tr>\n<tr>\n<td>confirmPassword</td>\n<td>string</td>\n<td>Yes</td>\n<td>Must match newPassword</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user","updatePassword"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"b3387f80-cc2e-4d54-9fb6-823614056531","name":"Update Password - Success","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"password123\",\n  \"newPassword\": \"newpassword456\",\n  \"confirmPassword\": \"newpassword456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/user/updatePassword"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {}\n}"},{"id":"5810f7cb-63c0-4890-8d57-79c455746243","name":"Update Password - Invalid Old Password","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"wrongpassword\",\n  \"newPassword\": \"newpassword456\",\n  \"confirmPassword\": \"newpassword456\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/user/updatePassword"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Invalid old Password\",\n  \"status\": 500\n}"},{"id":"64f06676-f96c-4e75-bdd8-c9a074315a8d","name":"Update Password - Passwords Don't Match","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"oldPassword\": \"password123\",\n  \"newPassword\": \"newpassword456\",\n  \"confirmPassword\": \"differentpassword\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/user/updatePassword"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": {\n    \"message\": \"Validation Error\",\n    \"errors\": [\n      { \"field\": \"confirmPassword\", \"message\": \"Passwords do not match\" }\n    ]\n  },\n  \"status\": 400\n}"}],"_postman_id":"7006f13c-e659-415b-b702-e470bf8f57af"}],"id":"30478d23-b187-4d01-8e69-f3d63eca0286","_postman_id":"30478d23-b187-4d01-8e69-f3d63eca0286","description":""},{"name":"S3","item":[{"name":"Upload Profile Picture (Pre-Signed URL)","id":"4368edba-cf36-4ecd-85ed-5babe0d4d767","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"fileName\": \"profile.png\",\n  \"ContentType\": \"image/png\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/uploadProfilePic","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/auth/uploadProfilePic</code></p>\n<p>Generate a pre-signed URL to upload a profile picture directly to S3.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>fileName</td>\n<td>string</td>\n<td>Yes</td>\n<td>The name of the file to upload (e.g. profile.png)</td>\n</tr>\n<tr>\n<td>ContentType</td>\n<td>string</td>\n<td>Yes</td>\n<td>MIME type of the file (e.g. image/png, image/jpeg, image/webp, image/jpg)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Returns a pre-signed <code>url</code> (valid 60 seconds) to PUT the file directly to S3, and the <code>Key</code> which is saved to the user's profilePic field in DB.</p>\n<p><strong>Supported types:</strong> image/png, image/jpeg, image/webp, image/jpg</p>\n","urlObject":{"path":["auth","uploadProfilePic"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"b99ddf6b-4495-4f21-bb87-0a7df4a7c57e","name":"Upload Profile Picture - Success","originalRequest":{"method":"POST","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"fileName\": \"profile.png\",\n  \"ContentType\": \"image/png\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/uploadProfilePic"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"url\": \"https://s3.amazonaws.com/bucket/socialMedia_app/users/664f.../presigned-url...\",\n    \"Key\": \"social_media/users/664f1a2b3c4d5e6f7a8b9c0d/randomUUID_____profile.png\"\n  }\n}"},{"id":"9b7951e5-b49b-46be-ab62-fcde55987e0f","name":"Upload Profile Picture - Unauthorized","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"fileName\": \"profile.png\",\n  \"ContentType\": \"image/png\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/uploadProfilePic"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Token Not Provided\",\n  \"status\": 401\n}"}],"_postman_id":"4368edba-cf36-4ecd-85ed-5babe0d4d767"},{"name":"Get Picture (Stream)","id":"3e72bb3d-66a0-4281-9290-05b146e0cf93","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/auth/getPictures/social_media/users/664f1a2b/uuid_____profile.png","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/auth/getPictures/*path</code></p>\n<p>Stream a file directly from S3 by its Key (path).</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>path</td>\n<td>wildcard</td>\n<td>Yes</td>\n<td>The full S3 Key after the base URL (e.g. social_media/users/userId/uuid_____file.png)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Returns the file as a binary stream with correct Content-Type header.</p>\n","urlObject":{"path":["auth","getPictures","social_media","users","664f1a2b","uuid_____profile.png"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"9b19355f-71fb-4716-9d37-0694f5201431","name":"Get Picture - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://social-app-backend-coral.vercel.app/auth/getPictures/social_media/users/664f1a2b/uuid_____profile.png"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"image/png"}],"cookie":[],"responseTime":null,"body":"(binary image stream)"}],"_postman_id":"3e72bb3d-66a0-4281-9290-05b146e0cf93"},{"name":"Get Pre-Signed Picture URL","id":"14d423fd-8609-4fb5-9da2-6f4569d55dfd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/auth/getPreSignedPictures/social_media/users/664f1a2b/uuid_____profile.png","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/auth/getPreSignedPictures/*path</code></p>\n<p>Get a temporary pre-signed URL to access a private S3 file.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>path</td>\n<td>wildcard</td>\n<td>Yes</td>\n<td>The full S3 Key after the base URL</td>\n</tr>\n</tbody>\n</table>\n</div><p>Returns a pre-signed URL valid for 60 seconds.</p>\n","urlObject":{"path":["auth","getPreSignedPictures","social_media","users","664f1a2b","uuid_____profile.png"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"97769543-9ed9-4c84-a541-c7e6c39b5a5f","name":"Get Pre-Signed Picture URL - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://social-app-backend-coral.vercel.app/auth/getPreSignedPictures/social_media/users/664f1a2b/uuid_____profile.png"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": \"https://s3.amazonaws.com/bucket/social_media/users/664f.../uuid_____profile.png?X-Amz-Signature=...\"\n}"}],"_postman_id":"14d423fd-8609-4fb5-9da2-6f4569d55dfd"},{"name":"Get All Files In Folder","id":"fde998ee-35c7-4fcc-91fb-1537a841e462","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/auth/pictures?folderName=users/664f1a2b3c4d5e6f7a8b9c0d","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/auth/pictures?folderName={folderName}</code></p>\n<p>List all files inside a specific S3 folder.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Query Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>folderName</td>\n<td>string</td>\n<td>Yes</td>\n<td>Folder path inside the bucket under socialMedia_app/ (e.g. users/userId)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Returns an array of objects each containing the file <code>Key</code>.</p>\n","urlObject":{"path":["auth","pictures"],"host":["https://social-app-backend-coral.vercel.app"],"query":[{"description":{"content":"<p>The folder path inside the S3 bucket (under socialMedia_app/)</p>\n","type":"text/plain"},"key":"folderName","value":"users/664f1a2b3c4d5e6f7a8b9c0d"}],"variable":[]}},"response":[{"id":"8b7c806c-7981-4032-867f-94686b208b53","name":"Get All Files In Folder - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/auth/pictures?folderName=users/664f1a2b3c4d5e6f7a8b9c0d","host":["https://social-app-backend-coral.vercel.app"],"path":["auth","pictures"],"query":[{"key":"folderName","value":"users/664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": [\n    { \"Key\": \"socialMedia_app/users/664f1a2b/uuid1_____profile.png\" },\n    { \"Key\": \"socialMedia_app/users/664f1a2b/uuid2_____cover.jpg\" }\n  ]\n}"}],"_postman_id":"fde998ee-35c7-4fcc-91fb-1537a841e462"},{"name":"Delete Single File","id":"ffa2a3cc-e01f-4d88-a907-0bf65ea3cd9d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/auth/picture?Key=socialMedia_app/users/664f1a2b/uuid_____profile.png","description":"<p><strong>Full URL:</strong> <code>DELETE https://social-app-backend-coral.vercel.app/auth/picture?Key={Key}</code></p>\n<p>Delete a single file from S3 by its Key.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Query Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Key</td>\n<td>string</td>\n<td>Yes</td>\n<td>The full S3 Key of the file to delete</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["auth","picture"],"host":["https://social-app-backend-coral.vercel.app"],"query":[{"description":{"content":"<p>The full S3 Key of the file to delete</p>\n","type":"text/plain"},"key":"Key","value":"socialMedia_app/users/664f1a2b/uuid_____profile.png"}],"variable":[]}},"response":[{"id":"963c35ba-3b5c-409a-a5ac-165e6c66481f","name":"Delete Single File - Success","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/auth/picture?Key=socialMedia_app/users/664f1a2b/uuid_____profile.png","host":["https://social-app-backend-coral.vercel.app"],"path":["auth","picture"],"query":[{"key":"Key","value":"socialMedia_app/users/664f1a2b/uuid_____profile.png"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"DeleteMarker\": true,\n    \"VersionId\": \"abc123\"\n  }\n}"}],"_postman_id":"ffa2a3cc-e01f-4d88-a907-0bf65ea3cd9d"},{"name":"Delete Multiple Files","id":"813e8941-0fe3-4de3-90ca-4390a395216e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"Keys\": [\n    \"socialMedia_app/users/664f1a2b/uuid1_____profile.png\",\n    \"socialMedia_app/users/664f1a2b/uuid2_____cover.jpg\"\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/pictures","description":"<p><strong>Full URL:</strong> <code>DELETE https://social-app-backend-coral.vercel.app/auth/pictures</code></p>\n<p>Delete multiple files from S3 in a single request.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Keys</td>\n<td>string[]</td>\n<td>Yes</td>\n<td>Array of full S3 Keys to delete</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["auth","pictures"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"2fc13476-a79d-4d0a-937e-bc2759e59109","name":"Delete Multiple Files - Success","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"Keys\": [\n    \"socialMedia_app/users/664f1a2b/uuid1_____profile.png\",\n    \"socialMedia_app/users/664f1a2b/uuid2_____cover.jpg\"\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/auth/pictures"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"Deleted\": [\n      { \"Key\": \"socialMedia_app/users/664f1a2b/uuid1_____profile.png\" },\n      { \"Key\": \"socialMedia_app/users/664f1a2b/uuid2_____cover.jpg\" }\n    ]\n  }\n}"}],"_postman_id":"813e8941-0fe3-4de3-90ca-4390a395216e"},{"name":"Delete Entire Folder","id":"16586b99-e6c8-49bf-b644-f6761c9fc341","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/auth/folder?folderName=users/664f1a2b3c4d5e6f7a8b9c0d","description":"<p><strong>Full URL:</strong> <code>DELETE https://social-app-backend-coral.vercel.app/auth/folder?folderName={folderName}</code></p>\n<p>Delete an entire S3 folder and all its contents.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Query Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>folderName</td>\n<td>string</td>\n<td>Yes</td>\n<td>The folder path inside socialMedia_app/ to delete (e.g. users/userId)</td>\n</tr>\n</tbody>\n</table>\n</div><p>Internally: lists all files in the folder then deletes them all in one batch request.</p>\n","urlObject":{"path":["auth","folder"],"host":["https://social-app-backend-coral.vercel.app"],"query":[{"description":{"content":"<p>The folder path inside socialMedia_app/ to delete entirely</p>\n","type":"text/plain"},"key":"folderName","value":"users/664f1a2b3c4d5e6f7a8b9c0d"}],"variable":[]}},"response":[{"id":"41ef9bad-f2c9-4bb5-8239-c2326de8de29","name":"Delete Folder - Success","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/auth/folder?folderName=users/664f1a2b3c4d5e6f7a8b9c0d","host":["https://social-app-backend-coral.vercel.app"],"path":["auth","folder"],"query":[{"key":"folderName","value":"users/664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"Deleted\": [\n      { \"Key\": \"socialMedia_app/users/664f1a2b/uuid1_____profile.png\" },\n      { \"Key\": \"socialMedia_app/users/664f1a2b/uuid2_____cover.jpg\" }\n    ]\n  }\n}"}],"_postman_id":"16586b99-e6c8-49bf-b644-f6761c9fc341"}],"id":"088d0a32-5613-475e-83fd-fe7f09698eb7","_postman_id":"088d0a32-5613-475e-83fd-fe7f09698eb7","description":""},{"name":"Posts","item":[{"name":"Create Post","id":"77cf94c0-8cd7-45ef-babb-05d4e795eab9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Hello from Diaa Eldeen!","type":"text","description":"<p>Post text content (optional if attachments provided)</p>\n"},{"key":"postPrivacy","value":"public","type":"text","description":"<p>public | private | onlyMe</p>\n"},{"key":"allowComments","value":"allow","type":"text","description":"<p>allow | disAllow</p>\n"},{"key":"tags","value":"664f1a2b3c4d5e6f7a8b9c0d","type":"text","description":"<p>Array of user ObjectIds to tag (repeat key for multiple)</p>\n"},{"key":"attachment","type":"file","description":"<p>Image/video files (repeat key for multiple)</p>\n","value":null}]},"url":"https://social-app-backend-coral.vercel.app/posts","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/posts</code></p>\n<p>Create a new post with optional media attachments.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body (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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>content</td>\n<td>string</td>\n<td>Conditional</td>\n<td>Required if no attachments. Max 5000 chars</td>\n</tr>\n<tr>\n<td>postPrivacy</td>\n<td>string</td>\n<td>No</td>\n<td>\"public\", \"private\", or \"onlyMe\". Default: \"public\"</td>\n</tr>\n<tr>\n<td>allowComments</td>\n<td>string</td>\n<td>No</td>\n<td>\"allow\" or \"disAllow\". Default: \"allow\"</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>string[]</td>\n<td>No</td>\n<td>User ObjectIds to tag. Max 20. Must be unique</td>\n</tr>\n<tr>\n<td>attachment</td>\n<td>file[]</td>\n<td>Conditional</td>\n<td>Required if no content. Max 10 files. Images/videos uploaded to S3</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["posts"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"8676e641-2035-444e-a6eb-27c8aca1e4c6","name":"Create Post - Success","originalRequest":{"method":"POST","header":[{"key":"token","value":""}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Hello from Diaa Eldeen!","type":"text"}]},"url":"https://social-app-backend-coral.vercel.app/posts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Post Created Succefully\",\n  \"data\": {\n    \"_id\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"content\": \"Hello from Diaa Eldeen!\",\n    \"attachments\": [],\n    \"tags\": [],\n    \"createdBy\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"postPrivacy\": \"public\",\n    \"allowComments\": \"allow\",\n    \"folderId\": \"uuid-here\",\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\",\n    \"updatedAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"},{"id":"9ffeeb96-3c63-4378-ace2-1c1c4603ecee","name":"Create Post - No Content or Attachments","originalRequest":{"method":"POST","header":[{"key":"token","value":""}],"body":{"mode":"formdata","formdata":[]},"url":"https://social-app-backend-coral.vercel.app/posts"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": {\n    \"message\": \"Validation Error\",\n    \"errors\": [\n      { \"field\": \"content\", \"message\": \"Post must contain content or at least one attachment\" }\n    ]\n  },\n  \"status\": 400\n}"}],"_postman_id":"77cf94c0-8cd7-45ef-babb-05d4e795eab9"},{"name":"Get Posts (Paginated)","id":"71024d09-053b-4d46-9614-27a98c1cd25b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/posts?page=1&limit=10&search=","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/posts?page={page}&amp;limit={limit}&amp;search={search}</code></p>\n<p>Get paginated posts visible to the authenticated user based on privacy rules.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Query Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>number</td>\n<td>No</td>\n<td>Page number. Default: 1</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>number</td>\n<td>No</td>\n<td>Items per page. Default: 10</td>\n</tr>\n<tr>\n<td>search</td>\n<td>string</td>\n<td>No</td>\n<td>Search in post content (case-insensitive)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Privacy Rules:</strong> Returns public posts + private posts from friends/self + posts where the user is tagged.</p>\n","urlObject":{"path":["posts"],"host":["https://social-app-backend-coral.vercel.app"],"query":[{"description":{"content":"<p>Page number (default: 1)</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Items per page (default: 10)</p>\n","type":"text/plain"},"key":"limit","value":"10"},{"description":{"content":"<p>Search in post content (optional)</p>\n","type":"text/plain"},"key":"search","value":""}],"variable":[]}},"response":[{"id":"42180d90-a247-402e-929b-4ed11b4747f0","name":"Get Posts - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/posts?page=1&limit=10","host":["https://social-app-backend-coral.vercel.app"],"path":["posts"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"meta\": {\n      \"currentPage\": 1,\n      \"totalPages\": 5,\n      \"limit\": 10,\n      \"totalDocs\": 48\n    },\n    \"data\": [\n      {\n        \"_id\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n        \"content\": \"Hello from Diaa Eldeen!\",\n        \"attachments\": [],\n        \"tags\": [],\n        \"createdBy\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n        \"postPrivacy\": \"public\",\n        \"allowComments\": \"allow\",\n        \"comments\": [],\n        \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n      }\n    ]\n  }\n}"}],"_postman_id":"71024d09-053b-4d46-9614-27a98c1cd25b"},{"name":"React On Post","id":"c39fb944-0fe0-4cc3-ac7e-afc76462bffd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"reactType\": \"like\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/posts/:postId/react","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/posts/:postId/react</code></p>\n<p>Add, update, or remove a reaction on a post. Calling with the same reaction type removes it (toggle).</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>reactType</td>\n<td>string</td>\n<td>Yes</td>\n<td>One of: \"like\", \"love\", \"haha\", \"care\", \"sad\", \"angry\"</td>\n</tr>\n</tbody>\n</table>\n</div><p>Sends a push notification to the post owner if the reactor is a different user.</p>\n","urlObject":{"path":["posts",":postId","react"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"84ee2cb6-f072-402a-89b7-ed926a11fc07","description":{"content":"<p>MongoDB ObjectId of the post</p>\n","type":"text/plain"},"type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"}]}},"response":[{"id":"2eb27351-3cfc-4a2a-8806-f33db8dc4650","name":"React On Post - Added","originalRequest":{"method":"POST","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"reactType\": \"like\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/react","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","react"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Reaction added successfully\",\n  \"data\": {\n    \"_id\": \"react123\",\n    \"type\": \"like\",\n    \"userId\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"ref\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"onModel\": \"Post\"\n  }\n}"},{"id":"51a39836-12bb-44f6-86a7-7912a71c6bc9","name":"React On Post - Removed (same type toggled)","originalRequest":{"method":"POST","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"reactType\": \"like\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/react","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","react"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Reaction removed successfully\",\n  \"data\": null\n}"}],"_postman_id":"c39fb944-0fe0-4cc3-ac7e-afc76462bffd"},{"name":"Update Post","id":"b5e74720-fbb5-402d-b2d6-93c66e2480a5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Updated content by Diaa Eldeen","type":"text","description":"<p>New post content (optional)</p>\n"},{"key":"postPrivacy","value":"private","type":"text","description":"<p>public | private | onlyMe (optional)</p>\n"},{"key":"allowComments","value":"allow","type":"text","description":"<p>allow | disAllow (optional)</p>\n"},{"key":"tags","value":"664f1a2b3c4d5e6f7a8b9c0d","type":"text","description":"<p>New user ObjectIds to tag (optional)</p>\n"},{"key":"removeTags","value":"664f1a2b3c4d5e6f7a8b9c00","type":"text","description":"<p>User ObjectIds to untag (optional)</p>\n"},{"key":"removeFiles","value":"socialMedia_app/users/.../file.png","type":"text","description":"<p>S3 Keys of files to remove (optional)</p>\n"},{"key":"attachment","type":"file","description":"<p>New files to add (optional)</p>\n","value":null}]},"url":"https://social-app-backend-coral.vercel.app/posts/:postId","description":"<p><strong>Full URL:</strong> <code>PUT https://social-app-backend-coral.vercel.app/posts/:postId</code></p>\n<p>Update an existing post. Only the post owner can update.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body (form-data) — all fields optional:</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>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>content</td>\n<td>string</td>\n<td>New post text. Max 5000 chars</td>\n</tr>\n<tr>\n<td>postPrivacy</td>\n<td>string</td>\n<td>\"public\", \"private\", or \"onlyMe\"</td>\n</tr>\n<tr>\n<td>allowComments</td>\n<td>string</td>\n<td>\"allow\" or \"disAllow\"</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>string[]</td>\n<td>New user ObjectIds to tag</td>\n</tr>\n<tr>\n<td>removeTags</td>\n<td>string[]</td>\n<td>User ObjectIds to remove from tags</td>\n</tr>\n<tr>\n<td>removeFiles</td>\n<td>string[]</td>\n<td>S3 Keys of existing files to delete</td>\n</tr>\n<tr>\n<td>attachment</td>\n<td>file[]</td>\n<td>New files to upload</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["posts",":postId"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"1bb19126-2909-4edd-903a-f459b5b96e34","description":{"content":"<p>MongoDB ObjectId of the post</p>\n","type":"text/plain"},"type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"}]}},"response":[{"id":"f2b62c45-c0ce-4856-8e01-b5333494e241","name":"Update Post - Success","originalRequest":{"method":"PUT","header":[{"key":"token","value":""}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Updated content","type":"text"}]},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"_id\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"content\": \"Updated content by Diaa Eldeen\",\n    \"attachments\": [],\n    \"postPrivacy\": \"private\",\n    \"allowComments\": \"allow\",\n    \"updatedAt\": \"2026-01-02T00:00:00.000Z\"\n  }\n}"},{"id":"12b01434-55ff-4735-8845-05a54134f662","name":"Update Post - Not Found","originalRequest":{"method":"PUT","header":[{"key":"token","value":""}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Updated","type":"text"}]},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Post Not Found\",\n  \"status\": 500\n}"}],"_postman_id":"b5e74720-fbb5-402d-b2d6-93c66e2480a5"},{"name":"Delete Post","id":"fbb45539-7ad9-4ecd-9885-870716bad07c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/posts/:postId","description":"<p><strong>Full URL:</strong> <code>DELETE https://social-app-backend-coral.vercel.app/posts/:postId</code></p>\n<p>Delete a post and all its related data. Only the post owner can delete.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n</tbody>\n</table>\n</div><p>Deletes: post attachments from S3, all comments and replies, all reactions on the post and its comments.</p>\n","urlObject":{"path":["posts",":postId"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"0efde03b-dfe3-41c7-932f-8ab2a4084960","description":{"content":"<p>MongoDB ObjectId of the post</p>\n","type":"text/plain"},"type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"}]}},"response":[{"id":"27a8cfc2-8a9a-4da0-b475-0a82b0794a31","name":"Delete Post - Success","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Post and all its related comments, replies, reactions, and notifications cleared successfully\",\n  \"data\": {}\n}"},{"id":"65a91d62-8f9a-4e44-a9e5-420d2382e907","name":"Delete Post - Not Found or Unauthorized","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Post Not Found or Unauthorized\",\n  \"status\": 404\n}"}],"_postman_id":"fbb45539-7ad9-4ecd-9885-870716bad07c"}],"id":"0eadfe27-f1c6-46cf-9cf0-b6dca6dc9f68","_postman_id":"0eadfe27-f1c6-46cf-9cf0-b6dca6dc9f68","description":""},{"name":"Comments","item":[{"name":"Create Comment on Post","id":"c10f0000-01e4-4585-91b9-339d6790f176","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Great post!","type":"text","description":"<p>Comment text (optional if attachment provided)</p>\n"},{"key":"onModel","value":"Post","type":"text","description":"<p>Must be \"Post\" when commenting on a post</p>\n"},{"key":"tags","value":"664f1a2b3c4d5e6f7a8b9c0d","type":"text","description":"<p>User ObjectIds to tag (optional)</p>\n"},{"key":"attachment","type":"file","description":"<p>Image files (optional)</p>\n","value":null}]},"url":"https://social-app-backend-coral.vercel.app/posts/:postId/comments","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/posts/:postId/comments</code></p>\n<p>Create a comment on a post.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body (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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>content</td>\n<td>string</td>\n<td>Conditional</td>\n<td>Required if no attachments. Max 5000 chars</td>\n</tr>\n<tr>\n<td>onModel</td>\n<td>string</td>\n<td>Yes</td>\n<td>Must be \"Post\"</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>string[]</td>\n<td>No</td>\n<td>User ObjectIds to tag. Max 20</td>\n</tr>\n<tr>\n<td>attachment</td>\n<td>file[]</td>\n<td>Conditional</td>\n<td>Required if no content. Uploaded to S3</td>\n</tr>\n</tbody>\n</table>\n</div><p>Post must have allowComments set to \"allow\".</p>\n","urlObject":{"path":["posts",":postId","comments"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"0de64fc7-4379-440e-a532-0f2e6567e28e","description":{"content":"<p>MongoDB ObjectId of the post</p>\n","type":"text/plain"},"type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"}]}},"response":[{"id":"a88c92bc-13cf-463e-a3b4-b7ad49359669","name":"Create Comment - Success","originalRequest":{"method":"POST","header":[{"key":"token","value":""}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Great post!","type":"text"},{"key":"onModel","value":"Post","type":"text"}]},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/comments","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","comments"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Comment Created Succefully\",\n  \"data\": {\n    \"_id\": \"comment123\",\n    \"content\": \"Great post!\",\n    \"attachments\": [],\n    \"tags\": [],\n    \"createdBy\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"refId\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"onModel\": \"Post\",\n    \"folderId\": \"uuid-here\",\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"}],"_postman_id":"c10f0000-01e4-4585-91b9-339d6790f176"},{"name":"Create Reply on Comment","id":"cd738a4d-53b2-48c6-a41a-2417eb129a77","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"I agree!","type":"text","description":"<p>Reply text</p>\n"},{"key":"onModel","value":"Comment","type":"text","description":"<p>Must be \"Comment\" when replying to a comment</p>\n"},{"key":"tags","value":"","type":"text","description":"<p>User ObjectIds to tag (optional)</p>\n"},{"key":"attachment","type":"file","description":"<p>Image files (optional)</p>\n","value":null}]},"url":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId</code></p>\n<p>Create a reply on an existing comment.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n<tr>\n<td>commentId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the parent comment</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body (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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>content</td>\n<td>string</td>\n<td>Conditional</td>\n<td>Required if no attachments</td>\n</tr>\n<tr>\n<td>onModel</td>\n<td>string</td>\n<td>Yes</td>\n<td>Must be \"Comment\"</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>string[]</td>\n<td>No</td>\n<td>User ObjectIds to tag</td>\n</tr>\n<tr>\n<td>attachment</td>\n<td>file[]</td>\n<td>Conditional</td>\n<td>Required if no content</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["posts",":postId","comments",":commentId"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"7a43ce36-57c2-4013-b895-b148d2a1488d","description":{"content":"<p>MongoDB ObjectId of the post</p>\n","type":"text/plain"},"type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"},{"id":"d7b923e6-f211-4ae4-a34a-d50b5b6c7e17","description":{"content":"<p>MongoDB ObjectId of the parent comment</p>\n","type":"text/plain"},"type":"any","value":"comment123","key":"commentId"}]}},"response":[{"id":"88e4cd74-40e9-4883-9a0a-95a634113065","name":"Create Reply - Success","originalRequest":{"method":"POST","header":[{"key":"token","value":""}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"I agree!","type":"text"},{"key":"onModel","value":"Comment","type":"text"}]},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","comments",":commentId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"},{"key":"commentId","value":"comment123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Comment Created Succefully\",\n  \"data\": {\n    \"_id\": \"reply123\",\n    \"content\": \"I agree!\",\n    \"attachments\": [],\n    \"createdBy\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"refId\": \"comment123\",\n    \"onModel\": \"Comment\",\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"}],"_postman_id":"cd738a4d-53b2-48c6-a41a-2417eb129a77"},{"name":"Get Comments on Post","id":"cd42330f-eeae-42e1-b650-d5a414998220","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/posts/:postId/comments","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/posts/:postId/comments</code></p>\n<p>Get all top-level comments on a post with their replies populated.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n</tbody>\n</table>\n</div><p>Each comment includes a <code>replies</code> virtual field with nested replies.</p>\n","urlObject":{"path":["posts",":postId","comments"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"bd9d584d-499e-4953-b3a8-860189bcf73b","description":{"content":"<p>MongoDB ObjectId of the post</p>\n","type":"text/plain"},"type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"}]}},"response":[{"id":"543499de-2b6d-432a-ad7d-bb1168cc9b63","name":"Get Comments - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/comments","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","comments"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": [\n    {\n      \"_id\": \"comment123\",\n      \"content\": \"Great post!\",\n      \"createdBy\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n      \"refId\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n      \"onModel\": \"Post\",\n      \"replies\": [\n        {\n          \"_id\": \"reply123\",\n          \"content\": \"I agree!\",\n          \"onModel\": \"Comment\"\n        }\n      ],\n      \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n    }\n  ]\n}"}],"_postman_id":"cd42330f-eeae-42e1-b650-d5a414998220"},{"name":"React On Comment","id":"029c19fc-ca94-4a99-b50a-a5fa6577ff08","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"reactType\": \"love\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId/react","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId/react</code></p>\n<p>Add, update, or remove a reaction on a comment. Same toggle behavior as post reactions.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n<tr>\n<td>commentId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the comment</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>reactType</td>\n<td>string</td>\n<td>Yes</td>\n<td>One of: \"like\", \"love\", \"haha\", \"care\", \"sad\", \"angry\"</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["posts",":postId","comments",":commentId","react"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"c535610b-4398-4b7e-9f31-154d10b0b565","type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"},{"id":"5f548b06-ae3d-470e-b866-042107b69eb3","type":"any","value":"comment123","key":"commentId"}]}},"response":[{"id":"0e96d0b9-0e24-4ba6-8d94-0687fb1fe1fe","name":"React On Comment - Added","originalRequest":{"method":"POST","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"reactType\": \"love\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId/react","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","comments",":commentId","react"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"},{"key":"commentId","value":"comment123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Reaction added successfully\",\n  \"data\": {\n    \"_id\": \"react456\",\n    \"type\": \"love\",\n    \"userId\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"ref\": \"comment123\",\n    \"onModel\": \"Comment\"\n  }\n}"}],"_postman_id":"029c19fc-ca94-4a99-b50a-a5fa6577ff08"},{"name":"Update Comment","id":"e9b79512-7988-43e5-927d-ddcee982e741","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Updated comment text","type":"text","description":"<p>New comment text (optional)</p>\n"},{"key":"tags","value":"","type":"text","description":"<p>New user ObjectIds to tag (optional)</p>\n"},{"key":"removeTags","value":"","type":"text","description":"<p>User ObjectIds to untag (optional)</p>\n"},{"key":"removeFiles","value":"","type":"text","description":"<p>S3 Keys of files to remove (optional)</p>\n"},{"key":"attachment","type":"file","description":"<p>New files to add (optional)</p>\n","value":null}]},"url":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId","description":"<p><strong>Full URL:</strong> <code>PUT https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId</code></p>\n<p>Update a comment. Only the comment owner can update.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n<tr>\n<td>commentId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the comment</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body (form-data) — at least one field required:</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>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>content</td>\n<td>string</td>\n<td>New text</td>\n</tr>\n<tr>\n<td>tags</td>\n<td>string[]</td>\n<td>New user ObjectIds to tag</td>\n</tr>\n<tr>\n<td>removeTags</td>\n<td>string[]</td>\n<td>User ObjectIds to remove</td>\n</tr>\n<tr>\n<td>removeFiles</td>\n<td>string[]</td>\n<td>S3 Keys of files to delete</td>\n</tr>\n<tr>\n<td>attachment</td>\n<td>file[]</td>\n<td>New files to upload</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["posts",":postId","comments",":commentId"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"f9ff1f65-d770-4099-b6b3-7de88efc587b","type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"},{"id":"c3deeea6-a818-4f16-b588-14645ae31ece","type":"any","value":"comment123","key":"commentId"}]}},"response":[{"id":"62c7aedd-1f42-4f01-b4b0-851fb3a100b1","name":"Update Comment - Success","originalRequest":{"method":"PUT","header":[{"key":"token","value":""}],"body":{"mode":"formdata","formdata":[{"key":"content","value":"Updated comment","type":"text"}]},"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","comments",":commentId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"},{"key":"commentId","value":"comment123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"done!\",\n  \"data\": {\n    \"_id\": \"comment123\",\n    \"content\": \"Updated comment text\",\n    \"updatedAt\": \"2026-01-02T00:00:00.000Z\"\n  }\n}"}],"_postman_id":"e9b79512-7988-43e5-927d-ddcee982e741"},{"name":"Delete Comment","id":"6562d351-19d6-4679-80b1-961597dd7d20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId","description":"<p><strong>Full URL:</strong> <code>DELETE https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId</code></p>\n<p>Delete a comment and its entire reply tree. Only the comment owner can delete.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the post</td>\n</tr>\n<tr>\n<td>commentId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the comment</td>\n</tr>\n</tbody>\n</table>\n</div><p>Deletes: the comment, all nested replies (recursive), all their S3 attachments, all their reactions.</p>\n","urlObject":{"path":["posts",":postId","comments",":commentId"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"0c8c20ca-3c94-45c3-8b2a-d6f56a4de952","type":"any","value":"664f1a2b3c4d5e6f7a8b9c0d","key":"postId"},{"id":"e424cd42-9a98-4ab8-bd84-64fe1c8b8747","type":"any","value":"comment123","key":"commentId"}]}},"response":[{"id":"b558c22a-76a6-4179-ba4c-efa75b112b75","name":"Delete Comment - Success","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","comments",":commentId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"},{"key":"commentId","value":"comment123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Comment and its sub-tree deleted successfully\",\n  \"data\": {}\n}"},{"id":"3da78c3b-4c05-44bc-b8ae-2fe3e3e9df0b","name":"Delete Comment - Not Found or Unauthorized","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/posts/:postId/comments/:commentId","host":["https://social-app-backend-coral.vercel.app"],"path":["posts",":postId","comments",":commentId"],"variable":[{"key":"postId","value":"664f1a2b3c4d5e6f7a8b9c0d"},{"key":"commentId","value":"comment123"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Comment Not Found or Unauthorized\",\n  \"status\": 404\n}"}],"_postman_id":"6562d351-19d6-4679-80b1-961597dd7d20"}],"id":"74c66217-267d-4fb6-a2de-1f6d870c80ce","_postman_id":"74c66217-267d-4fb6-a2de-1f6d870c80ce","description":""},{"name":"Friends","item":[{"name":"Send Friend Request","id":"524c778f-4eb0-489d-800f-96f4fd1fdff3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"to\": \"664f1a2b3c4d5e6f7a8b9c0d\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/friends","description":"<p><strong>Full URL:</strong> <code>POST https://social-app-backend-coral.vercel.app/friends</code></p>\n<p>Send a friend request to another user.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>to</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the user to send the request to</td>\n</tr>\n</tbody>\n</table>\n</div><p>Fails if: request already exists, already friends, or sending to yourself.\nSends a push notification to the recipient.</p>\n","urlObject":{"path":["friends"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"b169d232-83fc-400f-9df5-bfe1c35e06ac","name":"Send Friend Request - Success","originalRequest":{"method":"POST","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"to\": \"664f1a2b3c4d5e6f7a8b9c0d\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/friends"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Friend request sent successfully\",\n  \"data\": {\n    \"_id\": \"req123\",\n    \"from\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"to\": \"664f1a2b3c4d5e6f7a8b9c0e\",\n    \"status\": \"pending\",\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"},{"id":"676b210a-326f-44e3-a952-b422b9d9283d","name":"Send Friend Request - Already Exists","originalRequest":{"method":"POST","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"to\": \"664f1a2b3c4d5e6f7a8b9c0d\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/friends"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Friend request already exists\",\n  \"status\": 400\n}"}],"_postman_id":"524c778f-4eb0-489d-800f-96f4fd1fdff3"},{"name":"Process Friend Request (Accept/Reject)","id":"ec50a71b-5cdf-45bf-b774-6242743f2474","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"accepted\"\n}","options":{"raw":{"language":"json"}}},"url":"https://social-app-backend-coral.vercel.app/friends/:requestId","description":"<p><strong>Full URL:</strong> <code>PATCH https://social-app-backend-coral.vercel.app/friends/:requestId</code></p>\n<p>Accept or reject a received friend request.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>requestId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the friend request</td>\n</tr>\n</tbody>\n</table>\n</div><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>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status</td>\n<td>string</td>\n<td>Yes</td>\n<td>\"accepted\" or \"rejected\"</td>\n</tr>\n</tbody>\n</table>\n</div><p>Only the recipient can process the request. On accept: creates a friendship record and sends a push notification to the sender.</p>\n","urlObject":{"path":["friends",":requestId"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"efb8db40-ff60-4ce3-a52f-7f7e079023cb","description":{"content":"<p>MongoDB ObjectId of the friend request</p>\n","type":"text/plain"},"type":"any","value":"req123","key":"requestId"}]}},"response":[{"id":"8e5d8c65-1e57-4e5a-b03f-1517f8f4c2b9","name":"Accept Request - Success","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"accepted\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://social-app-backend-coral.vercel.app/friends/:requestId","host":["https://social-app-backend-coral.vercel.app"],"path":["friends",":requestId"],"variable":[{"key":"requestId","value":"req123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Friend request accepted successfully\",\n  \"data\": {\n    \"_id\": \"friendship123\",\n    \"userA\": \"664f1a2b3c4d5e6f7a8b9c0d\",\n    \"userB\": \"664f1a2b3c4d5e6f7a8b9c0e\",\n    \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n  }\n}"},{"id":"41a995a1-1309-4ac7-9346-873d6c7de410","name":"Reject Request - Success","originalRequest":{"method":"PATCH","header":[{"key":"token","value":""},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"rejected\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://social-app-backend-coral.vercel.app/friends/:requestId","host":["https://social-app-backend-coral.vercel.app"],"path":["friends",":requestId"],"variable":[{"key":"requestId","value":"req123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Friend request rejected successfully\",\n  \"data\": {\n    \"requestId\": \"req123\",\n    \"status\": \"rejected\"\n  }\n}"}],"_postman_id":"ec50a71b-5cdf-45bf-b774-6242743f2474"},{"name":"Get Received Requests","id":"1eb33fc0-c310-4611-ad00-15e2fd554520","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/friends/received","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/friends/received</code></p>\n<p>Get all pending friend requests received by the authenticated user.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p>Returns requests with sender's userName, profileDoc, and email populated.</p>\n","urlObject":{"path":["friends","received"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"fc4bda00-048c-4d62-8643-246010179283","name":"Get Received Requests - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://social-app-backend-coral.vercel.app/friends/received"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Received friend requests fetched successfully\",\n  \"data\": [\n    {\n      \"_id\": \"req123\",\n      \"from\": {\n        \"_id\": \"664f1a2b3c4d5e6f7a8b9c0e\",\n        \"userName\": \"Ahmed Mohamed\",\n        \"email\": \"ahmed@example.com\"\n      },\n      \"status\": \"pending\",\n      \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n    }\n  ]\n}"}],"_postman_id":"1eb33fc0-c310-4611-ad00-15e2fd554520"},{"name":"Get Sent Requests","id":"65fa7d32-c6ee-43e2-b243-43ff648471f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/friends/sent","description":"<p><strong>Full URL:</strong> <code>GET https://social-app-backend-coral.vercel.app/friends/sent</code></p>\n<p>Get all pending friend requests sent by the authenticated user.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p>Returns requests with recipient's userName, profileDoc, and email populated.</p>\n","urlObject":{"path":["friends","sent"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[]}},"response":[{"id":"f5a39cce-2de9-4c99-afb9-b851827a08b5","name":"Get Sent Requests - Success","originalRequest":{"method":"GET","header":[{"key":"token","value":""}],"url":"https://social-app-backend-coral.vercel.app/friends/sent"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Sent friend requests fetched successfully\",\n  \"data\": [\n    {\n      \"_id\": \"req456\",\n      \"to\": {\n        \"_id\": \"664f1a2b3c4d5e6f7a8b9c0e\",\n        \"userName\": \"Ahmed Mohamed\",\n        \"email\": \"ahmed@example.com\"\n      },\n      \"status\": \"pending\",\n      \"createdAt\": \"2026-01-01T00:00:00.000Z\"\n    }\n  ]\n}"}],"_postman_id":"65fa7d32-c6ee-43e2-b243-43ff648471f5"},{"name":"Remove Friend","id":"c81acdbf-2809-4f99-af0a-0504e5374169","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/friends/remove/:target","description":"<p><strong>Full URL:</strong> <code>DELETE https://social-app-backend-coral.vercel.app/friends/remove/:target</code></p>\n<p>Remove an existing friend.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>target</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the friend to remove</td>\n</tr>\n</tbody>\n</table>\n</div><p>Fails if they are not friends.</p>\n","urlObject":{"path":["friends","remove",":target"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"aabba899-e5f4-4a03-a7ea-26c9426e0608","description":{"content":"<p>MongoDB ObjectId of the friend to remove</p>\n","type":"text/plain"},"type":"any","value":"664f1a2b3c4d5e6f7a8b9c0e","key":"target"}]}},"response":[{"id":"49389137-4f18-4757-aa1b-dab9484b9e7b","name":"Remove Friend - Success","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/friends/remove/:target","host":["https://social-app-backend-coral.vercel.app"],"path":["friends","remove",":target"],"variable":[{"key":"target","value":"664f1a2b3c4d5e6f7a8b9c0e"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Friend removed successfully\",\n  \"data\": {\n    \"targetUserId\": \"664f1a2b3c4d5e6f7a8b9c0e\"\n  }\n}"},{"id":"2eccac98-4704-4928-b6f8-14c9c88bb75f","name":"Remove Friend - Not Friends","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/friends/remove/:target","host":["https://social-app-backend-coral.vercel.app"],"path":["friends","remove",":target"],"variable":[{"key":"target","value":"664f1a2b3c4d5e6f7a8b9c0e"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"You are not friends\",\n  \"status\": 400\n}"}],"_postman_id":"c81acdbf-2809-4f99-af0a-0504e5374169"},{"name":"Cancel Sent Request","id":"6718e8b0-9385-4e4b-a9ed-aaea4b887cae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"token","value":"","description":"<p>JWT access token</p>\n"}],"url":"https://social-app-backend-coral.vercel.app/friends/cancel/:requestId","description":"<p><strong>Full URL:</strong> <code>DELETE https://social-app-backend-coral.vercel.app/friends/cancel/:requestId</code></p>\n<p>Cancel a friend request that was sent by the authenticated user.</p>\n<p><strong>Headers:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>Yes</td>\n<td>JWT access token</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>URL Params:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>requestId</td>\n<td>string</td>\n<td>Yes</td>\n<td>MongoDB ObjectId of the friend request to cancel</td>\n</tr>\n</tbody>\n</table>\n</div><p>Only the sender can cancel. Fails if the request is not found or belongs to someone else.</p>\n","urlObject":{"path":["friends","cancel",":requestId"],"host":["https://social-app-backend-coral.vercel.app"],"query":[],"variable":[{"id":"edafd075-3745-4efb-95ea-0e9b0d3315c5","description":{"content":"<p>MongoDB ObjectId of the friend request to cancel</p>\n","type":"text/plain"},"type":"any","value":"req123","key":"requestId"}]}},"response":[{"id":"bd9383d0-317e-4114-ae24-27eaaf1e10df","name":"Cancel Request - Success","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/friends/cancel/:requestId","host":["https://social-app-backend-coral.vercel.app"],"path":["friends","cancel",":requestId"],"variable":[{"key":"requestId","value":"req123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Friend request canceled successfully\",\n  \"data\": {\n    \"requestId\": \"req123\"\n  }\n}"},{"id":"7436eaa1-f7a0-4b06-9308-119c86ddbd3e","name":"Cancel Request - Not Found","originalRequest":{"method":"DELETE","header":[{"key":"token","value":""}],"url":{"raw":"https://social-app-backend-coral.vercel.app/friends/cancel/:requestId","host":["https://social-app-backend-coral.vercel.app"],"path":["friends","cancel",":requestId"],"variable":[{"key":"requestId","value":"req123"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"Request not found or you are not authorized to cancel it\",\n  \"status\": 404\n}"}],"_postman_id":"6718e8b0-9385-4e4b-a9ed-aaea4b887cae"}],"id":"bdd988e2-2807-4211-918b-9872ee2e6673","_postman_id":"bdd988e2-2807-4211-918b-9872ee2e6673","description":""}],"variable":[{"key":"base_url","value":"https://social-app-backend-coral.vercel.app"},{"key":"token","value":""},{"key":"refreshToken","value":""},{"key":"supabase_service_role_api_key_0hsq","secret":true}]}