---
title: "Upload avatar"
method: PUT
path: "/user/avatar"
tags: ["User"]
---

# Upload avatar

`PUT /user/avatar`

Store a base64 encoded avatar (PNG, JPEG, or WebP, up to 512KB) for the current user and return its public URL. Replaces any existing avatar.

## Request body

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

## Response `200`

Avatar stored

- UserAvatar
  - `id` string, required
  - `url` string, required — Public URL for the stored avatar, served from /api/user/avatar/{id}.
  - `size` number, required — Decoded size in bytes.

## Other responses

- `400` — Unsupported content type, malformed base64, or too large
- `401` — Missing or invalid credentials

## Changes

- **2026-08-24** `08bbb5bedb5d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/user/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-service-production.skmtc.workers.dev/v1/apis/usekaneo/kaneo-api/revisions/9d1da42c10ce/schema)
