{"info":{"_postman_id":"ef5a482f-c53f-4b22-955a-59b8d46c15ed","name":"Feedback 2.0","description":"<html><head></head><body><p>Welcome to the API documentation for the Anonymous Feedback Web Application!\nThis API enables the collection of anonymous feedback from end-users through a secure and privacy-focused process. Here's a step-by-step overview of how the application works:</p>\n<ol>\n<li><strong>Admin Account Management:</strong> Admins can create and manage their accounts to utilize the feedback collection features.</li>\n<li><strong>Topic Creation:</strong> Admins define specific topics for which they want to gather feedback from invited users.</li>\n<li><strong>User Invitation (CSV Upload):</strong> For a chosen topic, admins upload a CSV file containing a list of invitees with their (optional) names, <strong>required</strong> email addresses, and the <strong>required</strong> <code>topicId</code>.</li>\n<li><strong>Token Generation:</strong> Once the email list is saved for a topic, admins can generate unique, random tokens for each invited user. These tokens are crucial for anonymous verification.</li>\n<li><strong>Invitation Distribution (External):</strong> The application facilitates the sending of invitation emails (this part might be handled outside the scope of <em>your</em> API, but it's important context). These emails contain the user's unique token.</li>\n<li><strong>End-User Login (via API):</strong> End-users utilize their <strong>email</strong> and the provided <strong>token</strong> to log in through the API. Upon successful login, they receive a <code>tokenId</code> and <code>topicId</code>.</li>\n<li><strong>Anonymous Feedback Submission (via API):</strong> Using the received <code>tokenId</code> and <code>topicId</code>, authenticated end-users can submit their feedback anonymously through the API. <strong>Crucially, no email address is associated with the submitted feedback or the tokens within the system, ensuring complete anonymity.</strong></li>\n<li><strong>Admin Feedback Access:</strong> Admins can view the submitted feedback categorized by <code>topicId</code>, without any ability to trace the feedback back to individual email addres</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"38176982","collectionId":"ef5a482f-c53f-4b22-955a-59b8d46c15ed","publishedId":"2sB2j1gXe1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-04-27T07:23:42.000Z"},"item":[{"name":"test","id":"1cd381ad-a896-4613-9484-32143c70128e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/","description":"<p><strong>Simple get request to check/verify if the backend is alive.</strong></p>\n","urlObject":{"protocol":"http","port":"5000","path":[""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"d720e3e0-4f97-4cd8-ba53-8ebc395d49a6","name":"test resopnse","originalRequest":{"method":"GET","header":[],"url":"http://localhost:5000/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"40","enabled":true},{"key":"ETag","value":"W/\"28-gM1p3JVEQEDBluOTvZsBaJZ/Dz0\"","enabled":true},{"key":"Date","value":"Sun, 20 Apr 2025 19:31:37 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Hello world\"\n}"}],"_postman_id":"1cd381ad-a896-4613-9484-32143c70128e"},{"name":"create an admin account","id":"42cb3aa5-b0a8-4812-bace-f18ea12fc70a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Prashant Swaroop\",\r\n    \"email\":\"admin@gmail.com\",\r\n    \"password\":\"Adminhu@001\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/auth/createAccount","description":"<h3 id=\"post-startfragmentauthcreateaccountendfragment\">POST /StartFragment/auth/createAccountEndFragment</h3>\n<p><strong>Description:</strong><br />Endpoint to create a new administrator account. All fields are mandatory for successful registration.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["auth","createAccount"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b084000c-19ef-4be8-a958-f02aa04e5590","name":"success response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \r\n    \"email\":\"admin@gmail.com\",\r\n    \"password\":\"Adminhu@001\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"128","enabled":true},{"key":"ETag","value":"W/\"80-RUkGmHo+Y9AdaH9h/neKgbqw6WQ\"","enabled":true},{"key":"Date","value":"Sun, 20 Apr 2025 19:33:58 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Admin User Created Successfully\",\n    \"data\": {\n        \"name\": \"Prashant Swaroop\",\n        \"email\": \"admin@gmail.com\",\n        \"id\": 4\n    }\n}"}],"_postman_id":"42cb3aa5-b0a8-4812-bace-f18ea12fc70a"},{"name":"login","id":"e89a1fad-e98d-4305-8447-1a3d5c08c6ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"admin@gmail.com\",\r\n    \"password\":\"Adminhu@001\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/auth/login","description":"<h3 id=\"post-authlogin\">POST /auth/login</h3>\n<p><strong>Description:</strong>\nEndpoint to log in an existing administrator and receive access and refresh tokens.</p>\n<p><strong>Key Points:</strong></p>\n<ul>\n<li>Upon successful login, you will receive an <strong>access token</strong> in the JSON response body.</li>\n<li>A <strong>refresh token</strong> will be provided in the <code>Set-Cookie</code> header as an <code>HttpOnly</code> cookie named <code>refreshToken</code>. This token is used to obtain new access tokens without requiring the user to log in again.</li>\n</ul>\n<p><strong>Request Body:</strong></p>\n<p>```json\n{\n  \"email\": \"<a href=\"mailto:admin@example.com\">admin@example.com</a>\",\n  \"password\": \"yourpassword\"\n}</p>\n","urlObject":{"protocol":"http","port":"5000","path":["auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ce1a0a17-598e-41b4-9ced-5ad2f68da78d","name":"login res","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"admin@gmail.com\",\r\n    \"password\":\"Adminhu@001\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Set-Cookie","value":"refreshToken=f3d382ac-516f-4ffb-86f7-de16b3505370; Max-Age=86400; Path=/; Expires=Mon, 21 Apr 2025 19:40:21 GMT; HttpOnly; SameSite=Strict","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"293","enabled":true},{"key":"ETag","value":"W/\"125-Gy7HoeCV96pP3HqLtKvvOOCFq5c\"","enabled":true},{"key":"Date","value":"Sun, 20 Apr 2025 19:40:21 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Logged in successfully\",\n    \"accessToken\": \"{{vault:json-web-token}}\"\n}"}],"_postman_id":"e89a1fad-e98d-4305-8447-1a3d5c08c6ee"},{"name":"logout","id":"688a02e1-57bd-4bbf-87f8-760af42a443d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"admin@gmail.com\",\r\n    \"password\":\"Adminhu@001\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/auth/logout","description":"<p><strong>Description:</strong></p>\n<ul>\n<li><p>Use this <code>POST</code> request to log out the current administrator.</p>\n</li>\n<li><p><strong>Requires:</strong> The <code>refreshToken</code> to be included in the <code>Cookie</code> header of the request.</p>\n</li>\n<li><p><strong>Outcome:</strong> Upon successful logout, the <code>refreshToken</code> will be invalidated.</p>\n</li>\n<li><p><strong>Result:</strong> The administrator will need to log in again to access protected resources.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"5000","path":["auth","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a29b3a5a-c0ce-4d69-9625-8dc77cb2456e","name":"logout","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"admin@gmail.com\",\r\n    \"password\":\"Adminhu@001\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/auth/logout"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Set-Cookie","value":"refreshToken=; Max-Age=86400; Path=/; Expires=Mon, 21 Apr 2025 19:43:32 GMT; HttpOnly; SameSite=Strict","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"52","enabled":true},{"key":"ETag","value":"W/\"34-RTw5tHxjaaqEcEVbesn1aQCzRls\"","enabled":true},{"key":"Date","value":"Sun, 20 Apr 2025 19:43:32 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Logged out successfully\"\n}"}],"_postman_id":"688a02e1-57bd-4bbf-87f8-760af42a443d"},{"name":"create A topic","id":"b3cdb6e4-5564-4916-9d2b-8cf0861531d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{vault:authorization-secret}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"Mobile App Performance Feedback\",\r\n    \"description\": \"We have recently updated our mobile app to enhance performance and add new features. Please share your thoughts on the app's speed, usability, and any issues you've encountered.\"\r\n  }","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/topic/createTopic","description":"<p><strong>Description:</strong><br />Endpoint to create a new feedback topic.</p>\n<p><strong>Authentication:</strong></p>\n<ul>\n<li><p>Requires a valid <strong>Bearer Token</strong> or <strong>Authorization Token</strong> to be present in the request headers.</p>\n</li>\n<li><p>If no valid token is provided, the request will be rejected with an authentication error</p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"5000","path":["topic","createTopic"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"5d2a7dbe-b812-4794-ad05-02cd32bf425f","name":"topic response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n        \"title\": \"Website Redesign Feedback\",\r\n        \"description\": \"Our website has undergone a major redesign to improve user experience. We would love to hear your feedback on the new layout and features.\"\r\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/topic/createTopic"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"313","enabled":true},{"key":"ETag","value":"W/\"139-30FaSSRXjMvs56fHIOSZyIcG0ek\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 13:58:42 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"topic created successfully\",\n    \"data\": {\n        \"id\": 6,\n        \"title\": \"Website Redesign Feedback\",\n        \"description\": \"Our website has undergone a major redesign to improve user experience. We would love to hear your feedback on the new layout and features.\",\n        \"createdAt\": \"2025-04-21T13:58:42.582Z\",\n        \"adminId\": 4\n    }\n}"},{"id":"2cbbdd98-157d-4bed-b319-00ef402ca006","name":"another example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"Mobile App Performance Feedback\",\r\n    \"description\": \"We have recently updated our mobile app to enhance performance and add new features. Please share your thoughts on the app's speed, usability, and any issues you've encountered.\"\r\n  }","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/topic/createTopic"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"358","enabled":true},{"key":"ETag","value":"W/\"166-hwtAX93IzoIcvgxzasTVdHQIW3o\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 18:32:14 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"topic created successfully\",\n    \"data\": {\n        \"id\": 7,\n        \"title\": \"Mobile App Performance Feedback\",\n        \"description\": \"We have recently updated our mobile app to enhance performance and add new features. Please share your thoughts on the app's speed, usability, and any issues you've encountered.\",\n        \"createdAt\": \"2025-04-21T18:32:14.275Z\",\n        \"adminId\": 4\n    }\n}"}],"_postman_id":"b3cdb6e4-5564-4916-9d2b-8cf0861531d9"},{"name":"upload n generate tokens","id":"95abd7b9-95b5-4db1-abc7-39a7b6247d2e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{vault:authorization-secret}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","uuid":"7cafc02e-8b15-4fe1-aebc-6a2ae58b9fda","src":"/C:/Users/nishant swaroop/Desktop/testingCsv.csv"}]},"url":"http://localhost:5000/email/uploadFile/7","description":"<p><strong>Description:</strong>\nThis critical endpoint allows administrators to upload a list of users (via CSV or plain text representing CSV data) who are invited to provide feedback for a specific topic.</p>\n<p><strong>Authentication:</strong></p>\n<ul>\n<li>Requires a valid <strong>Bearer Token</strong> or <strong>Authorization Token</strong> to be present in the request headers.</li>\n<li>If no valid token is provided, the request will be rejected with an authentication error.</li>\n</ul>\n<p><strong>Path Parameter:</strong></p>\n<ul>\n<li><code>{topicId}</code> (integer, <strong>required</strong>): The ID of the topic for which these email addresses are being invited to provide feedback.</li>\n</ul>\n<p><strong>Request Body (multipart/form-data):</strong></p>\n<ul>\n<li><code>file</code> (file, <strong>required</strong>): The file containing the list of users to invite.<ul>\n<li><strong>Accepted File Types:</strong> <code>.csv</code> (Comma Separated Values) and <code>.txt</code> (plain text representing CSV values).</li>\n<li><strong>CSV/Text File Format:</strong> The file <strong>must</strong> adhere to the following column order in each row: <code>name</code>, <code>email</code>, <code>topicId</code>.<ul>\n<li><code>name</code> (string, optional): The name of the user.</li>\n<li><code>email</code> (string, <strong>required</strong>): The email address of the user to be invited.</li>\n<li><code>topicId</code> (integer, <strong>required</strong>): The ID of the topic for which this user is being invited (should match the <code>{topicId}</code> in the path).</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<p><strong>Important Notes:</strong></p>\n<ul>\n<li><strong>Token Requirement:</strong> A valid authentication token is mandatory to access this endpoint.</li>\n<li><strong>File Upload:</strong> The user list must be uploaded as a file with the field name <code>file</code> in a <code>multipart/form-data</code> request.</li>\n<li><strong>Accepted Formats:</strong> Only CSV (<code>.csv</code>) and plain text files representing CSV data (<code>.txt</code>) are accepted.</li>\n<li><strong>CSV Structure:</strong> The uploaded file <strong>must</strong> follow the specified column order (<code>name</code>, <code>email</code>, <code>topicId</code>). Ensure the headers (if present) match this order or are omitted if the file contains only data rows. The <code>topicId</code> in the file <strong>must</strong> correspond to the <code>{topicId}</code> provided in the URL path.</li>\n</ul>\n","urlObject":{"protocol":"http","port":"5000","path":["email","uploadFile","7"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"dfa7a144-2c76-46b7-a450-b011bbfb2be3","name":"expired access token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","uuid":"7cafc02e-8b15-4fe1-aebc-6a2ae58b9fda","src":"/C:/Users/nishant swaroop/Desktop/testingCsv.csv"}]},"url":"http://localhost:5000/email/uploadFile/6"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"54","enabled":true},{"key":"ETag","value":"W/\"36-Y37pfUY7dMV6OWiDREbzXdtIY6k\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 14:51:39 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"access token is expired.\"\n}"},{"id":"166e984b-a789-4464-b1df-1e21da225093","name":"EMAIL SAVED SUCCESSFULLY","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","uuid":"7cafc02e-8b15-4fe1-aebc-6a2ae58b9fda","src":"/C:/Users/nishant swaroop/Desktop/testingCsv.csv"}]},"url":"http://localhost:5000/email/uploadFile/6"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"86","enabled":true},{"key":"ETag","value":"W/\"56-eSIPhvGS27SBhOC/yxuQKP9qyZ0\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 14:57:46 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Emails and Tokens are successfully added to database 🥳\"\n}"},{"id":"bb2cccb0-ada8-4df8-bb5f-2e1bfe4ba070","name":"upload n generate tokens","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","uuid":"7cafc02e-8b15-4fe1-aebc-6a2ae58b9fda","src":"/C:/Users/nishant swaroop/Desktop/testingCsv.csv"}]},"url":"http://localhost:5000/email/uploadFile/7"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"86","enabled":true},{"key":"ETag","value":"W/\"56-eSIPhvGS27SBhOC/yxuQKP9qyZ0\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 18:35:39 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Emails and Tokens are successfully added to database 🥳\"\n}"}],"_postman_id":"95abd7b9-95b5-4db1-abc7-39a7b6247d2e"},{"name":"refreshAccessToken","id":"99ac2803-5e7b-49aa-87ac-8702213fc6cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{vault:authorization-secret}}"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:5000/auth/refresh-token","description":"<p><strong>Description:</strong><br />This endpoint is used to obtain a new access token when the current one has expired.</p>\n<p><strong>Authentication:</strong><br />* Requires a valid `refreshToken` to be present in the `Cookie` header of the request.<br />* If a valid `refreshToken` is found, a new `accessToken` will be issued.<br />* If no `refreshToken` is found or if it is invalid or expired, the request will be rejected.</p>\n<p><strong>Request Headers:</strong></p>\n<p>* `Cookie`: Must contain the `refreshToken` cookie obtained during login</p>\n","urlObject":{"protocol":"http","port":"5000","path":["auth","refresh-token"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a1559914-404b-4885-bdcf-42b466362736","name":"success refresh token","originalRequest":{"method":"POST","header":[],"url":"http://localhost:5000/auth/refresh-token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"299","enabled":true},{"key":"ETag","value":"W/\"12b-bVfcrBm6C2azEApuowCxYSlOvfA\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 14:54:55 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Token generated successfully\",\n    \"accessToken\": \"{{vault:json-web-token}}\"\n}"}],"_postman_id":"99ac2803-5e7b-49aa-87ac-8702213fc6cb"},{"name":"send Emails","id":"aea65831-c96c-4ed1-904d-224c2c6585e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{vault:authorization-secret}}"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:5000/email/sendEmails/7","description":"<p><strong>Description:</strong><br />This endpoint triggers the sending of invitation emails to all the email addresses that have been previously uploaded for a specific feedback topic.</p>\n<p><strong>Authentication:</strong></p>\n<ul>\n<li><p>Requires a valid <strong>Bearer Token</strong> or <strong>Authorization Token</strong> to be present in the request headers.</p>\n</li>\n<li><p>If no valid token is provided, the request will be rejected with an authentication error.</p>\n</li>\n</ul>\n<p><strong>Path Parameter:</strong></p>\n<ul>\n<li><code>{topicId}</code> (integer, <strong>required</strong>): The ID of the topic for which invitation emails should be sent.</li>\n</ul>\n<p><strong>Request Body:</strong><br />(No request body is typically required for this action, as it operates on the emails already associated with the specified <code>topicId</code>.)</p>\n","urlObject":{"protocol":"http","port":"5000","path":["email","sendEmails","7"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"5213ddf8-29d9-48e5-a37f-cb7d9121ff0a","name":"successfully emails are sent","originalRequest":{"method":"POST","header":[],"url":"http://localhost:5000/email/sendEmails/6"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"236","enabled":true},{"key":"ETag","value":"W/\"ec-qdSFXhTKRMcvPITztuLWU2ufKEA\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 15:03:35 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Emails processed successfully.\",\n    \"results\": [\n        {\n            \"email\": \"mrprashantswaroop@gmail.com\",\n            \"status\": \"Sent\"\n        },\n        {\n            \"email\": \"guptaapratima650@gmail.com\",\n            \"status\": \"Sent\"\n        },\n        {\n            \"email\": \"swaroop.untrack@gmail.com\",\n            \"status\": \"Sent\"\n        }\n    ]\n}"},{"id":"d143303e-e78b-4fba-985e-2c8a7f5cb72b","name":"send Emails another example","originalRequest":{"method":"POST","header":[],"url":"http://localhost:5000/email/sendEmails/7"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"181","enabled":true},{"key":"ETag","value":"W/\"b5-y8wkzllGBnEHCofDWxwyfFE7P4w\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 18:36:44 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Emails processed successfully.\",\n    \"results\": [\n        {\n            \"email\": \"mrprashantswaroop@gmail.com\",\n            \"status\": \"Sent\"\n        },\n        {\n            \"email\": \"swaroop.untrack@gmail.com\",\n            \"status\": \"Sent\"\n        }\n    ]\n}"}],"_postman_id":"aea65831-c96c-4ed1-904d-224c2c6585e9"},{"name":"login feedback user","id":"3466bdb1-971e-4a18-95d0-6e1434676863","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"mrprashantswaroop@gmail.com\",\r\n    \"token\":\"fbfa4f1c7886fa28ceee8ef1a3cf6ba7\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/token/loginUser","description":"<p><strong>Description:</strong><br />This endpoint allows end-users to verify their invitation using their email address and the unique token they received.<br />Successful verification will grant them access to submit feedback for the associated topic.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["token","loginUser"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"4f257842-7ca3-490c-9af0-fa0cc565de9b","name":"login feedback user","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"mrprashantswaroop@gmail.com\",\r\n    \"token\":\"db4acb76a0813d607fc433eb3186ebaf\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/token/loginUser"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"75","enabled":true},{"key":"ETag","value":"W/\"4b-V9VazJUTLSNXHM9LOrN++WAx+e0\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 18:19:27 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Logged in successfully\",\n    \"tokenId\": 5,\n    \"topicId\": 6\n}"},{"id":"d45ca89a-49b4-4ead-aa40-10267e723983","name":"token already used response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"mrprashantswaroop@gmail.com\",\r\n    \"token\":\"db4acb76a0813d607fc433eb3186ebaf\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/token/loginUser"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"77","enabled":true},{"key":"ETag","value":"W/\"4d-I8mKFOagRbI/d5QyEh/WNcsTy9Y\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 18:26:00 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Token has already been used to submit feedback.\"\n}"}],"_postman_id":"3466bdb1-971e-4a18-95d0-6e1434676863"},{"name":"submit feedback enduser","id":"10374f84-6be8-452a-a5e5-72591abfc561","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"tokenId\": 8,\r\n    \"topicId\": 7,\r\n     \"rating\": 7,\r\n    \"review\": \"The updated mobile app is definitely an improvement. The new features are useful, and the overall speed has increased. However, I've noticed a few bugs, particularly with the notification system. Sometimes, notifications are delayed or don't appear at all. Additionally, the app occasionally crashes when switching between tabs. Overall, it's a step in the right direction, but there's still room for improvement.\"\r\n  \r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/feedback/createFeedback","description":"<p><strong>Description:</strong><br />This endpoint allows verified end-users to submit their feedback for a specific topic. The <code>tokenId</code> and <code>topicId</code> obtained during the verification process are required to ensure the feedback is associated with the correct invitation.</p>\n<p><strong>Authentication:</strong></p>\n<ul>\n<li>Requires a valid <code>tokenId</code> and <code>topicId</code> to be included in the request body. These are obtained after successful verification via the <code>/api/user/verify</code> endpoint.</li>\n</ul>\n","urlObject":{"protocol":"http","port":"5000","path":["feedback","createFeedback"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a6c27378-0b36-4aae-b0a7-f42cc831e382","name":"feedback submitted successfully","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n      \"tokenId\": 5,\r\n    \"topicId\": 6,\r\n    \"rating\": 8,\r\n    \"review\": \"The new website design is much cleaner and easier to navigate. I especially like the improved search functionality. However, the loading time could be faster.\"\r\n  \r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/feedback/createFeedback"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"93","enabled":true},{"key":"ETag","value":"W/\"5d-yI2vS91/O/qe66jT7qPypgokXks\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 18:25:42 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"You feedback is submitted and token is used. thanks for feedback\"\n}"},{"id":"ab9d0244-8195-4eb3-813e-915bb59b7303","name":"success response for same user email","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"tokenId\": 8,\r\n    \"topicId\": 7,\r\n     \"rating\": 7,\r\n    \"review\": \"The updated mobile app is definitely an improvement. The new features are useful, and the overall speed has increased. However, I've noticed a few bugs, particularly with the notification system. Sometimes, notifications are delayed or don't appear at all. Additionally, the app occasionally crashes when switching between tabs. Overall, it's a step in the right direction, but there's still room for improvement.\"\r\n  \r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/feedback/createFeedback"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express","enabled":true},{"key":"Access-Control-Allow-Origin","value":"*","enabled":true},{"key":"Content-Type","value":"application/json; charset=utf-8","enabled":true},{"key":"Content-Length","value":"93","enabled":true},{"key":"ETag","value":"W/\"5d-yI2vS91/O/qe66jT7qPypgokXks\"","enabled":true},{"key":"Date","value":"Mon, 21 Apr 2025 18:40:52 GMT","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"Keep-Alive","value":"timeout=5","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"You feedback is submitted and token is used. thanks for feedback\"\n}"}],"_postman_id":"10374f84-6be8-452a-a5e5-72591abfc561"}]}