Update authenticated user profile
PUT/company/users/me
Allows the authenticated user to update their own profile information.
Only updates the fields provided in the request (PATCH semantics).
Objective
Enable users to update their personal data and preferences themselves.
Use Cases
- Update personal data from profile form
- Change language preferences
- Update phone number
- Modify time zone
- Change email (with duplicate validation)
Authentication
- Requires valid JWT (middleware m.isLoged)
- User must be authenticated
- Requires UTC validation (mTools.checkUTC)
Validations
- Dates must be in ISO8601 format (YYYY-MM-DD)
- Phone number must be valid for the country
- Email validated to avoid duplicates
- Data validated with model.validateData()
Request
Responses
- 200
- 400
- 401
- 406
Profile updated successfully
Invalid request. Possible causes:
- Invalid form data (model.validateData)
- Email already exists (USER_ALREADY_EXIST)
- Incorrect date format
Unauthorized (invalid token or insufficient permissions)
Email already exists in the database.