Endpoint
Description
Updates the profile information for a specific user. Users can update their own profiles, while administrators can update any profile. See implementation inserver/src/modules/profiles/profiles.controller.ts:42-57.
Authentication
This endpoint requires Bearer token authentication. Include your access token in the
Authorization header.Path Parameters
The unique identifier of the user whose profile you want to update.Example:
abc123Request Body
All fields are optional. Include only the fields you want to update.User’s email addressExample:
[email protected]User’s full nameExample:
Dr. Jane SmithUser role:
USER or ADMINWhether the user account is activeExample:
trueUser’s date of birth in ISO 8601 format (YYYY-MM-DD)Example:
1985-03-15Whether the user has completed their profile setupExample:
trueExample Request Body
Response
Unique identifier for the user
Updated user’s email address
Updated user’s full name
User role:
USER or ADMINWhether the user account is active
User’s date of birth
Whether the user has completed their profile setup
Timestamp when the profile was created
Success Response (200)
Error Responses
400 Bad Request
401 Unauthorized
404 Not Found
Code Examples
Use Cases
- User completing their profile during onboarding
- Updating contact information
- Admin changing user roles or status
- Marking profile as complete after required fields filled
- Deactivating user accounts
Validation Rules
Fromserver/src/modules/profiles/dto/update-profile.dto.ts:
emailmust be a valid email formatbirth_datemust be a valid ISO 8601 date string (YYYY-MM-DD)is_activemust be a booleanis_profile_completemust be a booleanfull_namemust be a stringrolemust be eitherUSERorADMIN
Related Endpoints
Get One Profile
Retrieve profile information
Get All Profiles
Retrieve all profiles (admin only)