Update user profile
Update the current user's profile information. All fields are optional - only provided fields will be updated.
**Authentication Required:** Yes - Valid JWT token in Authorization header
**User Identification:** The system supports finding users by ID, email, or phone number from the authentication token.
**Available Fields:**
- **firstName** (string, 1-50 chars): User's first name
- **lastName** (string, 1-50 chars): User's last name
- **gender** (enum): MALE, FEMALE, OTHER
- **birthday** (ISO 8601 date-time): User's birthday
- **nationality** (2-char ISO code): Country code (e.g., US, DE, FR)
- **homeBase** (string, 1-100 chars): User's home location
- **language** (enum): DE, EN, AR
- **appearance** (enum): AUTO, LIGHT, DARK
- **termsAccepted** (boolean): Flag indicating user accepted terms of conditions. When set to true, automatically sets termsAcceptedAt timestamp
- **marketingAccepted** (boolean): Flag indicating user accepted marketing communications. When set to true, automatically sets marketingAcceptedAt timestamp
**Usage:**
1. Generate a test token using the `/auth/generate-test-token` endpoint
2. Include the token in the Authorization header: `Bearer <token>`
3. Send a PATCH request with the fields you want to update
4. Only provided fields will be updated; others remain unchanged
**Validation Rules:**
- firstName/lastName: 1-50 characters
- nationality: Exactly 2 characters (ISO Alpha-2)
- homeBase: 1-100 characters
- birthday: Valid ISO 8601 date-time format
- At least one field must be provided
**Note:** This endpoint requires a valid JWT token. The system will automatically find the user by ID, email, or phone number from the token.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Profile update data - All fields are optional. Only provided fields will be updated.
Response
User profile updated successfully
success
message
data
