---
title: "Add or update user avatar"
method: POST
path: "/users/{user_id}/avatar"
tags: ["User avatars"]
---

# Add or update user avatar

`POST /users/{user_id}/avatar`

Adds or updates a user avatar.

## Path parameters

- `user_id` string, required

## Response `200`

`ok`: Returns the `pic_urls` object with URLs to existing
user avatars that were updated.

- UserAvatar — A resource holding URLs to the avatar uploaded to a Box application.
  - `pic_urls` object — Represents an object with user avatar URLs.
    - `small` string — The location of a small-sized avatar.
    - `large` string — The location of a large-sized avatar.
    - `preview` string — The location of the avatar preview.

## Other responses

- `201` — `created`: Returns the `pic_urls` object with URLS to user avatars uploaded to Box with the request.
- `400` — `bad_request`: Returns an error when: * An image is not included in the request * The uploaded file is empty * The image size exceeds 1024 * 1024 pixels or 1MB * The file extension is other than `.jpg` or `.png`.
- `403` — `forbidden`: Returns an error if the user does not have permissions necessary to upload an avatar or is not activated.
- `404` — `not_found`: Returns an error if the user does not exist or cannot be found.
- `default` — An unexpected client error.

---

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