Authentication
User Profile
Get or update the authenticated user profile
GET
User Profile
Get Profile
This endpoint requires authentication. Include the JWT token in the Authorization header.
GET /api/auth/profile
Returns the complete profile data of the authenticated user (without password).Authentication
Required: Bearer token in Authorization headerResponse
Indicates if the request was successful
Human-readable response message
Response data containing user profile
Example Request
cURL
JavaScript
Python
Success Response (200)
Error Responses
401 - Unauthorized (No Token)Update Profile
This endpoint requires authentication. Include the JWT token in the Authorization header.
PUT /api/auth/profile
Allows updating the name and/or email of the authenticated user. Does not allow changing role or status. At least one field must be provided. If updating email, it verifies that it’s not in use by another user.Authentication
Required: Bearer token in Authorization headerRequest Body
User’s new full name (optional if email is provided)
User’s new email address (optional if name is provided, must be valid format)
At least one field (name or email) must be provided
Response
Indicates if the request was successful
Human-readable response message
Response data containing updated user profile
Example Request
cURL
JavaScript
Python
Success Response (200)
Error Responses
400 - No Fields ProvidedUser Profile
