{"info":{"_postman_id":"34ff2f2b-b479-4914-ad36-44b5ed505352","name":"Nodejs_chatApp","description":"<html><head></head><body><h2 id=\"nodejs-chat-app\">Nodejs Chat App</h2>\n<p>This is a Documentation of a chat app done with nodejs, this is a list of all the APIs for the application.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12988315","collectionId":"34ff2f2b-b479-4914-ad36-44b5ed505352","publishedId":"UUy7bPd3","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-10-08T11:45:59.000Z"},"item":[{"name":"Welcome (get all channels)","id":"0f27a585-fb28-4286-acf2-a0cdf4c342ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/welcome","description":"<p>This is the welcome route, /welcome is the homepage which shows all the channels created.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["welcome"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6fc3ed28-d90b-42e7-b4d6-cfe0a7fbbdfe","name":"Welcome (get all channels)","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/welcome"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1361"},{"key":"ETag","value":"W/\"551-4+QzXRI5MbiKZY8FILrcCvLjY7A\""},{"key":"Date","value":"Fri, 08 Oct 2021 10:20:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"rooms\": [\n        {\n            \"_id\": \"6ac7fe7da455424190aa4bbd7ddd6dc5\",\n            \"userIds\": [\n                \"3ba219a9f5bc444892a6c414822c7a19\"\n            ],\n            \"roomName\": \"frontend\",\n            \"description\": \"This is a channel for frontend discussions\",\n            \"type\": \"enduser-to-enduser\",\n            \"chatInitiator\": \"3ba219a9f5bc444892a6c414822c7a19\",\n            \"createdAt\": \"2021-10-07T10:33:02.960Z\",\n            \"updatedAt\": \"2021-10-07T10:33:02.960Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"4df9301d21c54da9b4b4e106732c61e5\",\n            \"userIds\": [\n                \"3ba219a9f5bc444892a6c414822c7a19\"\n            ],\n            \"roomName\": \"Backend\",\n            \"description\": \"This is a channel for frontend discussions\",\n            \"type\": \"enduser-to-enduser\",\n            \"chatInitiator\": \"3ba219a9f5bc444892a6c414822c7a19\",\n            \"createdAt\": \"2021-10-07T10:52:08.538Z\",\n            \"updatedAt\": \"2021-10-07T10:52:08.538Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"390ed03c58b74501b62193fa768a47ff\",\n            \"userIds\": [\n                \"3ba219a9f5bc444892a6c414822c7a19\"\n            ],\n            \"roomName\": \"Backend\",\n            \"description\": \"This is a channel for backend discussions\",\n            \"type\": \"enduser-to-enduser\",\n            \"chatInitiator\": \"3ba219a9f5bc444892a6c414822c7a19\",\n            \"createdAt\": \"2021-10-07T10:53:26.446Z\",\n            \"updatedAt\": \"2021-10-07T10:53:26.446Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"51367feba57a46b2a2aa068e1314f856\",\n            \"userIds\": [\n                \"3ba219a9f5bc444892a6c414822c7a19\"\n            ],\n            \"roomName\": \"Design\",\n            \"description\": \"This is a channel for design discussions\",\n            \"type\": \"enduser-to-admin\",\n            \"chatInitiator\": \"3ba219a9f5bc444892a6c414822c7a19\",\n            \"createdAt\": \"2021-10-07T10:55:42.610Z\",\n            \"updatedAt\": \"2021-10-07T10:55:42.610Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"0f27a585-fb28-4286-acf2-a0cdf4c342ea"},{"name":"Login route","id":"02ec8d9a-8125-429c-af20-5ab9fe0a6a14","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": \"favourvalg@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login/","description":"<p>This is the route where the login data/form is sent</p>\n","urlObject":{"protocol":"http","port":"3000","path":["login",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"4289ebbd-48da-43fe-bf82-6a8752730f59","name":"Login route","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": \"favourvalg@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"183"},{"key":"ETag","value":"W/\"b7-F7+OznNs5cBHjH7EoFG9Iq1ILgo\""},{"key":"Date","value":"Fri, 08 Oct 2021 10:23:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"authorization\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJmYXZvdXJ2YWxnQGdtYWlsLmNvbSIsImlhdCI6MTYzMzY4ODYxNX0.7ukYTawDGuo88eK__LfqX_bfnpXOgmrxa8xoZXJbRnw\"\n}"}],"_postman_id":"02ec8d9a-8125-429c-af20-5ab9fe0a6a14"},{"name":"Register route","id":"0a56fd7f-06d5-4913-9efd-9b1533dd6e08","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Favour\",\r\n    \"lastName\": \"Arua\",\r\n    \"email\": \"favoor@mail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/welcome","urlObject":{"protocol":"http","port":"3000","path":["welcome"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c0af4d6e-8399-4113-8c1e-566d487e1242","name":"Register route","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\": \"Favour\",\r\n    \"lastName\": \"Arua\",\r\n    \"email\": \"favoor@mail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/welcome"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"376"},{"key":"ETag","value":"W/\"178-oHZQfGZNaEGi5db/mXn1X5qtqcI\""},{"key":"Date","value":"Fri, 08 Oct 2021 10:27:19 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"user\": {\n        \"firstName\": \"Favour\",\n        \"lastName\": \"Arua\",\n        \"email\": \"favoor@mail.com\",\n        \"_id\": \"5046f8ab6da44394a8f2571bf63a30d7\",\n        \"createdAt\": \"2021-10-08T10:27:19.171Z\",\n        \"updatedAt\": \"2021-10-08T10:27:19.171Z\",\n        \"__v\": 0\n    },\n    \"authorization\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImZhdm9vckBtYWlsLmNvbSIsImlhdCI6MTYzMzY4ODgzOX0.LCFw0jResFG8Q6NRzogfMJ9JovcINvWr_HumHFhyNA4\"\n}"}],"_postman_id":"0a56fd7f-06d5-4913-9efd-9b1533dd6e08"},{"name":"Get all users route","id":"aade2bf3-fc1c-44fb-9926-e9ec17177436","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/users","urlObject":{"protocol":"http","port":"3000","path":["users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"3fc55b3f-e3ce-4baa-9d8c-94c9e8dedaa5","name":"Get all users route","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"2332"},{"key":"ETag","value":"W/\"91c-FFbN8TCn2zUCZO/c2GbnqjJLhRw\""},{"key":"Date","value":"Fri, 08 Oct 2021 10:29:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"users\": [\n        {\n            \"_id\": \"3ba219a9f5bc444892a6c414822c7a19\",\n            \"firstName\": \"favour\",\n            \"lastName\": \"Godwin\",\n            \"email\": \"favour@mail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-06T15:49:58.227Z\",\n            \"updatedAt\": \"2021-10-06T15:49:58.227Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"755b6c17d58445b083b0d3528a8b5514\",\n            \"firstName\": \"valerie\",\n            \"lastName\": \"arua\",\n            \"email\": \"val@mail.com\",\n            \"type\": \"admin\",\n            \"createdAt\": \"2021-10-06T15:54:22.559Z\",\n            \"updatedAt\": \"2021-10-06T15:54:22.559Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"7beff93c6de84defbd0e6778914738a5\",\n            \"firstName\": \"Gloria\",\n            \"lastName\": \"arua\",\n            \"email\": \"gloria@mail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-06T16:03:20.334Z\",\n            \"updatedAt\": \"2021-10-06T16:03:20.334Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"734faf5fe1f64d368558d76e4cc732c5\",\n            \"firstName\": \"Favour\",\n            \"lastName\": \"Arua\",\n            \"email\": \"favourvalg@gmail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-07T23:42:20.727Z\",\n            \"updatedAt\": \"2021-10-07T23:42:20.727Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"bf0b488327db48d298503e0273543aff\",\n            \"firstName\": \"Favour\",\n            \"lastName\": \"Godwin\",\n            \"email\": \"godwinvalerie3@gmail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-08T00:14:34.567Z\",\n            \"updatedAt\": \"2021-10-08T00:14:34.567Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"d61bc4afc4e749e386ed45175e107adb\",\n            \"firstName\": \"goo\",\n            \"lastName\": \"home\",\n            \"email\": \"gooo@mail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-08T00:45:45.338Z\",\n            \"updatedAt\": \"2021-10-08T00:45:45.338Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"f8c300c6c01542b1b9985ba8de30d87a\",\n            \"firstName\": \"Favour\",\n            \"lastName\": \"Arua\",\n            \"email\": \"favourvg@gmail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-08T00:54:27.688Z\",\n            \"updatedAt\": \"2021-10-08T00:54:27.688Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"299819ed38c74ecf97684477bba54aad\",\n            \"firstName\": \"Favour\",\n            \"lastName\": \"Godwin\",\n            \"email\": \"godwinva@gmail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-08T00:55:46.580Z\",\n            \"updatedAt\": \"2021-10-08T00:55:46.580Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"87e10966a4ba4bd085b782a7bada1002\",\n            \"firstName\": \"Gloryy\",\n            \"lastName\": \"Godwin\",\n            \"email\": \"glory@mail.com\",\n            \"type\": \"enduser\",\n            \"createdAt\": \"2021-10-08T06:28:18.870Z\",\n            \"updatedAt\": \"2021-10-08T06:28:18.870Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"5b04bc68f6234540be3265604dbcf86e\",\n            \"firstName\": \"Favour\",\n            \"lastName\": \"Arua\",\n            \"email\": \"favooor@mail.com\",\n            \"createdAt\": \"2021-10-08T10:26:13.563Z\",\n            \"updatedAt\": \"2021-10-08T10:26:13.563Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"5046f8ab6da44394a8f2571bf63a30d7\",\n            \"firstName\": \"Favour\",\n            \"lastName\": \"Arua\",\n            \"email\": \"favoor@mail.com\",\n            \"createdAt\": \"2021-10-08T10:27:19.171Z\",\n            \"updatedAt\": \"2021-10-08T10:27:19.171Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"aade2bf3-fc1c-44fb-9926-e9ec17177436"},{"name":"Get or Search for a User by email","id":"d47d11ab-739b-4585-aba7-b8c913440583","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/users/favour@mail.com","urlObject":{"protocol":"http","port":"3000","path":["users","favour@mail.com"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"d794eed9-0f5c-4fe4-bdc3-d4d7ba1daf07","name":"Get or Search for a User by email","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/users/favour@mail.com"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"236"},{"key":"ETag","value":"W/\"ec-qnrFh2H9gS8mrI+p1+sLQSyesBg\""},{"key":"Date","value":"Fri, 08 Oct 2021 10:33:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"user\": {\n        \"_id\": \"3ba219a9f5bc444892a6c414822c7a19\",\n        \"firstName\": \"favour\",\n        \"lastName\": \"Godwin\",\n        \"email\": \"favour@mail.com\",\n        \"type\": \"enduser\",\n        \"createdAt\": \"2021-10-06T15:49:58.227Z\",\n        \"updatedAt\": \"2021-10-06T15:49:58.227Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"d47d11ab-739b-4585-aba7-b8c913440583"},{"name":"Delete a User","id":"c78042fb-e917-4e83-92f5-82e30e384f6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:3000/users/favour@mail.com","urlObject":{"protocol":"http","port":"3000","path":["users","favour@mail.com"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6ec91b3d-45c1-4f11-91f2-e3325de88ea0","name":"Delete a User","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:3000/users/favour@mail.com"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"42"},{"key":"ETag","value":"W/\"2a-AdQ7SEA+4iaLJgptDoBTa4cxS5I\""},{"key":"Date","value":"Fri, 08 Oct 2021 10:39:12 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"User Deleted.\"\n}"}],"_postman_id":"c78042fb-e917-4e83-92f5-82e30e384f6b"},{"name":"Creating a new channel","id":"ac2fda9d-5474-4a89-9ae2-f031bd3185c2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userIds\": [],\r\n    \"roomName\": \"Random\",\r\n    \"description\": \"This is a random channel for chats\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/room/initiate","urlObject":{"protocol":"http","port":"3000","path":["room","initiate"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8f2c8588-7733-499f-8cc4-472728814fd6","name":"Creating a new channel","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userIds\": [],\r\n    \"roomName\": \"Random\",\r\n    \"description\": \"This is a random channel for chats\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/room/initiate"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"155"},{"key":"ETag","value":"W/\"9b-e4rhAA6R7yG//cXwMLjKmIV1rCo\""},{"key":"Date","value":"Fri, 08 Oct 2021 10:58:14 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"chatRoom\": {\n        \"isNew\": true,\n        \"message\": \"creating a new chatroom... Random channel is created\",\n        \"chatRoomId\": \"97e23d6263394ae98b07378331709385\"\n    }\n}"}],"_postman_id":"ac2fda9d-5474-4a89-9ae2-f031bd3185c2"},{"name":"Get All users in a room","id":"b2f6c258-7a7e-4b3f-9402-0be2591b71d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/room/random/users","urlObject":{"protocol":"http","port":"3000","path":["room","random","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"fc52407f-f9db-4813-b53a-de6313a7c4e5","name":"Get All users in a room","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/room/random/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"246"},{"key":"ETag","value":"W/\"f6-nrAl1HtVszAgU0Sg9aSqbPS2sTo\""},{"key":"Date","value":"Fri, 08 Oct 2021 11:03:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"users\": {\n        \"_id\": \"bf0b488327db48d298503e0273543aff\",\n        \"firstName\": \"Favour\",\n        \"lastName\": \"Godwin\",\n        \"email\": \"godwinvalerie3@gmail.com\",\n        \"type\": \"enduser\",\n        \"createdAt\": \"2021-10-08T00:14:34.567Z\",\n        \"updatedAt\": \"2021-10-08T00:14:34.567Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"b2f6c258-7a7e-4b3f-9402-0be2591b71d6"},{"name":"Send a message to a channel","id":"52db7ae0-bf6f-4520-8c32-9acb836a2f2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"messageText\": \"I'm good and you?\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/room/51367feba57a46b2a2aa068e1314f856/message","urlObject":{"protocol":"http","port":"3000","path":["room","51367feba57a46b2a2aa068e1314f856","message"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c8256c42-2312-4d9a-b229-9c7cea68d571","name":"Send a message to a channel","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"messageText\": \"I'm good and you?\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/room/51367feba57a46b2a2aa068e1314f856/message"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Fri, 08 Oct 2021 11:14:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"}],"_postman_id":"52db7ae0-bf6f-4520-8c32-9acb836a2f2c"},{"name":"Get all channel conversation","id":"10087cb0-a908-41b3-871f-ce94e74b414d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/room/97e23d6263394ae98b07378331709385","urlObject":{"protocol":"http","port":"3000","path":["room","97e23d6263394ae98b07378331709385"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"417c1b27-df0e-4b9c-9035-09c50844a3b0","name":"Get all channel conversation","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/room/97e23d6263394ae98b07378331709385"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"3680"},{"key":"ETag","value":"W/\"e60-97Go1JhJhJ/O1jiCSeMspMG7kdI\""},{"key":"Date","value":"Fri, 08 Oct 2021 11:34:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"conversation\": [\n        {\n            \"_id\": \"0b929f1463c24ca5ba55ac7b1f51ffa4\",\n            \"chatRoomId\": \"97e23d6263394ae98b07378331709385\",\n            \"message\": {\n                \"messageText\": \"Hi\"\n            },\n            \"postedByUser\": {\n                \"_id\": \"bf0b488327db48d298503e0273543aff\",\n                \"firstName\": \"Favour\",\n                \"lastName\": \"Godwin\",\n                \"email\": \"godwinvalerie3@gmail.com\",\n                \"type\": \"enduser\",\n                \"createdAt\": \"2021-10-08T00:14:34.567Z\",\n                \"updatedAt\": \"2021-10-08T00:14:34.567Z\",\n                \"__v\": 0\n            },\n            \"readByRecipients\": [\n                {\n                    \"readByUserId\": \"godwinvalerie3@gmail.com\",\n                    \"readAt\": \"2021-10-08T11:10:17.296Z\"\n                }\n            ],\n            \"type\": \"text\",\n            \"createdAt\": \"2021-10-08T11:23:47.315Z\",\n            \"updatedAt\": \"2021-10-08T11:23:47.315Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"abed66e43b2f4233a3a83a0192517b4f\",\n            \"chatRoomId\": \"97e23d6263394ae98b07378331709385\",\n            \"message\": {\n                \"messageText\": \"Wow, this is nice\"\n            },\n            \"postedByUser\": {\n                \"_id\": \"bf0b488327db48d298503e0273543aff\",\n                \"firstName\": \"Favour\",\n                \"lastName\": \"Godwin\",\n                \"email\": \"godwinvalerie3@gmail.com\",\n                \"type\": \"enduser\",\n                \"createdAt\": \"2021-10-08T00:14:34.567Z\",\n                \"updatedAt\": \"2021-10-08T00:14:34.567Z\",\n                \"__v\": 0\n            },\n            \"readByRecipients\": [\n                {\n                    \"readByUserId\": \"godwinvalerie3@gmail.com\",\n                    \"readAt\": \"2021-10-08T11:10:17.296Z\"\n                }\n            ],\n            \"type\": \"text\",\n            \"createdAt\": \"2021-10-08T11:23:59.736Z\",\n            \"updatedAt\": \"2021-10-08T11:23:59.736Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"9ef746b6ac734813811d1dea4b4c3fdb\",\n            \"chatRoomId\": \"97e23d6263394ae98b07378331709385\",\n            \"message\": {\n                \"messageText\": \"Glad we have this channel\"\n            },\n            \"postedByUser\": {\n                \"_id\": \"bf0b488327db48d298503e0273543aff\",\n                \"firstName\": \"Favour\",\n                \"lastName\": \"Godwin\",\n                \"email\": \"godwinvalerie3@gmail.com\",\n                \"type\": \"enduser\",\n                \"createdAt\": \"2021-10-08T00:14:34.567Z\",\n                \"updatedAt\": \"2021-10-08T00:14:34.567Z\",\n                \"__v\": 0\n            },\n            \"readByRecipients\": [\n                {\n                    \"readByUserId\": \"godwinvalerie3@gmail.com\",\n                    \"readAt\": \"2021-10-08T11:10:17.296Z\"\n                }\n            ],\n            \"type\": \"text\",\n            \"createdAt\": \"2021-10-08T11:24:25.807Z\",\n            \"updatedAt\": \"2021-10-08T11:24:25.807Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"5dd1df1458f54a6d99ca8defd0355488\",\n            \"chatRoomId\": \"97e23d6263394ae98b07378331709385\",\n            \"message\": {\n                \"messageText\": \"Hey, I'm new here\"\n            },\n            \"postedByUser\": {\n                \"_id\": \"734faf5fe1f64d368558d76e4cc732c5\",\n                \"firstName\": \"Favour\",\n                \"lastName\": \"Arua\",\n                \"email\": \"favourvalg@gmail.com\",\n                \"type\": \"enduser\",\n                \"createdAt\": \"2021-10-07T23:42:20.727Z\",\n                \"updatedAt\": \"2021-10-07T23:42:20.727Z\",\n                \"__v\": 0\n            },\n            \"readByRecipients\": [\n                {\n                    \"readByUserId\": \"favourvalg@gmail.com\",\n                    \"readAt\": \"2021-10-08T11:28:00.113Z\"\n                }\n            ],\n            \"type\": \"text\",\n            \"createdAt\": \"2021-10-08T11:31:26.719Z\",\n            \"updatedAt\": \"2021-10-08T11:31:26.719Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"19973be8704f4bd69a9bc6c6078f154b\",\n            \"chatRoomId\": \"97e23d6263394ae98b07378331709385\",\n            \"message\": {\n                \"messageText\": \"May I know everyone?\"\n            },\n            \"postedByUser\": {\n                \"_id\": \"734faf5fe1f64d368558d76e4cc732c5\",\n                \"firstName\": \"Favour\",\n                \"lastName\": \"Arua\",\n                \"email\": \"favourvalg@gmail.com\",\n                \"type\": \"enduser\",\n                \"createdAt\": \"2021-10-07T23:42:20.727Z\",\n                \"updatedAt\": \"2021-10-07T23:42:20.727Z\",\n                \"__v\": 0\n            },\n            \"readByRecipients\": [\n                {\n                    \"readByUserId\": \"favourvalg@gmail.com\",\n                    \"readAt\": \"2021-10-08T11:28:00.113Z\"\n                }\n            ],\n            \"type\": \"text\",\n            \"createdAt\": \"2021-10-08T11:31:40.241Z\",\n            \"updatedAt\": \"2021-10-08T11:31:40.241Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"0cf941e412f54a178b5f44125ffd8e54\",\n            \"chatRoomId\": \"97e23d6263394ae98b07378331709385\",\n            \"message\": {\n                \"messageText\": \"What have I missed\"\n            },\n            \"postedByUser\": {\n                \"_id\": \"734faf5fe1f64d368558d76e4cc732c5\",\n                \"firstName\": \"Favour\",\n                \"lastName\": \"Arua\",\n                \"email\": \"favourvalg@gmail.com\",\n                \"type\": \"enduser\",\n                \"createdAt\": \"2021-10-07T23:42:20.727Z\",\n                \"updatedAt\": \"2021-10-07T23:42:20.727Z\",\n                \"__v\": 0\n            },\n            \"readByRecipients\": [\n                {\n                    \"readByUserId\": \"favourvalg@gmail.com\",\n                    \"readAt\": \"2021-10-08T11:28:00.113Z\"\n                }\n            ],\n            \"type\": \"text\",\n            \"createdAt\": \"2021-10-08T11:31:52.453Z\",\n            \"updatedAt\": \"2021-10-08T11:31:52.453Z\",\n            \"__v\": 0\n        }\n    ],\n    \"users\": {\n        \"_id\": \"bf0b488327db48d298503e0273543aff\",\n        \"firstName\": \"Favour\",\n        \"lastName\": \"Godwin\",\n        \"email\": \"godwinvalerie3@gmail.com\",\n        \"type\": \"enduser\",\n        \"createdAt\": \"2021-10-08T00:14:34.567Z\",\n        \"updatedAt\": \"2021-10-08T00:14:34.567Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"10087cb0-a908-41b3-871f-ce94e74b414d"},{"name":"Search for Channel","id":"0ac3ae4d-e3d5-498a-9947-37b7239e716d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/room/search/design","urlObject":{"protocol":"http","port":"3000","path":["room","search","design"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"9fe9325c-60b7-4456-b244-3a8e75067e61","name":"Search for Channel","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/room/search/design"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"353"},{"key":"ETag","value":"W/\"161-kfm6sdwpd0s8CALjl8kY09XlTHY\""},{"key":"Date","value":"Fri, 08 Oct 2021 11:36:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"room\": {\n        \"_id\": \"51367feba57a46b2a2aa068e1314f856\",\n        \"userIds\": [\n            \"3ba219a9f5bc444892a6c414822c7a19\"\n        ],\n        \"roomName\": \"Design\",\n        \"description\": \"This is a channel for design discussions\",\n        \"type\": \"enduser-to-admin\",\n        \"chatInitiator\": \"3ba219a9f5bc444892a6c414822c7a19\",\n        \"createdAt\": \"2021-10-07T10:55:42.610Z\",\n        \"updatedAt\": \"2021-10-07T10:55:42.610Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"0ac3ae4d-e3d5-498a-9947-37b7239e716d"},{"name":"Mark all Messages Read","id":"3e34c9d0-022d-46c9-a8f6-55940dfca251","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"url":"http://localhost:3000/room/97e23d6263394ae98b07378331709385/mark-read","urlObject":{"protocol":"http","port":"3000","path":["room","97e23d6263394ae98b07378331709385","mark-read"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b8219898-a090-4a02-acc3-79f5898599f6","name":"Mark all Messages Read","originalRequest":{"method":"PUT","header":[],"url":"http://localhost:3000/room/97e23d6263394ae98b07378331709385/mark-read"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"116"},{"key":"ETag","value":"W/\"74-Oy7lRbkQyVgONT6Eqp9TpfQtssE\""},{"key":"Date","value":"Fri, 08 Oct 2021 11:41:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"acknowledged\": true,\n        \"modifiedCount\": 0,\n        \"upsertedId\": null,\n        \"upsertedCount\": 0,\n        \"matchedCount\": 0\n    }\n}"}],"_postman_id":"3e34c9d0-022d-46c9-a8f6-55940dfca251"}]}