---
title: "Set a user's avatar"
method: PUT
path: "/admin/users/{userId}/avatar"
tags: ["Admin"]
---

# Set a user's avatar

`PUT /admin/users/{userId}/avatar`

## Request

- Base URL: `https://cloud.kaneo.app/api`
- URL: `https://cloud.kaneo.app/api/admin/users/{userId}/avatar`
- Auth: HTTP bearer

Store a base64 encoded avatar (PNG, JPEG, or WebP, up to 512KB) for the user and make it their profile picture. Not available when the identity provider manages the user's picture.

## Path parameters

- `userId` string, required

## Request body

- object
  - `contentType` string, required: One of image/png, image/jpeg, or image/webp.
  - `data` string, required: Base64 encoded image bytes.

## Response `200`

The new picture

- AdminUserAvatar
  - `image` string, required

## Other responses

- `400`: Unsupported, invalid, or oversized image
- `401`: Missing or invalid credentials
- `403`: Missing instance permission, an API key, or the picture is managed by the identity provider
- `404`: User not found
- `413`: Request body is too large
- `429`: The API key exceeded its rate limit or usage quota. Wait the number of seconds in Retry-After before retrying. The X-RateLimit headers are sent only when the rate limit was hit.

## Changes

- **2026-10-27** `bbaae0ea62c6`: 1 info
  - endpoint added
- **2026-10-27** `93f78789100c`: 1 breaking
  - api path removed without deprecation
- **2026-10-26** `8cf55c967f4c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/admin/users/:userId/avatar/put.md)

---

[API](https://skmtc.dev/usekaneo/apis/kaneo-api.md) - [All operations](https://skmtc.dev/usekaneo/apis/kaneo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usekaneo/apis/kaneo-api/revisions/741a49dfb347?raw)
