Skip to content
Update Current User

Update Current User

Update profile information for the authenticated user.

Endpoint

/api/v1/users/current

Method

PUT

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
AuthorizationYesBearer access token: Bearer <access_token>

Request Body

FieldTypeRequiredDescription
display_namestringYesUser display name (max 50 chars)
avatar_urlstringNoURL to user’s profile image
emailstringYesValid email address (max 100 chars)
passwordstringNoOptional 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

CodeHTTP StatusDescription
invalid_params400Missing or invalid request params, headers, or body
invalid_authorization_token401Missing or invalid authorization token
user_not_found404User not found
user_email_already_used409User with the same email already exists
system_error500Internal server error