Update current user profile
Auth service
Update Profile
Updates the authenticated user’s profile. Supports both JSON and multipart/form-data. Use multipart/form-data to upload an avatar image along with profile updates. Images larger than 1MB are automatically compressed. Use _clearAvatar: true to remove the avatar.
PATCH
Update current user profile
Updates the authenticated user’s profile including avatar upload. Requires a valid Auth0 access token in theDocumentation Index
Fetch the complete documentation index at: https://docs.handauncle.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header.
This endpoint supports both JSON and multipart/form-data content types:
- JSON: For updating profile fields only
- multipart/form-data: For uploading an avatar image along with profile updates
Request Body (JSON)
All fields are optional. Only include the fields you want to update.| Field | Type | Description |
|---|---|---|
fullName | string | User’s display name (1-120 chars, trimmed) |
preferences | object | UI preferences (merged with existing) |
preferences.language | string | Language code (e.g., “en”, “hi”) |
preferences.theme | string | Theme name (e.g., “dark”, “light”) |
preferences.notifications | boolean | Enable/disable notifications |
_clearAvatar | boolean | Set to true to remove the current avatar |
Request Body (multipart/form-data)
For uploading an avatar image:| Field | Type | Description |
|---|---|---|
avatar | file | Avatar image file (JPEG, PNG, GIF, WebP). Auto-compressed if >1MB. |
data | string | JSON string with profile fields (fullName, preferences, _clearAvatar) |
Example: JSON Request
Example: Upload Avatar
Example: Clear Avatar
Response
Returns the updated profile overview (same format asGET /api/v1/auth/me):
Avatar Upload Details
- Supported formats: JPEG, PNG, GIF, WebP
- Auto-compression: Images larger than 1MB are automatically resized (max 800px) and compressed
- No size limit error: Even large files are accepted and compressed server-side
- Auto-deletion: Previous avatar is automatically deleted when uploading a new one
Notes
- Field merging: Preferences are merged with existing values, not replaced entirely
- Whitespace trimming:
fullNameis automatically trimmed - Cache invalidation: The profile context cache is invalidated when changes are saved
Authorizations
Auth0 access token for registered users.