{"info":{"_postman_id":"c92bb5d1-c004-4c33-a546-2c8250c96bb2","name":"convohub","description":"<html><head></head><body><p>StartFragment</p>\n<p>This API powers ConvoHub — a real-time chat application supporting instant messaging, one-to-one chat, and group conversations.</p>\n<p>Core Features:<br>• User authentication with JWT<br>• One-to-one and group chat creation<br>• Real-time messaging via Socket.io<br>• Message read receipts<br>• Online/offline user status<br>• Secure protected routes</p>\n<p>Base URL: <a href=\"https://www.convohub.in/\">https://www.convohub.in/</a></p>\n<p>EndFragment</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"39216531","collectionId":"c92bb5d1-c004-4c33-a546-2c8250c96bb2","publishedId":"2sBXc8nhpT","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-05T05:43:49.000Z"},"item":[{"name":"Signup","id":"2a4ba138-4711-492d-8efa-8237e8e5ec8b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Kiran Chaudhary\",\r\n  \"email\": \"kiran@example.com\",\r\n  \"password\": \"password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/signup","description":"<p>StartFragment</p>\n<p>Registers a new user account in ConvoHub.</p>\n<p>This endpoint creates a user using name, email, and password.<br />Password is securely hashed before storing in the database.</p>\n<p>✅ Use this before login<br />✅ Returns user info + authentication token</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","auth","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a4ba138-4711-492d-8efa-8237e8e5ec8b"},{"name":"signup-second user","id":"f3589a29-937b-4c12-8b07-f2835a232d8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Priya Singh\",\r\n  \"email\": \"priya@example.com\",\r\n  \"password\": \"password123\"\r\n}"},"url":"http://localhost:5000/api/auth/signup","description":"<p>StartFragment</p>\n<p>Registers a new user account in ConvoHub.</p>\n<p>This endpoint creates a user using name, email, and password.<br />Password is securely hashed before storing in the database.</p>\n<p>✅ Use this before login<br />✅ Returns user info + authentication token</p>\n<p>Required fields:</p>\n<ul>\n<li><p>name — user full name</p>\n</li>\n<li><p>email — unique email address</p>\n</li>\n<li><p>password — minimum 6 characters</p>\n</li>\n</ul>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","auth","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f3589a29-937b-4c12-8b07-f2835a232d8d"},{"name":"Login","id":"a51cec48-5a1f-4ada-aa00-18df26597cea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"kiran@example.com\",\r\n  \"password\": \"password123\"\r\n}"},"url":"http://localhost:5000/api/auth/login","description":"<p>StartFragment</p>\n<p>Authenticates an existing user and returns a JWT token.</p>\n<p>Use registered email and password to log in.<br />On success, server returns user data and access token.</p>\n<p>✅ Token must be used in Authorization header for protected routes<br />Header format:<br />Authorization: Bearer</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a51cec48-5a1f-4ada-aa00-18df26597cea"},{"name":"get user","id":"e6351959-ebff-4098-ad14-ab3ebd7403e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"kiran@example.com\",\r\n  \"password\": \"password123\"\r\n}"},"url":"http://localhost:5000/api/users","description":"<p>StartFragment</p>\n<p>Fetches the list of all registered users.</p>\n<p>Used to show available users for one-to-one chat creation and group member selection.</p>\n<p>🔐 Protected route — requires Bearer token<br />Returns user list with basic profile info</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e6351959-ebff-4098-ad14-ab3ebd7403e7"},{"name":"chat-one to one","id":"acb8257b-4fc6-4029-9c8c-97f4d047d096","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"recipientId\": \"697f223c34ea794e4266371a\"\r\n}"},"url":"http://localhost:5000/api/chats/one-to-one","description":"<p>StartFragment</p>\n<p>Creates (or fetches if already exists) a one-to-one chat between two users.</p>\n<p>Provide recipientId of the target user.<br />If chat already exists → returns existing chat<br />Else → creates new chat</p>\n<p>Used when user clicks “Start Chat”.</p>\n<p>🔐 Protected route</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","chats","one-to-one"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"acb8257b-4fc6-4029-9c8c-97f4d047d096"},{"name":"message","id":"65778d49-6dfe-4e23-a8d2-77d5caf8f7ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"chatId\": \"697f231e34ea794e42663724\",\r\n  \"text\": \"Hello Priya! 🎉\"\r\n}"},"url":"http://localhost:5000/api/messages","description":"<p>StartFragment</p>\n<p>Sends a new message to a specific chat.</p>\n<p>Creates message record and triggers real-time socket event.</p>\n<p>Fields:</p>\n<ul>\n<li><p>chatId — target chat</p>\n</li>\n<li><p>text — message content</p>\n</li>\n</ul>\n<p>Used when user sends message in chat window.</p>\n<p>🔐 Protected route<br />⚡ Emits real-time event via socket</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","messages"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"65778d49-6dfe-4e23-a8d2-77d5caf8f7ef"},{"name":"message-id","id":"a6f51ed9-93a7-4ed9-aee6-6689a158fd66","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"chatId\": \"697f231e34ea794e42663724\",\r\n  \"text\": \"Hello Priya! 🎉\"\r\n}"},"url":"http://localhost:5000/api/messages/697f231e34ea794e42663724","description":"<p>StartFragment</p>\n<p>Fetches all messages for a specific chat.</p>\n<p>Used when opening a chat window to load message history.</p>\n<p>Returns messages sorted by time.</p>\n<p>🔐 Protected route</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","messages","697f231e34ea794e42663724"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a6f51ed9-93a7-4ed9-aee6-6689a158fd66"},{"name":"message mark-seen","id":"70408d15-16b5-43d0-8c5e-c1a526d34065","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"chatId\": \"697f231e34ea794e42663724\",\r\n  \"text\": \"Hello Priya! 🎉\"\r\n}"},"url":"http://localhost:5000/api/messages/697f23a034ea794e42663729/mark-seen","description":"<p>StartFragment</p>\n<p>Marks a specific message as seen/read.</p>\n<p>Updates read status and triggers real-time seen update event.</p>\n<p>Used for read receipts feature.</p>\n<p>🔐 Protected route<br />⚡ Emits socket event</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","messages","697f23a034ea794e42663729","mark-seen"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"70408d15-16b5-43d0-8c5e-c1a526d34065"},{"name":"group","id":"4c692d79-895c-4ae1-a91e-b7bf6d2296c2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Friends Group\",\r\n  \"memberIds\": [\"697f223c34ea794e4266371a\"]\r\n}"},"url":"http://localhost:5000/api/chats/group","description":"<p>StartFragment</p>\n<p>Creates a new group chat with multiple members.</p>\n<p>Request body includes:</p>\n<ul>\n<li><p>name — group name</p>\n</li>\n<li><p>memberIds — array of user IDs</p>\n</li>\n</ul>\n<p>Creator becomes group admin by default.</p>\n<p>Used for group conversations.</p>\n<p>🔐 Protected route</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"http","port":"5000","path":["api","chats","group"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c692d79-895c-4ae1-a91e-b7bf6d2296c2"},{"name":"New Request","id":"df197b7e-17a2-480c-8b8c-5c2ba75d4e41","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"df197b7e-17a2-480c-8b8c-5c2ba75d4e41"}]}