Skip to main content
Avatar endpoints require a signed-in user session. See Authentication for the initial sign-in flow.
Avatar upload is a two-step process: request a presigned upload URL, then upload the file directly to S3. The URL is valid for 10 minutes. After upload, the image is processed to WebP. Confirm with client.updateUser({ confirmAvatar: true }) (PATCH /users/me), or poll until avatarUrl is on the profile.

Step 1: Get Upload URL

contentType is image/jpeg, image/png, image/gif, or image/webp.
Get avatar upload URL.

Step 2: Upload the Image

Upload the raw file bytes directly to the presigned URL. The Content-Type on the S3 PUT must be the type you presigned.

Step 3: Confirm

Confirming is PATCH /users/me with { "confirmAvatar": true }, which is client.updateUser({ confirmAvatar: true }). Retry while the call returns 400 (not processed yet) until avatarUrl is set.
Update username. The same call sets username and removeAvatar. If you prefer not to confirm explicitly, poll Get current user until avatarUrl appears:

Constraints

Removing an Avatar

Same Update username call, with removeAvatar: true.

Error Handling