{"info":{"_postman_id":"19f0a5cd-ff8c-4841-99b2-2cca9016f773","name":"Chat IO","description":"<html><head></head><body><p>CHAT-IO =<a href=\"https://chat-io-ap.herokuapp.com/api/\">https://chat-io-ap.herokuapp.com/api/</a></p>\n<h2 id=\"chat-events\">Chat events</h2>\n<h3 id=\"events-to-emit\">Events to emit</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Events</strong></th>\n<th><strong>Purpose</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>online</td>\n<td>emit this event when user has log in or signup or when user is already logged in and open the application.  <br>  <br>pass <strong>userId</strong> as <em>payload</em></td>\n</tr>\n<tr>\n<td>new-chat</td>\n<td>emit this event when user is starting new chat  <br>  <br>pass <strong>receiverId</strong> as <em>payload</em></td>\n</tr>\n<tr>\n<td>join-chat</td>\n<td>emit this when user select a specific chat to send message to.  <br>  <br>pass <strong>chatId</strong> as <em>payload</em></td>\n</tr>\n<tr>\n<td>chat-message</td>\n<td>emit this event when chat message is sent and pass the <strong>response</strong> as <em>payload.</em></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"events-to-be-observe\">Events to be observe</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Events</strong></th>\n<th><strong>Purpose</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>chats</td>\n<td>Observe this event when list of available chats changes  <br>  <br>response is same as this route <code>{{CHAT-IO}}v1/chat/chats</code></td>\n</tr>\n<tr>\n<td>chat-message</td>\n<td>Observe this for realtime chatting messages  <br>  <br>response is same as this route <code>{{CHAT-IO}}v1/chat/get-messages/:chatId</code></td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"13221861","collectionId":"19f0a5cd-ff8c-4841-99b2-2cca9016f773","publishedId":"2s8YmNRiWB","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-11-17T17:52:50.000Z"},"item":[{"name":"Auth","item":[{"name":"Login","id":"7a3212bc-dfc9-4ea9-8d68-b285c5d75ca8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"usera@mail.com\",\n    \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"{{CHAT-IO}}v1/auth/login","description":"<p>email and password fields are <strong>required</strong></p>\n","urlObject":{"path":["auth","login"],"host":["{{CHAT-IO}}v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"7a3212bc-dfc9-4ea9-8d68-b285c5d75ca8"},{"name":"SignUp","id":"d4dd8398-2f8f-4f90-a543-6095635f1360","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"password\": \"password\",\n    \"email\":\"johndoe2@mail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"{{CHAT-IO}}v1/auth/signup","description":"<p>email and password fields are <strong>required and</strong> <em><strong>password</strong></em> <strong>must be at least 8 characters</strong></p>\n","urlObject":{"path":["auth","signup"],"host":["{{CHAT-IO}}v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"d4dd8398-2f8f-4f90-a543-6095635f1360"}],"id":"e90e2290-8bc7-4637-8dc2-4dee478c1f14","_postman_id":"e90e2290-8bc7-4637-8dc2-4dee478c1f14","description":""},{"name":"User","item":[{"name":"GetUsers","id":"76f0430e-5919-43e1-b1f3-83ded146ed47","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzZjMGViNDdhMDY1MzRmZjkyYzdjMWYiLCJpYXQiOjE2Njg3MDMzNDEsImV4cCI6MTY3NzM0MzM0MX0.UP-0MdwI_cfM6CzE9jCIQWiBML5y88p6LUAtKRQpqAc","type":"text"}],"url":"{{CHAT-IO}}v1/user/getusers","urlObject":{"path":["user","getusers"],"host":["{{CHAT-IO}}v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"76f0430e-5919-43e1-b1f3-83ded146ed47"},{"name":"Get My Profile","id":"5f1d9818-7164-4a77-9f1d-321f2dba2e28","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzZjMGViNDdhMDY1MzRmZjkyYzdjMWYiLCJpYXQiOjE2Njg3MDMzNDEsImV4cCI6MTY3NzM0MzM0MX0.UP-0MdwI_cfM6CzE9jCIQWiBML5y88p6LUAtKRQpqAc","type":"text"}],"url":"{{CHAT-IO}}v1/user/my-profile","urlObject":{"path":["user","my-profile"],"host":["{{CHAT-IO}}v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"5f1d9818-7164-4a77-9f1d-321f2dba2e28"},{"name":"Others Profile","id":"20887556-794a-48d9-8982-c45e2d3e272e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzZjMGViNDdhMDY1MzRmZjkyYzdjMWYiLCJpYXQiOjE2Njg3MDMzNDEsImV4cCI6MTY3NzM0MzM0MX0.UP-0MdwI_cfM6CzE9jCIQWiBML5y88p6LUAtKRQpqAc","type":"text"}],"url":"{{CHAT-IO}}v1/user/others-profile/635aa7225d97219ca3927cf6","urlObject":{"path":["user","others-profile","635aa7225d97219ca3927cf6"],"host":["{{CHAT-IO}}v1"],"query":[{"disabled":true,"key":"id","value":"635abe191a932f9e6a816af2"}],"variable":[]}},"response":[],"_postman_id":"20887556-794a-48d9-8982-c45e2d3e272e"}],"id":"1f2875f7-6aa7-4083-b388-ba2b6ba02ff1","description":"<p><strong>x-access-token</strong> is required for all user endpoints</p>\n","_postman_id":"1f2875f7-6aa7-4083-b388-ba2b6ba02ff1"},{"name":"Chat","item":[{"name":"Send Message","id":"07db8ab6-5066-4885-b47b-a3e4536677b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-access-token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzViZTk1MDJmMjI3NDE0MGZiNDJiNjMiLCJpYXQiOjE2NjY5Njc5NzEsImV4cCI6MTY2NzA1NDM3MX0.5bSPEViEGFk9IqudF9OI5I10Q7b44cYJ_hJKtLOBS5Q","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"receiverId\": \"635abe191a932f9e6a816af2\",\n    \"text\": \"hello\"\n}","options":{"raw":{"language":"json"}}},"url":"{{CHAT-IO}}v1/chat/send-message","description":"<p><strong>text</strong> and <strong>receiverId</strong> are required</p>\n","urlObject":{"path":["chat","send-message"],"host":["{{CHAT-IO}}v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"07db8ab6-5066-4885-b47b-a3e4536677b9"},{"name":"Get Messages","id":"ea9deba0-faa6-4310-a813-f14ddeb96cfc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzZjMGViNDdhMDY1MzRmZjkyYzdjMWYiLCJpYXQiOjE2Njg3MDMzNDEsImV4cCI6MTY3NzM0MzM0MX0.UP-0MdwI_cfM6CzE9jCIQWiBML5y88p6LUAtKRQpqAc","type":"text"}],"url":"{{CHAT-IO}}v1/chat/get-messages/:chatId","description":"<p>To get messages you need pass <strong>chatId</strong> as a path</p>\n","urlObject":{"path":["chat","get-messages",":chatId"],"host":["{{CHAT-IO}}v1"],"query":[],"variable":[{"type":"any","value":null,"key":"chatId"}]}},"response":[],"_postman_id":"ea9deba0-faa6-4310-a813-f14ddeb96cfc"},{"name":"Get Chats","id":"8c5bdf99-032d-487b-854e-89a4b1272254","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-access-token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzZjMGViNDdhMDY1MzRmZjkyYzdjMWYiLCJpYXQiOjE2Njg3MDMzNDEsImV4cCI6MTY3NzM0MzM0MX0.UP-0MdwI_cfM6CzE9jCIQWiBML5y88p6LUAtKRQpqAc","type":"text"}],"url":"{{CHAT-IO}}v1/chat/chats","description":"<p>List of available chats for particular user</p>\n","urlObject":{"path":["chat","chats"],"host":["{{CHAT-IO}}v1"],"query":[],"variable":[]}},"response":[],"_postman_id":"8c5bdf99-032d-487b-854e-89a4b1272254"}],"id":"96369629-4bd1-41e8-be9c-4af5c4971f7d","description":"<p><strong>x-access-token</strong> is required for all user endpoints</p>\n","_postman_id":"96369629-4bd1-41e8-be9c-4af5c4971f7d"}]}