{"info":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","description":"<html><head></head><body><p>This API provides the backend functionality for a social networking blog platform. Users can sign up, log in, create posts, comment on posts, bookmark posts, like/unlike posts and comments, and manage their profiles.<br>The API is designed with RESTful principles, and all responses are returned in JSON format.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"34071055","collectionId":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","publishedId":"2sAXxMgu6D","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-07T01:37:39.000Z"},"item":[{"name":"feed","item":[{"name":"{postId}","item":[{"name":"comments","item":[{"name":"{commentId}","item":[{"name":"update comment","id":"62dd9ed1-6c73-44fa-99f4-ec61a2461794","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"content\": \"second comment!!\"\r\n}","options":{"raw":{"language":"json"}}},"url":"/feed/:postId/comments/:commentId","description":"<p>This endpoint is used to update a specific comment on a post.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Body</p>\n<ul>\n<li>content (string, required): The updated content of the comment.</li>\n</ul>\n</li>\n<li><p><code>postId</code> (Route parameter) - The ID of the post that the comment belongs to.</p>\n</li>\n<li><p><code>commentId</code> (Route parameter) - The ID of the comment getting updated.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is in JSON format like the following example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Comment updated successfully\",\n    \"content\": \"second comment!!\"\n}\n\n</code></pre>\n<ul>\n<li><p>Status: 200 OK</p>\n</li>\n<li><p>message (string): A message indicating the status of the update.</p>\n</li>\n<li><p>content (string): The updated content of the comment.</p>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","comments",":commentId"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"},{"type":"any","value":"66fc57e0e4c4099090f8bb0b","key":"commentId"}]}},"response":[],"_postman_id":"62dd9ed1-6c73-44fa-99f4-ec61a2461794"},{"name":"delete comment","id":"63c7ef86-8239-4c09-9fd2-39d9baa8cbc5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"/feed/:postId/comments/:commentId","description":"<p>This endpoint is used to delete a specific comment on a post.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<ul>\n<li><p><code>postId</code> (Route parameter) - The ID of the post that the comment belongs to.</p>\n</li>\n<li><p><code>commentId</code> (Route parameter) - The ID of the comment getting deleted.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request is a 204 status code with no content.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","comments",":commentId"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"},{"type":"any","value":"66fc57e0e4c4099090f8bb0b","key":"commentId"}]}},"response":[],"_postman_id":"63c7ef86-8239-4c09-9fd2-39d9baa8cbc5"},{"name":"get comment likers","id":"abc9f8f3-61ee-4038-9dfe-ef8e46b5fe99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/feed/:postId/comments/:commentId/likes","description":"<p>This endpoint retrieves the list of users who have liked the comment with the specified commentId.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<ul>\n<li><p><code>postId</code> (Route parameter) - The ID of the post that the comment belongs to.</p>\n</li>\n<li><p><code>commentId</code> (Route parameter) - The ID of the comment for which the likes are being retrieved.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code> (string, optional) - A message related to the response.</p>\n</li>\n<li><p><code>users</code> (array) - An array of user objects, each containing the following properties:</p>\n<ul>\n<li><p><code>_id</code> (string) - The unique ID of the user.</p>\n</li>\n<li><p><code>name</code> (string) - The name of the user.</p>\n</li>\n<li><p><code>imageUrl</code> (string) - The URL of the user's profile image.</p>\n</li>\n</ul>\n</li>\n<li><p><code>page</code> (number) - The page number of the response.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Comment likers fetched successfully\",\n    \"users\": [\n        {\n            \"_id\": \"66d4928b01093734bdd34117\",\n            \"name\": \"test11\",\n            \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n        }\n    ],\n    \"page\": 1\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","comments",":commentId","likes"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"},{"type":"any","value":"66fc496fb229c588cfb374c5","key":"commentId"}]}},"response":[],"_postman_id":"abc9f8f3-61ee-4038-9dfe-ef8e46b5fe99"},{"name":"update comment likes","id":"6bdc1ef9-cdb3-4204-aa4d-4b159a5da079","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"action\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"/feed/:postId/comments/:commentId/likes","description":"<p>This endpoint allows you to update the likes for a specific comment. The request body should include a JSON payload with the \"action\" key, indicating the action to be performed on the likes.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li>action (number): Indicates the action to be performed on the likes, 1 incase of like and -1 incase of unlike.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful execution, the endpoint returns a 200 status with a JSON response containing the following fields:</p>\n<ul>\n<li><p>message (string): A message related to the update.</p>\n</li>\n<li><p>likes (number): The updated number of likes for the comment.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Comment liked successfully\",\n    \"likes\": 1\n}\n\n</code></pre>\n<p>If the comment is already liked and a request made to like it, or not liked and a request made to unlike it, the endpoint returns a 409 status (conflict) with a JSON response containing the following fields:</p>\n<ul>\n<li>message (string): A message related to the update.</li>\n</ul>\n<h4 id=\"example-1\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post isn't liked\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","comments",":commentId","likes"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"},{"type":"any","value":"66fc496fb229c588cfb374c5","key":"commentId"}]}},"response":[],"_postman_id":"6bdc1ef9-cdb3-4204-aa4d-4b159a5da079"}],"id":"95fa355d-2017-4ae0-921b-8011f5799281","description":"<p>This folder contains endpoints that uses<code>commentId</code> as a route parameter.</p>\n","_postman_id":"95fa355d-2017-4ae0-921b-8011f5799281","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"get comments","id":"f4ae3603-cf68-4e4f-a8b5-ed8e6aad2abe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/feed/:postId/comments?parentId=66fc496fb229c588cfb374c5","description":"<p>This endpoint retrieves comments for a specific post.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p><code>:postId</code> (path parameter) - The ID of the post for which comments are being retrieved.</p>\n</li>\n<li><p><code>parentId</code> (query parameter) - The ID of the parent comment, passed with a comment ID incase of retrieving this comment replies, Incase of a top level comment it's optional or passed as a null.</p>\n</li>\n<li><p><code>lastId</code>(query parameter): passed to fetch the next comment after the last comment.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p><code>_id</code>: The unique identifier for the comment.</p>\n</li>\n<li><p><code>content</code>: The text content of the comment.</p>\n</li>\n<li><p><code>creationDate</code>: The date and time when the comment was created.</p>\n</li>\n<li><p><code>creatorId</code>: The unique identifier of the user who created the comment.</p>\n</li>\n<li><p><code>postId</code>: The ID of the post to which the comment belongs.</p>\n</li>\n<li><p><code>likes</code>: The number of likes received by the comment.</p>\n</li>\n<li><p><code>parentId</code>: The ID of the parent comment, if the comment is a reply to another comment.</p>\n</li>\n<li><p><code>repliesCount</code>: The count of replies received by the comment.</p>\n</li>\n<li><p><code>creator</code>: An object containing information about the creator of the comment, including their unique identifier, name, and image URL.</p>\n</li>\n<li><p><code>liked</code>: A boolean that indicates whether the user viewing the comment liked the comment or not.</p>\n</li>\n<li><p><code>lastId</code>: The identifier of the last fetched comment, It's used in the pagination system by passing it as a query parameter to fetch more comments.</p>\n</li>\n</ul>\n<p>The response will be in JSON format with the following example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Comments fetched successfully\",\n    \"comments\": [\n        {\n            \"_id\": \"66fec18061dc54d70f6c4e68\",\n            \"content\": \"second comment!!\",\n            \"creationDate\": \"2024-10-03T16:08:32.438Z\",\n            \"creatorId\": \"66d4928b01093734bdd34117\",\n            \"postId\": \"66df9536ec1df7a049c07c6e\",\n            \"likes\": 0,\n            \"parentId\": \"66fc496fb229c588cfb374c5\",\n            \"repliesCount\": 0,\n            \"creator\": {\n                \"_id\": \"66d4928b01093734bdd34117\",\n                \"name\": \"test11\",\n                \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n            },\n            \"liked\": false\n        }\n    ],\n    \"lastId\": \"66fec18061dc54d70f6c4e68\"\n}\n\n</code></pre>\n<p>incase of a top level comment, this is an example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Comments fetched successfully\",\n    \"comments\": [\n        {\n            \"_id\": \"66fc496fb229c588cfb374c5\",\n            \"content\": \"first comment!!\",\n            \"creationDate\": \"2024-10-01T19:11:43.328Z\",\n            \"creatorId\": \"66d4928b01093734bdd34117\",\n            \"postId\": \"66df9536ec1df7a049c07c6e\",\n            \"likes\": 1,\n            \"parentId\": null,\n            \"repliesCount\": 0,\n            \"creator\": {\n                \"_id\": \"66d4928b01093734bdd34117\",\n                \"name\": \"test11\",\n                \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n            },\n            \"liked\": true\n        }\n    ],\n    \"lastId\": \"66fc496fb229c588cfb374c5\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","comments"],"host":[""],"query":[{"key":"parentId","value":"66fc496fb229c588cfb374c5"}],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"f4ae3603-cf68-4e4f-a8b5-ed8e6aad2abe"},{"name":"create comment","id":"041a8bae-1765-4f6e-832a-7582ca12e310","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"content\": \"third comment!!\",\r\n    \"parentId\": \"66fc496fb229c588cfb374c5\"\r\n}","options":{"raw":{"language":"json"}}},"url":"/feed/:postId/comments","description":"<p>This endpoint allows the user to create a new comment on a specific post.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>content</code> (string,): The content of the comment.</p>\n</li>\n<li><p><code>parentId</code> (string): The ID of the parent comment incase of creating a reply on a comment, it's value is null if it's a top level comment.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code> (string): A message related to the response.</p>\n</li>\n<li><p><code>content</code> (string): The content of the created comment.</p>\n</li>\n<li><p><code>creationDate</code> (string): The date of creation of the comment.</p>\n</li>\n<li><p><code>creatorId</code> (string): The ID of the user who created the comment.</p>\n</li>\n<li><p><code>postId</code> (string): The ID of the post the comment belongs to.</p>\n</li>\n<li><p><code>likes</code> (number): The number of likes on the comment.</p>\n</li>\n<li><p><code>_id</code> (string): The unique ID of the comment.</p>\n</li>\n<li><p><code>parentsIds</code> (array): An array of parent comments IDs.</p>\n</li>\n<li><p><code>parentId</code> (string): The ID of the direct parent comment, or null if it's a top level comment.</p>\n</li>\n<li><p><code>repliesCount</code> (number): The count of replies to the comment.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Comment created successfully\",\n    \"content\": \"first comment!!\",\n    \"creationDate\": \"2024-10-01T19:11:43.328Z\",\n    \"creatorId\": \"66d4928b01093734bdd34117\",\n    \"postId\": \"66df9536ec1df7a049c07c6e\",\n    \"likes\": 0,\n    \"_id\": \"66fc496fb229c588cfb374c5\",\n    \"parentsIds\": [],\n    \"parentId\": null,\n    \"repliesCount\": 0\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","comments"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"041a8bae-1765-4f6e-832a-7582ca12e310"}],"id":"8f937a2d-7db0-485a-841b-b81b6cdd20f9","description":"<p>This folder contains endpoints related to comments on posts.</p>\n","_postman_id":"8f937a2d-7db0-485a-841b-b81b6cdd20f9","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"delete post","id":"3bbdb552-866c-42ee-a0eb-2076c5d27ec3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"/feed/:postId","description":"<p>This endpoint is used to delete a specific post.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<ul>\n<li><code>postId</code> (Route parameter) - The ID of the post that is getting deleted.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request is a 204 status code with no content.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"3bbdb552-866c-42ee-a0eb-2076c5d27ec3"},{"name":"update post","id":"c454f3d4-a1cb-4b62-aafe-2231d49ce6a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"title","value":"FirstPost!!","type":"text"},{"key":"content","value":"This is the first post","type":"text"},{"key":"images","type":"file","src":"postman-cloud:///1ef76133-5c19-4530-91ab-7a1b2a3b67a7"},{"key":"tags[]","value":"Sports","type":"text"},{"key":"tags[]","value":"travel","type":"text"}]},"url":"/feed/:postId","description":"<p>This endpoint is used to update a specific post.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><code>postId</code> (Route parameter) - The unique identifier of the post to be retrieved.</li>\n</ul>\n<p>The request should be made with the following form-data parameters:</p>\n<ul>\n<li><p><code>title</code> (text) - The title of the feed post.</p>\n</li>\n<li><p><code>content</code> (text) - The content of the feed post.</p>\n</li>\n<li><p><code>images</code> (files) - The images files for the feed post.</p>\n</li>\n<li><p><code>tags[]</code> (text) - An array of tags for the feed post.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be in JSON format like the following example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post updated successfully\",\n    \"_id\": \"66df9536ec1df7a049c07c6e\",\n    \"title\": \"FirstPost!!\",\n    \"content\": \"This is the first post\",\n    \"imagesUrls\": [\n        \"images\\\\6e72e034-05f4-48cc-b3fc-3eb06a453259-wallpaperflare.com_wallpaper (1).jpg\"\n    ],\n    \"tags\": [\n        \"Sports\",\n        \"travel\"\n    ]\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"c454f3d4-a1cb-4b62-aafe-2231d49ce6a8"},{"name":"get post","id":"d2f9a51a-c8d8-495c-88d9-164686df2915","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/feed/:postId","description":"<p>This endpoint retrieves the details of a specific post identified by the postId parameter.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body parameters are required for this endpoint.</p>\n<ul>\n<li><code>postId</code> (Route parameter) - The unique identifier of the post to be retrieved.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post fetched successfully\",\n    \"_id\": \"66df9536ec1df7a049c07c6e\",\n    \"title\": \"SecondPost!!\",\n    \"content\": \"This is the second post\",\n    \"imagesUrls\": [\n        \"images\\\\09c9baac-4374-4021-a4d1-a479ba3da0d5-STScI-01G7NCYE040TD50H3BPMP4FRS6.png\"\n    ],\n    \"creatorId\": \"66d4928b01093734bdd34117\",\n    \"creationDate\": \"2024-09-10T00:39:18.818Z\",\n    \"tags\": [\n        \"Sports\"\n    ],\n    \"likes\": 2,\n    \"commentsCount\": 3,\n    \"bookmarksCount\": 1,\n    \"creator\": {\n        \"_id\": \"66d4928b01093734bdd34117\",\n        \"name\": \"test11\",\n        \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n    },\n    \"comments\": [\n        {\n            \"_id\": \"66fc496fb229c588cfb374c5\",\n            \"content\": \"first comment!!\",\n            \"creationDate\": \"2024-10-01T19:11:43.328Z\",\n            \"creatorId\": \"66d4928b01093734bdd34117\",\n            \"postId\": \"66df9536ec1df7a049c07c6e\",\n            \"likes\": 1,\n            \"parentId\": null,\n            \"repliesCount\": 2,\n            \"creator\": {\n                \"_id\": \"66d4928b01093734bdd34117\",\n                \"name\": \"test11\",\n                \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n            },\n            \"liked\": true\n        }\n    ],\n    \"lastCommentId\": \"66fc496fb229c588cfb374c5\",\n    \"liked\": true,\n    \"bookmarked\": true\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"d2f9a51a-c8d8-495c-88d9-164686df2915"},{"name":"update post likes","id":"7a1b3446-4952-4688-8287-2b929607aefa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"action\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"/feed/:postId/likes","description":"<p>This endpoint allows you to update the likes for a specific post. The request body should include a JSON payload with the \"action\" key, indicating the action to be performed on the likes.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p>Body</p>\n<ul>\n<li>action (number): Indicates the action to be performed on the likes, 1 incase of like and -1 incase of unlike.</li>\n</ul>\n</li>\n<li><p><code>postId</code> (Route parameter) - The ID of the post for which the likes are being retrieved.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful execution, the endpoint returns a 200 status with a JSON response containing the following fields:</p>\n<ul>\n<li><p>message (string): A message related to the update.</p>\n</li>\n<li><p>likes (number): The updated number of likes for the post.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post liked successfully\",\n    \"likes\": 1\n}\n\n</code></pre>\n<p>If the post is already liked and a request made to like it, or not liked and a request made to unlike it, the endpoint returns a 409 status (conflict) with a JSON response containing the following fields:</p>\n<ul>\n<li>message (string): A message related to the update.</li>\n</ul>\n<h4 id=\"example-1\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post isn't liked\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","likes"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"7a1b3446-4952-4688-8287-2b929607aefa"},{"name":"get post likers","id":"56ef13c3-63a7-4fa1-a652-a022e15eee5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/feed/:postId/likes","description":"<p>This endpoint retrieves the list of users who have liked the post with the specified postId.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<ul>\n<li><code>postId</code> (Route parameter) - The ID of the post for which the likes are being retrieved.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code> (string, optional) - A message related to the response.</p>\n</li>\n<li><p><code>users</code> (array) - An array of user objects, each containing the following properties:</p>\n<ul>\n<li><p><code>_id</code> (string) - The unique ID of the user.</p>\n</li>\n<li><p><code>name</code> (string) - The name of the user.</p>\n</li>\n<li><p><code>imageUrl</code> (string) - The URL of the user's profile image.</p>\n</li>\n</ul>\n</li>\n<li><p><code>page</code> (number) - The page number of the response.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post likers fetched successfully\",\n    \"users\": [\n        {\n            \"_id\": \"66d4928b01093734bdd34117\",\n            \"name\": \"test11\",\n            \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n        },\n        {\n            \"_id\": \"66ea298642cff4b443b36968\",\n            \"name\": \"test3\",\n            \"imageUrl\": \"images\\\\f5bcdb0a-1bc4-448e-b5ff-269c31013a00-IMG_2736.JPG\"\n        }\n    ],\n    \"page\": 1\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed",":postId","likes"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"56ef13c3-63a7-4fa1-a652-a022e15eee5e"}],"id":"3aa95117-2430-4d41-8397-5708af72e063","description":"<p>This folder contains endpoints that uses <code>postId</code> as a route parameter.</p>\n","_postman_id":"3aa95117-2430-4d41-8397-5708af72e063","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"create post","id":"fad0af7e-aca6-4ed9-bad2-4ecfb1416f0b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"title","value":"Second Post!!","type":"text"},{"key":"content","value":"This is the second post.","type":"text"},{"key":"images","type":"file","src":"postman-cloud:///1ef81afe-bae6-46f0-b07c-4c1c56e55204"},{"key":"tags[]","value":"Bussines","type":"text"}]},"url":"/feed","description":"<p>This endpoint allows the user to create a new post.</p>\n<p>The request should be made with the following form-data parameters:</p>\n<ul>\n<li><p><code>title</code> (text): The title of the post.</p>\n</li>\n<li><p><code>content</code> (text): The content of the post.</p>\n</li>\n<li><p><code>images</code> (file): The images related to the post.</p>\n</li>\n<li><p><code>tags[]</code> (text): An array of tags associated with the post.</p>\n</li>\n</ul>\n<h4 id=\"response-example\">Response Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post created successfully!\",\n    \"_id\": \"66feda07b3eac62a947259a5\",\n    \"title\": \"Second Post!!\",\n    \"content\": \"This is the second post.\",\n    \"imagesUrls\": [\n        \"images\\\\09fb3974-4102-424c-ae3d-f37a4dfc8d07-Galactic.jpeg\"\n    ],\n    \"creatorId\": \"66ea293a42cff4b443b36967\",\n    \"creationDate\": \"2024-10-03T17:53:11.393Z\",\n    \"tags\": [\n        \"Bussines\"\n    ],\n    \"likes\": 0,\n    \"commentsCount\": 0,\n    \"bookmarksCount\": 0\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"fad0af7e-aca6-4ed9-bad2-4ecfb1416f0b"},{"name":"get posts","id":"315b1056-114a-4303-b3c2-5aa24494d892","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/feed?tags[]=Travel&tags[]=Sports&following=true","description":"<p>This endpoint retrieves feed posts</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Query Parameters (optional):</p>\n<ul>\n<li><p>tags[] (array): Specifies the tags to filter the feed by.</p>\n</li>\n<li><p>following (boolean): retrieve posts from users that the requester follows only.</p>\n</li>\n<li><p>lastId (string): passed to fetch the next posts after the last post.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response JSON object includes the following properties:</p>\n<ul>\n<li><p>message (string): A message, if any, related to the response.</p>\n</li>\n<li><p>posts (array): An array of post objects, each containing the following properties:</p>\n<ul>\n<li><p>_id (string): The unique identifier of the post.</p>\n</li>\n<li><p>title (string): The title of the post.</p>\n</li>\n<li><p>creatorId (string): The unique identifier of the post creator.</p>\n</li>\n<li><p>creationDate (string): The date of post creation.</p>\n</li>\n<li><p>tags (array): An array of tags associated with the post.</p>\n</li>\n<li><p>likes (number): The count of likes the post has received.</p>\n</li>\n<li><p>commentsCount (number): The count of comments on the post.</p>\n</li>\n<li><p>bookmarksCount (number): The count of bookmarks for the post.</p>\n</li>\n<li><p>creator (object): An object containing details of the post creator, with the following properties:</p>\n<ul>\n<li><p>_id (string): The unique identifier of the creator.</p>\n</li>\n<li><p>name (string): The name of the creator.</p>\n</li>\n<li><p>imageUrl (string): The URL of the creator's image.</p>\n</li>\n</ul>\n</li>\n<li><p>liked (boolean): Indicates whether the current user has liked the post.</p>\n</li>\n<li><p>bookmarked (boolean): Indicates whether the current user has bookmarked the post.</p>\n</li>\n</ul>\n</li>\n<li><p>lastId (string): The identifier of the last fetched post, It's used in the pagination system by passing it as a query parameter to fetch more posts.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Posts fetched successfully\",\n    \"posts\": [\n        {\n            \"_id\": \"66df9536ec1df7a049c07c6e\",\n            \"title\": \"FirstPost!!\",\n            \"creatorId\": \"66d4928b01093734bdd34117\",\n            \"creationDate\": \"2024-09-10T00:39:18.818Z\",\n            \"tags\": [\n                \"Sports\",\n                \"travel\"\n            ],\n            \"likes\": 2,\n            \"commentsCount\": 3,\n            \"bookmarksCount\": 1,\n            \"creator\": {\n                \"_id\": \"66d4928b01093734bdd34117\",\n                \"name\": \"test11\",\n                \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n            },\n            \"liked\": false,\n            \"bookmarked\": false\n        }\n    ],\n    \"lastId\": \"66df9536ec1df7a049c07c6e\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["feed"],"host":[""],"query":[{"key":"tags[]","value":"Travel"},{"key":"tags[]","value":"Sports"},{"key":"following","value":"true"}],"variable":[]}},"response":[],"_postman_id":"315b1056-114a-4303-b3c2-5aa24494d892"}],"id":"4f4784e1-2a13-4bb8-8aef-b08aa3f44e07","description":"<p>This folder contaiins endpoints related to feed posts and comments on them.</p>\n","_postman_id":"4f4784e1-2a13-4bb8-8aef-b08aa3f44e07","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"profile","item":[{"name":"{userId}","item":[{"name":"get profile","id":"697b1f97-ade0-4a1e-b230-16c676b80596","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/profile/:userId","description":"<p>This endpoint retrieves the profile information for a specific user.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<ul>\n<li><code>:userId</code> (path parameter) - The unique identifier of the user whose profile information is to be retrieved.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be in JSON format and will include the following fields:</p>\n<ul>\n<li><p><code>message</code> (string) - A message indicating the outcome of the response.</p>\n</li>\n<li><p><code>_id</code> (string) - The unique identifier of the user.</p>\n</li>\n<li><p><code>name</code> (string) - The name of the user.</p>\n</li>\n<li><p><code>bio</code> (string) - The biography of the user.</p>\n</li>\n<li><p><code>location</code> (string) - The location of the user.</p>\n</li>\n<li><p><code>imageUrl</code> (string) - The URL of the user's profile image.</p>\n</li>\n<li><p><code>creationDate</code> (string) - The date of user's profile creation.</p>\n</li>\n<li><p><code>followingCount</code> (number) - The count of users the current user is following.</p>\n</li>\n<li><p><code>followersCount</code> (number) - The count of followers the current user has.</p>\n</li>\n<li><p><code>posts</code> (array) - An array of user's posts, each containing:</p>\n<ul>\n<li><p><code>_id</code> (string) - The unique identifier of the post.</p>\n</li>\n<li><p><code>title</code> (string) - The title of the post.</p>\n</li>\n<li><p><code>creatorId</code> (string) - The unique identifier of the post creator.</p>\n</li>\n<li><p><code>creationDate</code> (string) - The date of post creation.</p>\n</li>\n<li><p><code>tags</code> (array) - An array of tags associated with the post.</p>\n</li>\n<li><p><code>likes</code> (number) - The count of likes on the post.</p>\n</li>\n<li><p><code>commentsCount</code> (number) - The count of comments on the post.</p>\n</li>\n<li><p><code>bookmarksCount</code> (number) - The count of bookmarks on the post.</p>\n</li>\n<li><p><code>creator</code> (object) - Information about the post creator, including:</p>\n<ul>\n<li><p><code>_id</code> (string) - The unique identifier of the creator.</p>\n</li>\n<li><p><code>name</code> (string) - The name of the creator.</p>\n</li>\n<li><p><code>imageUrl</code> (string) - The URL of the creator's profile image.</p>\n</li>\n</ul>\n</li>\n<li><p><code>liked</code> (boolean) - Indicates if the current user has liked the post.</p>\n</li>\n</ul>\n</li>\n<li><p><code>lastPostId</code> (string) - The unique identifier of the last post, used in the pagination system to fetch the next posts.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User profile retrieved successfully\",\n    \"_id\": \"66d4928b01093734bdd34117\",\n    \"name\": \"test11\",\n    \"bio\": \"updating my bio\",\n    \"location\": \"Cairo\",\n    \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\",\n    \"creationDate\": \"2024-09-01T16:12:59.848Z\",\n    \"followingCount\": 0,\n    \"followersCount\": 2,\n    \"posts\": [\n        {\n            \"_id\": \"66df9536ec1df7a049c07c6e\",\n            \"title\": \"FirstPost!!\",\n            \"creatorId\": \"66d4928b01093734bdd34117\",\n            \"creationDate\": \"2024-09-10T00:39:18.818Z\",\n            \"tags\": [\n                \"Sports\",\n                \"Travel\"\n            ],\n            \"likes\": 3,\n            \"commentsCount\": 3,\n            \"bookmarksCount\": 1,\n            \"creator\": {\n                \"_id\": \"66d4928b01093734bdd34117\",\n                \"name\": \"test11\",\n                \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n            },\n            \"liked\": true\n        }\n    ],\n    \"lastPostId\": \"66df9536ec1df7a049c07c6e\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId"],"host":[""],"query":[],"variable":[{"type":"any","value":"66d4928b01093734bdd34117","key":"userId"}]}},"response":[],"_postman_id":"697b1f97-ade0-4a1e-b230-16c676b80596"},{"name":"get account data","id":"29a4afb2-a4b1-4e36-8bf8-422a334bffc7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/profile/:userId/account","description":"<p>This endpoint retrieves the account information for the account owner, only him can request this data, so only an authorized user is allowed to make this request.</p>\n<h2 id=\"request\">Request</h2>\n<ul>\n<li><code>userId</code>(path parameter) - The unique identifier of the user.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><p><code>message</code> (string) - A message related to the response.</p>\n</li>\n<li><p><code>_id</code> (string) - The unique identifier of the user account.</p>\n</li>\n<li><p><code>email</code> (string) - The email associated with the user account.</p>\n</li>\n<li><p><code>name</code> (string) - The name of the user.</p>\n</li>\n<li><p><code>bio</code> (string) - The biography of the user.</p>\n</li>\n<li><p><code>location</code> (string) - The location of the user.</p>\n</li>\n<li><p><code>imageUrl</code> (string) - The URL of the user's profile image.</p>\n</li>\n<li><p><code>creationDate</code> (string) - The date when the user account was created.</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User data fetched successfully\",\n    \"_id\": \"66ea293a42cff4b443b36967\",\n    \"email\": \"yerig64140@asaud.com\",\n    \"name\": \"omar2\",\n    \"bio\": \"Testing\",\n    \"location\": \"Egypt\",\n    \"imageUrl\": null,\n    \"creationDate\": \"2024-09-18T01:13:30.770Z\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","account"],"host":[""],"query":[],"variable":[{"type":"any","value":"66ea293a42cff4b443b36967","key":"userId"}]}},"response":[],"_postman_id":"29a4afb2-a4b1-4e36-8bf8-422a334bffc7"},{"name":"update account data","id":"9803b60c-0b48-49e4-97c7-1aa7c762f209","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"testing","type":"text"},{"key":"location","value":"","type":"text"},{"key":"bio","value":"new bio!","type":"text"},{"key":"image","type":"file","src":"postman-cloud:///1ef81afe-bae6-46f0-b07c-4c1c56e55204"}]},"url":"/profile/:userId/account","description":"<p>This endpoint allows the user to update their account details.</p>\n<p>If the user didn't update all the fields, the old value of the remaining fields must be passed with the updated ones.</p>\n<h4 id=\"request-body-parameters\">Request Body Parameters</h4>\n<ul>\n<li><p><code>name</code> (text): The name of the user.</p>\n</li>\n<li><p><code>location</code> (text, may be empty): The location of the user.</p>\n</li>\n<li><p><code>bio</code> (text, may be empty): A brief biography of the user.</p>\n</li>\n<li><p><code>image</code> (file, optional): An image representing the user.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code>: A message indicating the status of the request.</p>\n</li>\n<li><p><code>_id</code>: The unique identifier of the user's account.</p>\n</li>\n<li><p><code>name</code>: The updated name of the user.</p>\n</li>\n<li><p><code>bio</code>: The updated biography of the user.</p>\n</li>\n<li><p><code>location</code>: The updated location of the user.</p>\n</li>\n<li><p><code>imageUrl</code>: The URL of the updated user image.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User data updated successfully\",\n    \"_id\": \"66ea293a42cff4b443b36967\",\n    \"name\": \"testing\",\n    \"bio\": \"new bio!\",\n    \"location\": \"\",\n    \"imageUrl\": \"images\\\\6892f81d-2622-407c-86b4-c6a37fb826b0-Galactic.jpeg\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","account"],"host":[""],"query":[],"variable":[{"type":"any","value":"66ea293a42cff4b443b36967","key":"userId"}]}},"response":[],"_postman_id":"9803b60c-0b48-49e4-97c7-1aa7c762f209"},{"name":"delete account","id":"2c8d90cd-1180-475c-ba70-0b602a05e1f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"/profile/:userId/account","description":"<p>This endpoint is used to delete the account associated with a specific user.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request is a 204 status code with empty body.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","account"],"host":[""],"query":[],"variable":[{"type":"any","value":"66ea293a42cff4b443b36967","key":"userId"}]}},"response":[],"_postman_id":"2c8d90cd-1180-475c-ba70-0b602a05e1f1"},{"name":"get account posts","id":"8576e4ac-c141-44aa-a55e-062940632003","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/profile/:userId/posts","description":"<p>This endpoint retrieves the posts associated with a specific user profile.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response will be a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code> (string): A message related to the response.</p>\n</li>\n<li><p><code>posts</code> (array): An array of liked posts, where each post object contains the following properties:</p>\n<ul>\n<li><p><code>_id</code> (string): The unique identifier of the post.</p>\n</li>\n<li><p><code>title</code> (string): The title of the post.</p>\n</li>\n<li><p><code>creatorId</code> (string): The unique identifier of the post creator.</p>\n</li>\n<li><p><code>creationDate</code> (string): The date of post creation.</p>\n</li>\n<li><p><code>tags</code> (array): An array of tags associated with the post.</p>\n</li>\n<li><p><code>likes</code> (number): The count of likes received by the post.</p>\n</li>\n<li><p><code>commentsCount</code> (number): The count of comments on the post.</p>\n</li>\n<li><p><code>bookmarksCount</code> (number): The count of bookmarks received by the post.</p>\n</li>\n<li><p><code>creator</code> (object): An object containing details of the post creator with the following properties:</p>\n<ul>\n<li><p><code>_id</code> (string): The unique identifier of the creator.</p>\n</li>\n<li><p><code>name</code> (string): The name of the creator.</p>\n</li>\n<li><p><code>imageUrl</code> (string): The URL of the creator's image.</p>\n</li>\n</ul>\n</li>\n<li><p><code>liked</code> (boolean): Indicates if the post is liked by the user.</p>\n</li>\n<li><p><code>bookmarked</code> (boolean): Indicates if the post is bookmarked by the user.</p>\n</li>\n</ul>\n</li>\n<li><p><code>lastId</code> (string): The identifier of the last fetched post, It's used in the pagination system by passing it as a query parameter to fetch more posts.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User posts fetched successfully\",\n    \"posts\": [\n        {\n            \"_id\": \"66feda07b3eac62a947259a5\",\n            \"title\": \"Second Post!!\",\n            \"creatorId\": \"66ea293a42cff4b443b36967\",\n            \"creationDate\": \"2024-10-03T17:53:11.393Z\",\n            \"tags\": [\n                \"Business\"\n            ],\n            \"likes\": 0,\n            \"commentsCount\": 0,\n            \"bookmarksCount\": 0,\n            \"creator\": {\n                \"_id\": \"66ea293a42cff4b443b36967\",\n                \"name\": \"omar2\",\n                \"imageUrl\": null\n            },\n            \"liked\": false,\n            \"bookmarked\": false\n        }\n    ],\n    \"lastId\": \"66feda07b3eac62a947259a5\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","posts"],"host":[""],"query":[],"variable":[{"type":"any","value":"66ea293a42cff4b443b36967","key":"userId"}]}},"response":[],"_postman_id":"8576e4ac-c141-44aa-a55e-062940632003"},{"name":"get account likes","id":"9c7cba86-cf4d-469c-890d-0e6bf57a1c11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/profile/:userId/likes","description":"<p>This endpoint retrieves the liked posts for a specific user.</p>\n<p>Note that it can only get fetched for the account owner, no one else can see the user liked posts.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response will be a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code> (string): A message related to the response.</p>\n</li>\n<li><p><code>posts</code> (array): An array of liked posts, where each post object contains the following properties:</p>\n<ul>\n<li><p><code>_id</code> (string): The unique identifier of the post.</p>\n</li>\n<li><p><code>title</code> (string): The title of the post.</p>\n</li>\n<li><p><code>creatorId</code> (string): The unique identifier of the post creator.</p>\n</li>\n<li><p><code>creationDate</code> (string): The date of post creation.</p>\n</li>\n<li><p><code>tags</code> (array): An array of tags associated with the post.</p>\n</li>\n<li><p><code>likes</code> (number): The count of likes received by the post.</p>\n</li>\n<li><p><code>commentsCount</code> (number): The count of comments on the post.</p>\n</li>\n<li><p><code>bookmarksCount</code> (number): The count of bookmarks received by the post.</p>\n</li>\n<li><p><code>creator</code> (object): An object containing details of the post creator with the following properties:</p>\n<ul>\n<li><p><code>_id</code> (string): The unique identifier of the creator.</p>\n</li>\n<li><p><code>name</code> (string): The name of the creator.</p>\n</li>\n<li><p><code>imageUrl</code> (string): The URL of the creator's image.</p>\n</li>\n</ul>\n</li>\n<li><p><code>liked</code> (boolean): Indicates if the post is liked by the user.</p>\n</li>\n<li><p><code>bookmarked</code> (boolean): Indicates if the post is bookmarked by the user.</p>\n</li>\n</ul>\n</li>\n<li><p><code>page</code> (number): The page number of the response, used in the pagination system and passed as a query parameter to fetch the next liked posts page.</p>\n</li>\n<li><p><code>totalLikes</code> (number): The total count of liked posts by the user.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User liked posts fetched successfully\",\n    \"posts\": [\n        {\n            \"_id\": \"66df9536ec1df7a049c07c6e\",\n            \"title\": \"FirstPost!!\",\n            \"creatorId\": \"66d4928b01093734bdd34117\",\n            \"creationDate\": \"2024-09-10T00:39:18.818Z\",\n            \"tags\": [\n                \"Sports\",\n                \"Travel\"\n            ],\n            \"likes\": 3,\n            \"commentsCount\": 3,\n            \"bookmarksCount\": 1,\n            \"creator\": {\n                \"_id\": \"66d4928b01093734bdd34117\",\n                \"name\": \"test11\",\n                \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n            },\n            \"liked\": true,\n            \"bookmarked\": false\n        }\n    ],\n    \"page\": 1,\n    \"totalLikes\": 1\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","likes"],"host":[""],"query":[],"variable":[{"type":"any","value":"66ea293a42cff4b443b36967","key":"userId"}]}},"response":[],"_postman_id":"9c7cba86-cf4d-469c-890d-0e6bf57a1c11"},{"name":"get account following","id":"b5bfb33b-1e7b-4d34-9357-51e0e7e7da59","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/profile/:userId/following","description":"<p>This endpoint retrieves the following list for a specific user.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p>No request body is required.</p>\n</li>\n<li><p><code>userId</code> route parameter to identify the user.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful execution, the endpoint returns a status code of 200 and a JSON response with the following fields:</p>\n<ul>\n<li><p><code>message</code>: (string) A message related to the update.</p>\n</li>\n<li><p><code>users</code>: Array of the users in the following list, containing some information about them.</p>\n</li>\n<li><p><code>page</code>: The current page of results</p>\n</li>\n</ul>\n<h4 id=\"example\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Following list fetched successfully\",\n    \"users\": [\n        {\n            \"_id\": \"66d4928b01093734bdd34117\",\n            \"name\": \"test11\",\n            \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n        },\n        {\n            \"_id\": \"66ea293a42cff4b443b36967\",\n            \"name\": \"omar2\",\n            \"imageUrl\": null\n        }\n    ],\n    \"page\": 1\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","following"],"host":[""],"query":[],"variable":[{"type":"any","value":"66ea298642cff4b443b36968","key":"userId"}]}},"response":[],"_postman_id":"b5bfb33b-1e7b-4d34-9357-51e0e7e7da59"},{"name":"get account followers","id":"0a484ff3-af78-4aa0-a268-1aab6b30b2e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/profile/:userId/followers","description":"<p>This endpoint retrieves the list of followers for a specific user.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p>No request body is required.</p>\n</li>\n<li><p><code>userId</code> route parameter to identify the user.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful execution, the endpoint returns a status code of 200 and a JSON response with the following fields:</p>\n<ul>\n<li><p><code>message</code>: (string) A message related to the update.</p>\n</li>\n<li><p><code>users</code>: Array of the users in the followers list,containing some information about them..</p>\n</li>\n<li><p><code>page</code>: The current page of results</p>\n</li>\n</ul>\n<h4 id=\"example\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Followers list fetched successfully\",\n    \"users\": [\n        {\n            \"_id\": \"66ea298642cff4b443b36968\",\n            \"name\": \"test3\",\n            \"imageUrl\": \"images\\\\f5bcdb0a-1bc4-448e-b5ff-269c31013a00-IMG_2736.JPG\"\n        }\n    ],\n    \"page\": 1\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","followers"],"host":[""],"query":[],"variable":[{"type":"any","value":"66d4928b01093734bdd34117","key":"userId"}]}},"response":[],"_postman_id":"0a484ff3-af78-4aa0-a268-1aab6b30b2e0"},{"name":"update user following list","id":"29e8442b-eba7-41e8-8432-cb0ec658060d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"followedId\": \"66ea293a42cff4b443b36967\",\r\n    \"action\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"/profile/:userId/following","description":"<p>This endpoint is used to update the following list of a user. The request body should include the \"followedId\" of the user being followed and the \"action\" to be performed.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p><strong>Body</strong></p>\n<ul>\n<li><p><code>followedId</code>: (string) The ID of the user to be followed.</p>\n</li>\n<li><p><code>action</code>: (number) The action to be performed (e.g., 0 for follow, 1 for unfollow).</p>\n</li>\n</ul>\n</li>\n<li><p><code>userId</code>: Route parameter to identify the user.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful execution, the endpoint returns a status code of 200 and a JSON response with the following fields:</p>\n<ul>\n<li><p><code>message</code>: (string) A message related to the update.</p>\n</li>\n<li><p><code>userFollowingCount</code>: (number) The updated following count of the requesting user.</p>\n</li>\n<li><p><code>followedUserFollowersCount</code>: (number) The updated count of followers for the followed user.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User followed successfully\",\n    \"userFollowingCount\": 2,\n    \"followedUserFollowersCount\": 1\n}\n\n</code></pre>\n<p>If the user is already followed and a request made to follow him, or not followed and a request made to unfollow him, the endpoint returns a 409 status(conflict) with a JSON response containing the following fields:</p>\n<ul>\n<li>message (string): A message related to the update.</li>\n</ul>\n<h4 id=\"example-1\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Already following this user\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["profile",":userId","following"],"host":[""],"query":[],"variable":[{"type":"any","value":"66ea298642cff4b443b36968","key":"userId"}]}},"response":[],"_postman_id":"29e8442b-eba7-41e8-8432-cb0ec658060d"}],"id":"298aa233-99c8-4191-8b74-8bf7ad6f8ad4","description":"<p>This folder contains endpoints that uses <code>userId</code> as a route parameter.</p>\n","_postman_id":"298aa233-99c8-4191-8b74-8bf7ad6f8ad4","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}}],"id":"dc6e5b81-d565-46e9-8275-ac2a6a256470","description":"<p>This folder contains endpoints related to user profile.</p>\n","_postman_id":"dc6e5b81-d565-46e9-8275-ac2a6a256470","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"bookmarks","item":[{"name":"{postId}","item":[{"name":"remove bookmark","id":"14bb89de-6cf9-4bc4-9e9f-0b74e66735db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"/bookmarks/:postId","description":"<p>This endpoint is used to remove a post from bookmarks list.</p>\n<h4 id=\"response\">Response</h4>\n<p>Upon successfull execution, The response for this request returns a JSON object with status of 200 and the following properties:</p>\n<ul>\n<li><p><code>message</code> (string): A message indicating the result of the operation.</p>\n</li>\n<li><p><code>bookmarksCount</code> (number): The updated count of bookmarks after the deletion.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post removed from bookmarks successfully\",\n    \"bookmarksCount\": 0\n}\n\n</code></pre>\n<p>If the post isn't bookmarked before sending this request, A response with status 409(conflict) and a JSON object with the following properties is returned:</p>\n<ul>\n<li><code>message</code> (string): A message indicating the result of the operation.</li>\n</ul>\n<h4 id=\"example-1\"><strong>Example</strong>:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post isn't bookmarked\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["bookmarks",":postId"],"host":[""],"query":[],"variable":[{"type":"any","value":"66df9536ec1df7a049c07c6e","key":"postId"}]}},"response":[],"_postman_id":"14bb89de-6cf9-4bc4-9e9f-0b74e66735db"}],"id":"d6a8b883-875e-4ea0-9b32-4922400a3ab2","description":"<p>This folder contains endpoints that uses <code>postId</code> as a route parameter.</p>\n","_postman_id":"d6a8b883-875e-4ea0-9b32-4922400a3ab2","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"add bookmark","id":"26cf8c4b-4c90-4dd9-8233-774078e70450","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"postId\": \"66df9536ec1df7a049c07c6e\"\r\n}","options":{"raw":{"language":"json"}}},"url":"/bookmarks","description":"<p>This endpoint allows the user to bookmark a post</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Body:</p>\n<ul>\n<li><code>postId</code> (string, required): The ID of the post to be bookmarked.</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon successfull execution, The response for this request returns a JSON object with status of 200 and the following properties:</p>\n<ul>\n<li><p><code>message</code> (string): A message related to the bookmark action.</p>\n</li>\n<li><p><code>bookmarksCount</code> (integer): The updated count of bookmarks after the action.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post added to bookmarks successfully\",\n    \"bookmarksCount\": 1\n}\n\n</code></pre>\n<p>If the post is already bookmarked before sending this request, A response with status 409(conflict) and a JSON object with the following properties is returned:</p>\n<ul>\n<li><code>message</code> (string): A message indicating the result of the operation.</li>\n</ul>\n<h4 id=\"example-1\"><strong>Example</strong>:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Post already bookmarked\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["bookmarks"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"26cf8c4b-4c90-4dd9-8233-774078e70450"},{"name":"get bookmarks","id":"60ba1609-e080-4e0c-a1f4-a2817c1f2dfe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/bookmarks","description":"<p>This endpoint is used to retrieve the list of user bookmarks.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li>No request body is required</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon a successful request, the server will respond with a status code of 200 and a JSON object in the following format:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User bookmarks fetched successfully\",\n    \"posts\": [\n        {\n            \"_id\": \"66df9536ec1df7a049c07c6e\",\n            \"title\": \"SecondPost!!\",\n            \"creatorId\": \"66d4928b01093734bdd34117\",\n            \"creationDate\": \"2024-09-10T00:39:18.818Z\",\n            \"tags\": [\n                \"Sports\"\n            ],\n            \"likes\": 2,\n            \"commentsCount\": 0,\n            \"bookmarksCount\": 1,\n            \"creator\": {\n                \"_id\": \"66d4928b01093734bdd34117\",\n                \"name\": \"test11\",\n                \"imageUrl\": \"images\\\\d4387c84-f375-40e8-8799-7946c130d817-8515ri-I_Will_Be_Back__I_Promise-RHWRqNs.jpg\"\n            },\n            \"liked\": true,\n            \"bookmarked\": true\n        }\n    ],\n    \"page\": 1,\n    \"totalBookmarks\": 1\n}\n\n</code></pre>\n<p>The <code>posts</code> array contains objects containing some information about the bookmarks, including their ID, title, creator ID, creation date, tags, likes, comments count, bookmarks count, creator information, liked and bookmarked boolenas that indicates if the post is liked or bookmarked by the user. The <code>page</code> parameter indicates the current page of results, and <code>totalBookmarks</code> represents the total number of bookmarked posts.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["bookmarks"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"60ba1609-e080-4e0c-a1f4-a2817c1f2dfe"}],"id":"704e7097-58a1-4942-be2a-a8a79940d08d","description":"<p>This folder contains endpoints related to user bookmarks.</p>\n","_postman_id":"704e7097-58a1-4942-be2a-a8a79940d08d","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"auth","item":[{"name":"signup","id":"14e5436b-5299-46a7-8c0f-39b1d8d6bb7b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"email","value":"omar1@kwalah.com","type":"text"},{"key":"password","value":"Oo12345678*","type":"text"},{"key":"confirmationPassword","value":"Oo12345678*","type":"text"},{"key":"name","value":"testtest","type":"text"},{"key":"location","value":"Egypt","type":"text"},{"key":"bio","value":"Testing","type":"text"},{"key":"image","type":"file","src":"postman-cloud:///1ef76133-5c19-4530-91ab-7a1b2a3b67a7"}]},"url":"/signup","description":"<p>This endpoint is used to create a new user account for signing up.</p>\n<h4 id=\"multi-part-form-data-parameters\">multi-part form data Parameters</h4>\n<ul>\n<li><p><code>email</code> (text)</p>\n</li>\n<li><p><code>password</code> (text)</p>\n</li>\n<li><p><code>confirmationPassword</code> (text)</p>\n</li>\n<li><p><code>name</code> (text)</p>\n</li>\n<li><p><code>location</code> (text, may be empty string)</p>\n</li>\n<li><p><code>bio</code> (text, may be empty string)</p>\n</li>\n<li><p><code>image</code> (file, optional)</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code> (string)</p>\n</li>\n<li><p><code>_id</code> (string)</p>\n</li>\n<li><p><code>email</code> (string)</p>\n</li>\n<li><p><code>name</code> (string)</p>\n</li>\n<li><p><code>bio</code> (string)</p>\n</li>\n<li><p><code>location</code> (string)</p>\n</li>\n<li><p><code>imageUrl</code> (string)</p>\n</li>\n</ul>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User signed up successfully\",\n    \"_id\": \"66eb5ef18d3d8963a87e14f3\",\n    \"email\": \"omar1@kwalah.com\",\n    \"name\": \"testtest\",\n    \"bio\": \"Testing\",\n    \"location\": \"Egypt\",\n    \"imageUrl\": \"images\\\\c40e105b-2c94-4162-a1c6-9f9be2ca9b93-wallpaperflare.com_wallpaper (1).jpg\"\n}\n\n</code></pre>\n<p>If any validation error happens, A response with status 422 and a JSON object with the following properties:</p>\n<ul>\n<li><p><code>message</code> (string)</p>\n</li>\n<li><p><code>errors</code> (array of error objects)</p>\n</li>\n</ul>\n<h4 id=\"example-1\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Invalid data\",\n    \"errors\": [\n        {\n            \"type\": \"field\",\n            \"value\": \"omar1@kwalah.com\",\n            \"msg\": \"Email already used\",\n            \"path\": \"email\",\n            \"location\": \"body\"\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"path":["signup"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"14e5436b-5299-46a7-8c0f-39b1d8d6bb7b"},{"name":"login","event":[{"listen":"test","script":{"id":"30fd8751-2844-46ee-bbae-42ed756d332a","exec":["const responseJson = pm.response.json();\r","const {token} = responseJson;\r","pm.environment.set('jwt', token);\r","pm.environment.set('csrfToken',pm.cookies.get('csrfToken'));"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"0ae520f6-a934-4ef8-bf36-32241b6b6c54","exec":[""],"type":"text/javascript","packages":{}}}],"id":"431b0e68-19b4-4208-91f2-d2224b93e4b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"lawil30987@kwalah.com\",\r\n    \"password\":\"Oo12345678*\"\r\n}","options":{"raw":{"language":"json"}}},"url":"/login","description":"<p>This endpoint is used to authenticate a user by providing their email and password.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>email</code> (string, required): The email of the user.</p>\n</li>\n<li><p><code>password</code> (string, required): The password of the user.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon successful execution, the endpoint returns a 200 status with a JSON response containing the following fields:</p>\n<ul>\n<li><p><code>message</code> (string): A message indicating the result of the login attempt.</p>\n</li>\n<li><p><code>token</code> (string): A JWT for authenticating future requests.</p>\n</li>\n<li><p><code>userId</code> (string): The unique identifier of the authenticated user.</p>\n</li>\n</ul>\n<h4 id=\"example\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User logged in successfully\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NmQ0OTI4YjAxMDkzNzM0YmRkMzQxMTciLCJpYXQiOjE3MjY3MDE4MjEsImV4cCI6MTcyNjcwMjcyMX0.hxn8Bqx9qS6an8CIRAw9afH-ySv7Li7Tj7EmS_-rExE\",\n    \"userId\": \"66d4928b01093734bdd34117\"\n}\n\n</code></pre>\n<p>If validation error happens, the endpoint returns a 422 status with a JSON response containing the following fields:</p>\n<ul>\n<li><code>message</code> (string): A message indicating the result of the login attempt.</li>\n</ul>\n<h4 id=\"example-1\">Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Invalid Email or password\"\n}\n\n</code></pre>\n","urlObject":{"path":["login"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"431b0e68-19b4-4208-91f2-d2224b93e4b3"},{"name":"refresh token","event":[{"listen":"test","script":{"id":"4f5a5c35-fee0-4f93-b823-18a64e5bc345","exec":["const responseJson = pm.response.json();\r","const {token} = responseJson;\r","pm.environment.set('jwt', token);\r","pm.environment.set('csrfToken',pm.cookies.get('csrfToken'));"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"c75836eb-f138-48b9-aa1d-a51bc83b0614","exec":["pm.request.headers.add({key: 'CSRF-TOKEN',value: pm.environment.get('csrfToken')});"],"type":"text/javascript","packages":{}}}],"id":"2d101575-c42d-4ace-8b02-a221ebdf5719","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"url":"/refresh-token","description":"<p>This endpoint is used to refresh the authentication token.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li>No request body is required for this endpoint.</li>\n</ul>\n<h4 id=\"headers\"><strong>Headers</strong></h4>\n<ul>\n<li><code>CSRF-TOKEN</code>: The value of <code>csrfToken</code> cookie.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p><code>message</code> (string): A message indicating the status of the token refresh.</p>\n</li>\n<li><p><code>token</code> (string): The new JWT authentication token generated.</p>\n</li>\n</ul>\n","urlObject":{"path":["refresh-token"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"2d101575-c42d-4ace-8b02-a221ebdf5719"},{"name":"logout","id":"8f347e16-0827-44cf-a45e-00cb9af88e75","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"/logout","description":"<p>This endpoint is used to log out the user.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li>No request body is required for this endpoint.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><strong>message</strong> (string): A message indicating the result of the logout operation.</li>\n</ul>\n<p>Example Response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User logged out successfully\"\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["logout"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"8f347e16-0827-44cf-a45e-00cb9af88e75"}],"id":"5c6dbc6e-f4f5-42c8-b64e-e178b0eb199f","description":"<p>This folder contains endpoints related to user authentication.</p>\n","_postman_id":"5c6dbc6e-f4f5-42c8-b64e-e178b0eb199f","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}}},{"name":"get image","id":"a2a6b97a-c4d9-45b2-b1a6-4345aed348b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/images/:imageName","description":"<p>The endpoint retrieves the image with the specified image name.</p>\n<h3 id=\"response\">Response</h3>\n<p>The response returns the requested image.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":true,"source":{"_postman_id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","id":"9f9175d4-daf6-41b1-92f4-ddd7c4009555","name":"Social Networking Blog API","type":"collection"}},"urlObject":{"path":["images",":imageName"],"host":[""],"query":[],"variable":[{"type":"any","value":"a7faf755-0f2b-4a73-bef1-f316f2c23941-wallpaperflare.com_wallpaper (1).jpg","key":"imageName"}]}},"response":[],"_postman_id":"a2a6b97a-c4d9-45b2-b1a6-4345aed348b4"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]}},"event":[{"listen":"prerequest","script":{"id":"f6375800-7940-411d-8e14-586150451e98","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"792174ed-fdad-4227-9bbb-263828131315","type":"text/javascript","packages":{},"exec":[""]}}],"variable":[{"key":"baseUrl","value":"","type":"string"}]}