---
title: "Update user avatar image"
method: POST
path: "/api/image/user-avatar"
tags: ["Images"]
---

# Update user avatar image

`POST /api/image/user-avatar`

## Request

- Base URL: `https://passivelogic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://passivelogic.com/api/image/user-avatar`
- Auth: one of:
  - API key in header `X-PL-AUTH`
  - API key in header `Authorization: PL-API-KEY`
  - API key in header `PL-API-KEY`
  - HTTP basic
- TypeScript: <https://skmtc.dev/passivelogic/apis/passivelogic-http-api/docs/api/image/user-avatar/post.ts> (a function with typed inputs; its response is checked against the schema)

Uploads and updates the avatar image URL with the new image URL.

## Request body

- ImageData: Data required to upload image without using an image model.
  - `fileType` string, required: The type of file the given data represents, from a list of allowed files.
  - `image` string, byte, required: File data to write to the server. Must be Base64-encoded if sending as JSON.

## Response `200`

OK

- ImageUploadResponse: Image response definition
  - `message` string, required: Informative message relating to image upload. Updated image url with cache bust.
  - `url` string, nullable

---

[API](https://skmtc.dev/passivelogic/apis/passivelogic-http-api.md) - [All operations](https://skmtc.dev/passivelogic/apis/passivelogic-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/passivelogic/apis/passivelogic-http-api/revisions/28fce63bcdbb?raw)
