Update Current User
Update profile information for the authenticated user.
Endpoint
/api/v1/users/currentMethod
PUT
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
Authorization | Yes | Bearer access token: Bearer <access_token> |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | Yes | User display name (max 50 chars) |
avatar_url | string | No | URL to user’s profile image |
email | string | Yes | Valid email address (max 100 chars) |
password | string | No | Optional new password (min 8 chars). Leave empty to keep current password. |
When updating optional fields like
avatar_url, provide an empty string or null to remove the existing value. The password field will retain its current value if left empty.Examples
curl --request PUT \
--url https://auth.roled.id/api/v1/users/current \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJo...' \
--header 'Content-Type: application/json' \
--data '{
"display_name": "Alice Smith",
"avatar_url": null,
"email": "alice.smith@example.com",
"password": "NewPassword123!"
}'Error Codes
| Code | HTTP Status | Description |
|---|---|---|
invalid_params | 400 | Missing or invalid request params, headers, or body |
invalid_authorization_token | 401 | Missing or invalid authorization token |
user_not_found | 404 | User not found |
user_email_already_used | 409 | User with the same email already exists |
system_error | 500 | Internal server error |