List Users
Get paginated list of users with optional filters.Endpoint
Query Parameters
Page number for pagination
Number of users per page (1-100)
Search by name or email
Filter by role:
user, admin, or allFilter by status:
active, inactive, banned, or allResponse
Indicates if the request was successful
Array of user objects
Pagination information
Get User by ID
Get detailed user information by ID.Endpoint
Path Parameters
User’s MongoDB ObjectId
Response Example
Create User
Create a new user (admin can set role).Endpoint
Request Body
User’s email address (must be unique)
User’s full name (2-100 characters)
User’s password (minimum 8 characters)
User role:
user or adminResponse
Indicates if the request was successful
Created user object
Update User
Update user information (name, email, role, status).Endpoint
Path Parameters
User’s MongoDB ObjectId
Request Body
All fields are optional. Only include fields you want to update.User’s full name (2-100 characters)
User’s email address (must be unique)
User role:
user or adminUser status:
active, inactive, or bannedResponse
Indicates if the request was successful
Updated user object
Delete User
Permanently delete a user and all associated data.Endpoint
Path Parameters
User’s MongoDB ObjectId
Response
User Status Values
| Status | Description |
|---|---|
active | User can log in and use the app normally |
inactive | User account is temporarily disabled |
banned | User is permanently banned from the platform |
User Role Values
| Role | Description |
|---|---|
user | Regular user with standard permissions |
admin | Administrator with full access to admin panel |
Notes
- All endpoints require admin authentication
- Email addresses must be unique across all users
- Password changes via admin panel are logged in activity log
- Deleting a user cannot be undone
- Changing a user’s role takes effect immediately