Update current user profile
Update the currently authenticated user’s profile information.
Allows users to modify their personal information including first and last name. Only the fields provided in the request body will be updated. Omitted fields remain unchanged. The user is automatically identified from their authentication credentials.
Context:
- Only first_name and last_name can be updated via this endpoint
- Password field in request body is reserved for future use (not implemented)
- Email, role, status, and organization cannot be changed by users
- Updates are immediate and reflected in database upon success
- Full user profile returned in response with updated values
Behavior:
- Extracts user_id from authenticated user context
- Validates request body fields (min/max length constraints)
- Queries database to verify user exists
- Updates only first_name and last_name if provided
- Persists changes to database with updated_at timestamp
- Returns complete updated user profile
Use Cases:
- User wants to correct misspelled name
- User prefers different name display (nickname vs full name)
- User changes last name after marriage or legal name change
- Profile updates during onboarding or account setup
- Internationalization of name display
Field Update Rules:
- first_name: 1-100 characters if provided, unchanged if null
- last_name: 1-100 characters if provided, unchanged if null
- password: Not currently implemented, reserved for future use
- All other fields (email, role, status): Use admin endpoints to modify
Related Endpoints:
- GET /profile/me - Retrieve current user profile
- PUT /admin/users/ - Admin endpoint to update any user
- POST /auth/change-password - Change password (separate auth flow)
Authorizations
API key authentication. Include your API key in the X-API-Key header as: X-API-Key YOUR_API_KEY
Example:
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Body
Request model for updating the authenticated user's profile information.
All fields are optional. Only provided fields will be updated, allowing partial updates without affecting other user attributes. Omitted fields remain unchanged in the database.
User's first name. Used for display in the UI and in email communications. Must be at least 1 character if provided. Set to null or omit to leave unchanged.
1 - 100"John"
User's last name or family name. Combined with first_name for full name display. Must be at least 1 character if provided. Set to null or omit to leave unchanged.
1 - 100"Doe"
New password for the user account. Note: Password updates are currently not implemented in the API. This field is reserved for future functionality. Password changes should be handled through the authentication service.
8 - 128"MySecureP@ssw0rd123"
Response
User profile updated successfully with new values
User model
org_admin, backoffice, app_user, reviewer, publisher, integration pending, active, inactive