Update User Profile
PUT/auth/profile
Allows the authenticated user to update their personal information. Typical Flow:
- The user modifies their data in the interface
- The frontend sends the updated fields with the JWT token
- The server validates the token and received data
- Updates only the provided fields in the database
- Returns the complete updated profile Updateable Fields:
- User's name and last name
- Email (must be unique in the system)
- Country of residence
- Tax identification number (Tax ID) Usage Examples:
- User updates their name after a legal change
- Correction of erroneous email upon registration
- Updating tax information for invoicing
- Changing country due to relocation Validations:
- Email must have a valid format
- Email must be unique (not used by another user)
- Name and last name cannot be empty if provided
- Tax ID must comply with the format of the specified country Important Notes:
- Only the fields sent are updated (partial update)
- The user's role cannot be changed through this endpoint
- Email change requires re-verification
- An audit trail of changes is recorded
Request
Responses
- 200
- 400
- 401
Profile updated successfully
Validation error
Unauthorized - Invalid or missing authentication