{ "info": { "name": "CrowMate API", "_postman_id": "crowmate-nest-api", "description": "CrowMate Nest backend API — all endpoints organized by resource. After logging in, the token is automatically saved to the `token` collection variable.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "variable": [ { "key": "token", "value": "", "type": "string" } ], "item": [ { "name": "Health", "item": [ { "name": "Health Check", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/health", "host": ["{{baseUrl}}"], "path": ["api", "health"] } } } ] }, { "name": "Auth", "item": [ { "name": "Login", "event": [ { "listen": "test", "script": { "exec": [ "const res = pm.response.json();", "if (res.token) {", " pm.collectionVariables.set('token', res.token);", " pm.test('Token saved', () => pm.expect(res.token).to.be.a('string'));", "}" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [{ "key": "Content-Type", "value": "application/json" }], "body": { "mode": "raw", "raw": "{\n \"email\": \"{{adminEmail}}\",\n \"password\": \"{{adminPassword}}\"\n}" }, "url": { "raw": "{{baseUrl}}/api/auth/login", "host": ["{{baseUrl}}"], "path": ["api", "auth", "login"] } } }, { "name": "Register", "request": { "method": "POST", "header": [{ "key": "Content-Type", "value": "application/json" }], "body": { "mode": "raw", "raw": "{\n \"username\": \"testuser\",\n \"email\": \"testuser@example.com\",\n \"password\": \"password123\"\n}" }, "url": { "raw": "{{baseUrl}}/api/auth/register", "host": ["{{baseUrl}}"], "path": ["api", "auth", "register"] } } }, { "name": "Me", "request": { "method": "GET", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/auth/me", "host": ["{{baseUrl}}"], "path": ["api", "auth", "me"] } } } ] }, { "name": "Users", "item": [ { "name": "List Users (Admin)", "request": { "method": "GET", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/users", "host": ["{{baseUrl}}"], "path": ["api", "users"] } } }, { "name": "Create Staff Account (Admin)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\": \"staffmember\",\n \"email\": \"staff@example.com\",\n \"password\": \"password123\",\n \"role\": \"dev\"\n}" }, "url": { "raw": "{{baseUrl}}/api/users", "host": ["{{baseUrl}}"], "path": ["api", "users"] } } }, { "name": "My Profile", "request": { "method": "GET", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/users/me/profile", "host": ["{{baseUrl}}"], "path": ["api", "users", "me", "profile"] } } }, { "name": "Update My Username", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\": \"newusername\"\n}" }, "url": { "raw": "{{baseUrl}}/api/users/me/username", "host": ["{{baseUrl}}"], "path": ["api", "users", "me", "username"] } } }, { "name": "Update My Password", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"currentPassword\": \"oldpassword\",\n \"newPassword\": \"newpassword123\"\n}" }, "url": { "raw": "{{baseUrl}}/api/users/me/password", "host": ["{{baseUrl}}"], "path": ["api", "users", "me", "password"] } } }, { "name": "Get User by ID (Admin)", "request": { "method": "GET", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/users/:id", "host": ["{{baseUrl}}"], "path": ["api", "users", ":id"], "variable": [{ "key": "id", "value": "USER_ID_HERE" }] } } }, { "name": "Update User Role (Admin)", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"role\": \"dev\",\n \"isAdmin\": false\n}" }, "url": { "raw": "{{baseUrl}}/api/users/:id", "host": ["{{baseUrl}}"], "path": ["api", "users", ":id"], "variable": [{ "key": "id", "value": "USER_ID_HERE" }] } } }, { "name": "Ban User (Admin)", "request": { "method": "POST", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/users/:id/ban", "host": ["{{baseUrl}}"], "path": ["api", "users", ":id", "ban"], "variable": [{ "key": "id", "value": "USER_ID_HERE" }] } } }, { "name": "Unban User (Admin)", "request": { "method": "POST", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/users/:id/unban", "host": ["{{baseUrl}}"], "path": ["api", "users", ":id", "unban"], "variable": [{ "key": "id", "value": "USER_ID_HERE" }] } } } ] }, { "name": "Forum", "item": [ { "name": "Categories", "item": [ { "name": "List Categories", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/forum/categories", "host": ["{{baseUrl}}"], "path": ["api", "forum", "categories"] } } }, { "name": "Create Category (Admin)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"General\",\n \"description\": \"General discussion\",\n \"icon\": \"💬\"\n}" }, "url": { "raw": "{{baseUrl}}/api/forum/categories", "host": ["{{baseUrl}}"], "path": ["api", "forum", "categories"] } } }, { "name": "Update Category (Admin)", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"General Updated\",\n \"description\": \"Updated description\",\n \"icon\": \"🗨️\"\n}" }, "url": { "raw": "{{baseUrl}}/api/forum/categories/:id", "host": ["{{baseUrl}}"], "path": ["api", "forum", "categories", ":id"], "variable": [{ "key": "id", "value": "CATEGORY_ID_HERE" }] } } }, { "name": "Delete Category (Admin)", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/forum/categories/:id", "host": ["{{baseUrl}}"], "path": ["api", "forum", "categories", ":id"], "variable": [{ "key": "id", "value": "CATEGORY_ID_HERE" }] } } } ] }, { "name": "Threads", "item": [ { "name": "List Threads", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/forum/threads?categoryId=&page=1&limit=20", "host": ["{{baseUrl}}"], "path": ["api", "forum", "threads"], "query": [ { "key": "categoryId", "value": "", "description": "Filter by category ID" }, { "key": "page", "value": "1" }, { "key": "limit", "value": "20", "description": "Max 50" } ] } } }, { "name": "Get Thread", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/forum/threads/:id", "host": ["{{baseUrl}}"], "path": ["api", "forum", "threads", ":id"], "variable": [{ "key": "id", "value": "THREAD_ID_HERE" }] } } }, { "name": "Create Thread", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"My thread title\",\n \"content\": \"Thread content here\",\n \"categoryId\": \"CATEGORY_ID_HERE\"\n}" }, "url": { "raw": "{{baseUrl}}/api/forum/threads", "host": ["{{baseUrl}}"], "path": ["api", "forum", "threads"] } } }, { "name": "Update Thread", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Updated title\",\n \"content\": \"Updated content\",\n \"isPinned\": false,\n \"isLocked\": false\n}" }, "url": { "raw": "{{baseUrl}}/api/forum/threads/:id", "host": ["{{baseUrl}}"], "path": ["api", "forum", "threads", ":id"], "variable": [{ "key": "id", "value": "THREAD_ID_HERE" }] } } }, { "name": "Delete Thread (Admin)", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/forum/threads/:id", "host": ["{{baseUrl}}"], "path": ["api", "forum", "threads", ":id"], "variable": [{ "key": "id", "value": "THREAD_ID_HERE" }] } } } ] }, { "name": "Replies", "item": [ { "name": "Post Reply", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"content\": \"My reply content\"\n}" }, "url": { "raw": "{{baseUrl}}/api/forum/threads/:id/replies", "host": ["{{baseUrl}}"], "path": ["api", "forum", "threads", ":id", "replies"], "variable": [{ "key": "id", "value": "THREAD_ID_HERE" }] } } }, { "name": "Delete Reply (Admin)", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/forum/replies/:id", "host": ["{{baseUrl}}"], "path": ["api", "forum", "replies", ":id"], "variable": [{ "key": "id", "value": "REPLY_ID_HERE" }] } } } ] } ] }, { "name": "Bugs", "item": [ { "name": "List Bugs", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/bugs?status=all&severity=all&page=1&limit=20", "host": ["{{baseUrl}}"], "path": ["api", "bugs"], "query": [ { "key": "status", "value": "all", "description": "open | in_progress | resolved | closed | all" }, { "key": "severity", "value": "all", "description": "low | medium | high | critical | all" }, { "key": "assignedTo", "value": "", "description": "userId | unassigned | all", "disabled": true }, { "key": "page", "value": "1" }, { "key": "limit", "value": "20", "description": "Max 50" } ] } } }, { "name": "Get Bug", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/bugs/:id", "host": ["{{baseUrl}}"], "path": ["api", "bugs", ":id"], "variable": [{ "key": "id", "value": "BUG_ID_HERE" }] } } }, { "name": "Submit Bug Report", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Bug title\",\n \"description\": \"Detailed description of the bug\",\n \"stepsToReproduce\": \"1. Do this\\n2. Do that\\n3. See error\",\n \"severity\": \"medium\",\n \"gameVersion\": \"1.0.0\",\n \"screenshotUrl\": \"\"\n}" }, "url": { "raw": "{{baseUrl}}/api/bugs", "host": ["{{baseUrl}}"], "path": ["api", "bugs"] } } }, { "name": "Update Bug (Staff)", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"status\": \"in_progress\",\n \"assignedToId\": null,\n \"severity\": \"high\",\n \"title\": \"Updated bug title\"\n}" }, "url": { "raw": "{{baseUrl}}/api/bugs/:id", "host": ["{{baseUrl}}"], "path": ["api", "bugs", ":id"], "variable": [{ "key": "id", "value": "BUG_ID_HERE" }] } } }, { "name": "Toggle Me Too", "request": { "method": "POST", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/bugs/:id/me-too", "host": ["{{baseUrl}}"], "path": ["api", "bugs", ":id", "me-too"], "variable": [{ "key": "id", "value": "BUG_ID_HERE" }] } } }, { "name": "Add Comment", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"content\": \"This is a public comment on the bug\"\n}" }, "url": { "raw": "{{baseUrl}}/api/bugs/:id/comments", "host": ["{{baseUrl}}"], "path": ["api", "bugs", ":id", "comments"], "variable": [{ "key": "id", "value": "BUG_ID_HERE" }] } } }, { "name": "Delete Comment (Admin)", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/bugs/comments/:id", "host": ["{{baseUrl}}"], "path": ["api", "bugs", "comments", ":id"], "variable": [{ "key": "id", "value": "COMMENT_ID_HERE" }] } } }, { "name": "Add Staff Note (Staff)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"content\": \"Internal staff note — not visible to users\"\n}" }, "url": { "raw": "{{baseUrl}}/api/bugs/:id/notes", "host": ["{{baseUrl}}"], "path": ["api", "bugs", ":id", "notes"], "variable": [{ "key": "id", "value": "BUG_ID_HERE" }] } } }, { "name": "Delete Staff Note (Admin)", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/bugs/notes/:id", "host": ["{{baseUrl}}"], "path": ["api", "bugs", "notes", ":id"], "variable": [{ "key": "id", "value": "NOTE_ID_HERE" }] } } } ] }, { "name": "Events", "item": [ { "name": "List Events", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/events?public=true&page=1&limit=20", "host": ["{{baseUrl}}"], "path": ["api", "events"], "query": [ { "key": "public", "value": "true", "description": "Filter to public events only" }, { "key": "page", "value": "1" }, { "key": "limit", "value": "20" } ] } } }, { "name": "Get Event", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/events/:id", "host": ["{{baseUrl}}"], "path": ["api", "events", ":id"], "variable": [{ "key": "id", "value": "EVENT_ID_HERE" }] } } }, { "name": "Create Announcement (Staff)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"type\": \"announcement\",\n \"title\": \"Big announcement\",\n \"content\": \"Something important happened!\",\n \"isPublic\": true\n}" }, "url": { "raw": "{{baseUrl}}/api/events", "host": ["{{baseUrl}}"], "path": ["api", "events"] } } }, { "name": "Create Poll (Staff)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"type\": \"poll\",\n \"title\": \"Community Poll\",\n \"content\": \"Vote on your favourite feature!\",\n \"isPublic\": true,\n \"poll\": {\n \"question\": \"What should we add next?\",\n \"options\": [\n { \"text\": \"New maps\" },\n { \"text\": \"More characters\" },\n { \"text\": \"Better UI\" }\n ],\n \"isActive\": true,\n \"allowMultipleVotes\": false\n }\n}" }, "url": { "raw": "{{baseUrl}}/api/events", "host": ["{{baseUrl}}"], "path": ["api", "events"] } } }, { "name": "Update Event (Staff)", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Updated title\",\n \"content\": \"Updated content\",\n \"isPublic\": true\n}" }, "url": { "raw": "{{baseUrl}}/api/events/:id", "host": ["{{baseUrl}}"], "path": ["api", "events", ":id"], "variable": [{ "key": "id", "value": "EVENT_ID_HERE" }] } } }, { "name": "Delete Event (Admin)", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/events/:id", "host": ["{{baseUrl}}"], "path": ["api", "events", ":id"], "variable": [{ "key": "id", "value": "EVENT_ID_HERE" }] } } }, { "name": "Vote on Poll", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"optionIds\": [\"OPTION_ID_HERE\"]\n}" }, "url": { "raw": "{{baseUrl}}/api/events/:id/vote", "host": ["{{baseUrl}}"], "path": ["api", "events", ":id", "vote"], "variable": [{ "key": "id", "value": "EVENT_ID_HERE" }] } } }, { "name": "Control Poll (Staff)", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"isActive\": false,\n \"endsAt\": null\n}" }, "url": { "raw": "{{baseUrl}}/api/events/:id/poll", "host": ["{{baseUrl}}"], "path": ["api", "events", ":id", "poll"], "variable": [{ "key": "id", "value": "EVENT_ID_HERE" }] } } } ] }, { "name": "Feed", "item": [ { "name": "List Feed (Staff)", "request": { "method": "GET", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/feed", "host": ["{{baseUrl}}"], "path": ["api", "feed"] } } }, { "name": "Post to Feed (Staff)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"content\": \"Internal staff feed post content\"\n}" }, "url": { "raw": "{{baseUrl}}/api/feed", "host": ["{{baseUrl}}"], "path": ["api", "feed"] } } }, { "name": "Delete Feed Post", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/feed/:id", "host": ["{{baseUrl}}"], "path": ["api", "feed", ":id"], "variable": [{ "key": "id", "value": "POST_ID_HERE" }] } } } ] }, { "name": "Team", "item": [ { "name": "List Team Members", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/team", "host": ["{{baseUrl}}"], "path": ["api", "team"] } } }, { "name": "Create Team Member (Admin)", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"John Doe\",\n \"role\": \"Lead Developer\",\n \"bio\": \"A short bio about this team member.\",\n \"avatarInitials\": \"JD\",\n \"social\": {\n \"twitter\": \"johndoe\",\n \"github\": \"johndoe\"\n }\n}" }, "url": { "raw": "{{baseUrl}}/api/team", "host": ["{{baseUrl}}"], "path": ["api", "team"] } } }, { "name": "Update Team Member (Admin)", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"John Doe\",\n \"role\": \"Senior Developer\",\n \"bio\": \"Updated bio.\",\n \"avatarInitials\": \"JD\",\n \"social\": {\n \"twitter\": \"johndoe\",\n \"github\": \"johndoe\"\n }\n}" }, "url": { "raw": "{{baseUrl}}/api/team/:id", "host": ["{{baseUrl}}"], "path": ["api", "team", ":id"], "variable": [{ "key": "id", "value": "MEMBER_ID_HERE" }] } } }, { "name": "Delete Team Member (Admin)", "request": { "method": "DELETE", "header": [{ "key": "Authorization", "value": "Bearer {{token}}" }], "url": { "raw": "{{baseUrl}}/api/team/:id", "host": ["{{baseUrl}}"], "path": ["api", "team", ":id"], "variable": [{ "key": "id", "value": "MEMBER_ID_HERE" }] } } } ] }, { "name": "Settings", "item": [ { "name": "Get Settings", "request": { "method": "GET", "header": [], "url": { "raw": "{{baseUrl}}/api/settings", "host": ["{{baseUrl}}"], "path": ["api", "settings"] } } }, { "name": "Update Settings (Admin)", "request": { "method": "PATCH", "header": [ { "key": "Authorization", "value": "Bearer {{token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"forumEnabled\": true,\n \"bugsEnabled\": true\n}" }, "url": { "raw": "{{baseUrl}}/api/settings", "host": ["{{baseUrl}}"], "path": ["api", "settings"] } } } ] } ] }