{"info":{"_postman_id":"2ba16a7a-3c7b-4b59-85db-92935d39f9d1","name":"My Social Network","description":"<html><head></head><body><p><strong>My Social Networks API</strong> is a RESTful API designed to manage the core features of a social networking platform.<br>It allows users to register and authenticate, create and join groups, organize events, participate in discussions, share photos, create polls, and manage ticketing for public events.</p>\n<p>The API follows REST principles and uses standard HTTP methods and status codes.<br>Authentication is handled using JSON Web Tokens (JWT) to secure protected routes.</p>\n<h3 id=\"main-features\">Main features</h3>\n<ul>\n<li><p>User authentication (register / login)</p>\n</li>\n<li><p>User profile management</p>\n</li>\n<li><p>Groups creation and membership management</p>\n</li>\n<li><p>Events creation and participation</p>\n</li>\n<li><p>Discussion threads with messages and replies</p>\n</li>\n<li><p>Photo albums linked to events</p>\n</li>\n<li><p>Polls creation and participation</p>\n</li>\n<li><p>Ticketing system for public events</p>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"49047621","collectionId":"2ba16a7a-3c7b-4b59-85db-92935d39f9d1","publishedId":"2sBXc8pPJW","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-06T13:30:55.000Z"},"item":[{"name":"1. Authentification","item":[{"name":"/auth/register","id":"5fbcb78c-bdd1-4147-a92b-f06d7306ed94","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"zain@test.com\",\n  \"password\": \"password123\",\n  \"firstname\": \"Zain\",\n  \"lastname\": \"Mehr\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/auth/register","description":"<p>Create a new user account.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5fbcb78c-bdd1-4147-a92b-f06d7306ed94"},{"name":"/auth/login","id":"cd264a47-6c0a-40dd-bcd2-8b0a90c51b6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"zain@test.com\",\n  \"password\": \"password123\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/auth/login","description":"<p>Authenticate a user and receive a JWT token.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cd264a47-6c0a-40dd-bcd2-8b0a90c51b6a"}],"id":"c80ffe5f-6a98-4b63-a89b-9a01d461ec03","description":"<p><strong>This section covers user authentication, including account registration and login, and provides JSON Web Tokens (JWT) required to access protected endpoints of the API.</strong></p>\n","_postman_id":"c80ffe5f-6a98-4b63-a89b-9a01d461ec03"},{"name":"2. Utilisateurs","item":[{"name":"/users/{user_id}","id":"9711bd2b-a6c8-44f0-97bd-89567a0dd44b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/v1/users/6985e5979b09d35b4e96031a","description":"<p>Get a specific user by their ID.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","users","6985e5979b09d35b4e96031a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9711bd2b-a6c8-44f0-97bd-89567a0dd44b"},{"name":"/me","id":"d26463a1-61a2-484c-8a09-c729f1442110","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/v1/me","description":"<p>Get the authenticated user.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","me"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d26463a1-61a2-484c-8a09-c729f1442110"}],"id":"72ad1500-b1da-4ee0-8025-2e294c3329c9","description":"<p><strong>Routes for managing users.</strong></p>\n","_postman_id":"72ad1500-b1da-4ee0-8025-2e294c3329c9"},{"name":"3. Groupes","item":[{"name":"/groups","id":"10da7aff-1995-4380-adb7-d776f003f0b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"Groupe API\",\n  \"description\": \"Test TP API\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/groups","description":"<p>Create a new group (requires auth). The creator becomes the first admin/member.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","groups"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"10da7aff-1995-4380-adb7-d776f003f0b2"},{"name":"/groups/{group_id}","id":"9c2484e5-35b5-4143-906d-25c3a1a34b01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/v1/groups/6985c47d9b09d35b4e9602ec","description":"<p>Get detailed information for a specific group.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","groups","6985c47d9b09d35b4e9602ec"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c2484e5-35b5-4143-906d-25c3a1a34b01"}],"id":"ea047ebb-7eda-4486-a75e-e92182531a11","description":"<p><strong>Routes for managing groups</strong></p>\n","_postman_id":"ea047ebb-7eda-4486-a75e-e92182531a11"},{"name":"4. Evénements","item":[{"name":"/events","id":"04cf79c9-e444-4f06-a8ea-2336489c5ec8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"Soirée API\",\n  \"startDate\": \"2026-03-01\",\n  \"endDate\": \"2026-03-01\",\n  \"location\": \"Paris\",\n  \"ticketingEnabled\": true\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/events","description":"<p>Create a new event.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","events"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"04cf79c9-e444-4f06-a8ea-2336489c5ec8"},{"name":"/events/{event_id}","id":"2b8f91c4-06d0-4be9-a2a9-c06138422c54","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/v1/events/6985c5519b09d35b4e9602ef","description":"<p>Get detailed information for a specific event.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","events","6985c5519b09d35b4e9602ef"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2b8f91c4-06d0-4be9-a2a9-c06138422c54"}],"id":"ea01eb60-54ed-4881-b842-710129968e48","description":"<p><strong>Routes for creating, managing, and participating in events.</strong></p>\n","_postman_id":"ea01eb60-54ed-4881-b842-710129968e48"},{"name":"5. Threads","item":[{"name":"/threads","id":"b3cc376c-8760-41f2-a9ea-b99627bae85e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"6985c5519b09d35b4e9602ef\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/threads","description":"<p>Create a new thread for a specified event.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","threads"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b3cc376c-8760-41f2-a9ea-b99627bae85e"},{"name":"/threads/{thread_id}/messages","id":"a92d60cf-43e1-4b30-afc0-c35c0b7b7d89","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"text\": \"Bonjour à tous\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/threads/6985c6069b09d35b4e9602f2/messages","description":"<p>Send a message in a specified thread.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","threads","6985c6069b09d35b4e9602f2","messages"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a92d60cf-43e1-4b30-afc0-c35c0b7b7d89"},{"name":"/threads/{thread_id}/messages/{message_id}/replies","id":"59cc04bc-6597-40bd-bd59-aaa951df3439","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"text\": \"Salut !\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/threads/6985c6069b09d35b4e9602f2/messages/6985c64c9b09d35b4e9602f5/replies","description":"<p>Reply to a specfied message in a thread.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","threads","6985c6069b09d35b4e9602f2","messages","6985c64c9b09d35b4e9602f5","replies"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"59cc04bc-6597-40bd-bd59-aaa951df3439"}],"id":"d13f66ca-792d-4890-8596-c8d96c82f6b0","description":"<p>Routes for interacting with event discussion threads and managing messages.</p>\n","_postman_id":"d13f66ca-792d-4890-8596-c8d96c82f6b0"},{"name":"6. Albums","item":[{"name":"/albums","id":"07fda685-b1d8-460e-b6d2-bcc431de6774","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"6985c5519b09d35b4e9602ef\",\n  \"name\": \"Photos de la soirée\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/albums","description":"<p>Create a new albums for an event.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","albums"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"07fda685-b1d8-460e-b6d2-bcc431de6774"},{"name":"/albums/{album_id}/photos","id":"f33cec15-7a1d-41e1-b885-e4a39790ea6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"url\": \"https://example.com/photo.jpg\"\n}\n"},"url":"http://localhost:3000/api/v1/albums/6985c95a9b09d35b4e9602fd/photos","description":"<p>Post a new photo in a specified album.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","albums","6985c95a9b09d35b4e9602fd","photos"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f33cec15-7a1d-41e1-b885-e4a39790ea6a"},{"name":"/albums/{album_id}/photos/{photo_id}/comments","id":"634b9736-0c5f-4dfe-b48c-32a88041a018","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"text\": \"Super photo !\"\n}\n"},"url":"http://localhost:3000/api/v1/albums/6985c95a9b09d35b4e9602fd/photos/6985ca5f9b09d35b4e960300/comments","description":"<p>Add a comment to a photo.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","albums","6985c95a9b09d35b4e9602fd","photos","6985ca5f9b09d35b4e960300","comments"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"634b9736-0c5f-4dfe-b48c-32a88041a018"}],"id":"95b98d41-e17c-4b2f-948f-e43532451091","description":"<p>Routes for managing event photo albums, uploading photos, and commenting.</p>\n","_postman_id":"95b98d41-e17c-4b2f-948f-e43532451091"},{"name":"7. Polls","item":[{"name":"/polls","id":"c90a1b87-be3a-4cf1-82f9-34b53d86e431","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"event\": \"6985c5519b09d35b4e9602ef\",\n  \"title\": \"Repas\",\n  \"questions\": [\n    {\n      \"question\": \"Que mange-t-on ?\",\n      \"options\": [\"Pizza\", \"Pâtes\", \"Burger\"]\n    }\n  ]\n}\n"},"url":"http://localhost:3000/api/v1/polls","description":"<p>Create a new poll.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","polls"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c90a1b87-be3a-4cf1-82f9-34b53d86e431"},{"name":"/polls/{poll_id}/answer","id":"da52c0ba-24a3-4d18-af88-1a6cad24e19a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"choices\": [\n    {\n      \"questionId\": \"6985cb6a9b09d35b4e960308\",\n      \"optionIndex\": 0\n    }\n  ]\n}\n"},"url":"http://localhost:3000/api/v1/polls/6985cb6a9b09d35b4e960307/answer","description":"<p>Submit a vote for a poll.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","polls","6985cb6a9b09d35b4e960307","answer"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"da52c0ba-24a3-4d18-af88-1a6cad24e19a"}],"id":"84f9ff2f-a8de-4f6e-a591-61bb3da1dba3","description":"<p>Routes for creating, managing, and participating in event polls.</p>\n","_postman_id":"84f9ff2f-a8de-4f6e-a591-61bb3da1dba3"},{"name":"8. Tickets","item":[{"name":"/tickets/types","id":"8f882671-aa0c-4629-8cca-c99b4bb2cb30","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"event\": \"6985c5519b09d35b4e9602ef\",\n  \"name\": \"Entrée\",\n  \"amount\": 10,\n  \"quantity\": 100\n}\n"},"url":"http://localhost:3000/api/v1/tickets/types","description":"<p>Add a specified amount of tickets for an event.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","tickets","types"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f882671-aa0c-4629-8cca-c99b4bb2cb30"},{"name":"tickets/buy","id":"6c7ad6df-c4fa-4c8d-b554-d1da8d1ab295","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"event\": \"6985c5519b09d35b4e9602ef\",\n  \"ticketType\": \"6985cdee9b09d35b4e960311\",\n  \"buyer\": {\n    \"firstname\": \"Jean\",\n    \"lastname\": \"Dupont\",\n    \"address\": \"10 rue de Paris\"\n  }\n}\n"},"url":"http://localhost:3000/api/v1/tickets/buy","description":"<p>Purchase a ticket (no need to be authenticated).</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","tickets","buy"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c7ad6df-c4fa-4c8d-b554-d1da8d1ab295"}],"id":"19a787ab-505a-4575-b31e-9e7b92d1a461","description":"<p>Route for managing event ticket type and purchasing tickets.</p>\n","_postman_id":"19a787ab-505a-4575-b31e-9e7b92d1a461"}]}