{"info":{"_postman_id":"135bd963-5297-40c0-a56f-9c414a13ef25","name":"LivePosts – Socket.IO CRUD","description":"<html><head></head><body><p>Socket.IO events for the LivePosts real-time CRUD API.</p>\n<p><strong>Server:</strong> <a href=\"http://localhost:3000\">http://localhost:3000</a></p>\n<p>Each request represents a Socket.IO event.</p>\n<ul>\n<li>Set the connection URL to <code>http://localhost:3000</code></li>\n<li>Use the event name shown in each request</li>\n<li>Paste the example body as the message data</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"45359829","collectionId":"135bd963-5297-40c0-a56f-9c414a13ef25","publishedId":"2sBXqFNhqF","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-04-22T23:51:31.000Z"},"item":[{"name":"1 – Get All Posts","id":"2af6667d-cab1-4509-90f0-e4f951c50a38","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"SOCKETIO","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000","description":"<p><strong>Emit event:</strong> <code>getPosts</code>\n<strong>Payload:</strong> <em>(none)</em></p>\n<p><strong>Listen for:</strong> <code>posts</code>\n<strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  { \"_id\": \"...\", \"title\": \"Hello\", \"content\": \"World\" }\n]\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a352cd92-1749-455f-af5a-eb4604a5be29","name":"posts – example response","originalRequest":{"method":"SOCKETIO","header":[],"url":""},"status":"OK","_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"_id\": \"6631a1f2e4b0a1c2d3e4f5a6\",\n    \"title\": \"First Post\",\n    \"content\": \"Hello from Socket.IO!\"\n  },\n  {\n    \"_id\": \"6631a1f2e4b0a1c2d3e4f5a7\",\n    \"title\": \"Second Post\",\n    \"content\": \"Real-time is awesome.\"\n  }\n]"}],"_postman_id":"2af6667d-cab1-4509-90f0-e4f951c50a38"},{"name":"2 – Create Post","id":"6b02638f-d628-45f1-b38f-2922f063b85c","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"SOCKETIO","header":[],"body":{"mode":"raw","raw":"{\n  \"title\": \"My New Post\",\n  \"content\": \"This is the post content.\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000","description":"<p><strong>Emit event:</strong> <code>createPost</code>\n<strong>Payload:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"title\": \"My New Post\",\n  \"content\": \"This is the post content.\"\n}\n</code></pre>\n<p><strong>Listen for:</strong> <code>postCreated</code> (broadcast to all clients)\n<strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"post created successfully\",\n  \"post\": { \"_id\": \"...\", \"title\": \"My New Post\", \"content\": \"...\" }\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"4e69f6ce-64e9-482b-9a8c-a71c04fea391","name":"postCreated – example response","originalRequest":{"method":"SOCKETIO","header":[],"url":""},"status":"OK","_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"post created successfully\",\n  \"post\": {\n    \"_id\": \"6631a1f2e4b0a1c2d3e4f5a8\",\n    \"title\": \"My New Post\",\n    \"content\": \"This is the post content.\"\n  }\n}"}],"_postman_id":"6b02638f-d628-45f1-b38f-2922f063b85c"},{"name":"3 – Update Post","id":"9b48f72a-2faa-4cfd-b819-eb4055ca4a1b","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"SOCKETIO","header":[],"body":{"mode":"raw","raw":"{\n  \"postId\": \"6631a1f2e4b0a1c2d3e4f5a8\",\n  \"title\": \"Updated Title\",\n  \"content\": \"Updated content goes here.\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000","description":"<p><strong>Emit event:</strong> <code>updatePost</code>\n<strong>Payload:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"postId\": \"&lt;MongoDB _id&gt;\",\n  \"title\": \"Updated Title\",\n  \"content\": \"Updated content goes here.\"\n}\n</code></pre>\n<p><strong>Listen for:</strong> <code>postUpdated</code> (broadcast to all clients)\n<strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"post updated successfully\",\n  \"postId\": \"...\",\n  \"title\": \"Updated Title\",\n  \"content\": \"Updated content goes here.\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"abdf55d6-44a3-44d7-8651-654fe549ae0f","name":"postUpdated – example response","originalRequest":{"method":"SOCKETIO","header":[],"url":""},"status":"OK","_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"post updated successfully\",\n  \"postId\": \"6631a1f2e4b0a1c2d3e4f5a8\",\n  \"title\": \"Updated Title\",\n  \"content\": \"Updated content goes here.\"\n}"}],"_postman_id":"9b48f72a-2faa-4cfd-b819-eb4055ca4a1b"},{"name":"4 – Delete Post","id":"1c099a31-5bb6-495e-b7a3-8431eb66dd8d","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"SOCKETIO","header":[],"body":{"mode":"raw","raw":"\"6631a1f2e4b0a1c2d3e4f5a8\"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000","description":"<p><strong>Emit event:</strong> <code>deletePost</code>\n<strong>Payload:</strong> <code>\"&lt;MongoDB _id&gt;\"</code> <em>(plain string, the post _id)</em></p>\n<p><strong>Listen for:</strong> <code>postDeleted</code> (broadcast to all clients)\n<strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"post deleted successfully\",\n  \"postId\": \"...\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0390fe6e-a513-4f39-9c45-a9f4ec39edf0","name":"postDeleted – example response","originalRequest":{"method":"SOCKETIO","header":[],"url":""},"status":"OK","_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"message\": \"post deleted successfully\",\n  \"postId\": \"6631a1f2e4b0a1c2d3e4f5a8\"\n}"}],"_postman_id":"1c099a31-5bb6-495e-b7a3-8431eb66dd8d"},{"name":"5 – Search Posts","id":"7ac14f9f-190c-4a32-8a8b-53385f8dc66e","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"SOCKETIO","header":[],"body":{"mode":"raw","raw":"\"hello\"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000","description":"<p><strong>Emit event:</strong> <code>searchPosts</code>\n<strong>Payload:</strong> <code>\"&lt;search term&gt;\"</code> <em>(plain string)</em></p>\n<p>Searches both <code>title</code> and <code>content</code> fields (case-insensitive regex).</p>\n<p><strong>Listen for:</strong> <code>searchResults</code> (only sent back to the requesting socket)\n<strong>Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  { \"_id\": \"...\", \"title\": \"Hello World\", \"content\": \"...\" }\n]\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"344885ea-71b7-4029-beab-b673d8e8caba","name":"searchResults – example response","originalRequest":{"method":"SOCKETIO","header":[],"url":""},"status":"OK","_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"_id\": \"6631a1f2e4b0a1c2d3e4f5a6\",\n    \"title\": \"Hello World\",\n    \"content\": \"This matches the search term hello.\"\n  }\n]"}],"_postman_id":"7ac14f9f-190c-4a32-8a8b-53385f8dc66e"}]}