---
title: "Upload account avatar"
method: POST
path: "/api/my-account/user-assets/avatar"
tags: ["My account"]
---

# Upload account avatar

`POST /api/my-account/user-assets/avatar`

Upload a single avatar image to the configured storage provider and return the public URL of the uploaded asset. Requires the `profile` scope and the `avatar` field to be editable in the account center configuration. The returned URL can then be used as the value for the avatar field via `PATCH /api/my-account`.

## Response `200`

The asset was uploaded successfully.

- object
  - `url` string, required

## Other responses

- `400` — The request is invalid (e.g. file too large, image type not allowed, storage is not configured, or the avatar field is not editable).
- `401` — Permission denied, the access token does not include the `profile` scope.
- `403` — Permission denied, the application is a third-party application.
- `500` — Failed to upload the file to the storage provider.

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/revisions/0287c6a59eba/schema)
