Users
Endpoints
Get Current User Profile
{
"user": {
"_id": "60b7c8b4f9b3c12345678901",
"username": "johndoe",
"email": "john@example.com",
"role": "user",
"firstName": "John",
"lastName": "Doe",
"socialLinks": {
"website": "https://johndoe.com",
"linkedin": "https://linkedin.com/in/johndoe",
"x": "https://x.com/johndoe"
},
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T15:45:00.000Z"
}
}Update Current User Profile
Delete Current User Account
Admin-Only Endpoints
Get All Users
Get User by ID
Delete User by ID
Code Examples
Get Current User Profile
Update User Profile
Admin: Get All Users with Pagination
Complete User Management Class
User Roles and Permissions
Regular User (role: "user")
role: "user")Administrator (role: "admin")
role: "admin")Best Practices
Last updated