コンテンツにスキップ

Upload an end-user avatar.

POST
/api/admin/users/{id}/avatar
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/users/example/avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form avatar=@file

Upload and validate an end-user avatar image, store it in R2, and update the user’s picture URL in canonical PII storage.

id
required
string
X-Tenant-Id
string

Tenant selector for multi-tenant admin requests.

Media type multipart/form-data
object
avatar
required

JPEG, PNG, GIF, or WebP file up to 5 MiB.

string format: binary
key
additional properties

User avatar upload response.

Media type application/json
object
success
required
boolean
avatarUrl
required
string format: uri
message
required
string
key
additional properties
Example
{
"success": true,
"avatarUrl": "https://auth.example.com/avatars/user_123.png",
"message": "Avatar uploaded successfully"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}