---
title: "Upload embedded user avatar"
method: POST
path: "/api/public/organizations/{orgId}/embedded-users/{userId}/avatar"
tags: ["Embedding"]
---

# Upload embedded user avatar

`POST /api/public/organizations/{orgId}/embedded-users/{userId}/avatar`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/organizations/{orgId}/embedded-users/{userId}/avatar`
- Auth: HTTP bearer

Uploads an avatar image for a managed (embedded) user. Only users created via JWT SSO who have not logged in independently can have their avatars set through this endpoint. Requires admin access to the organization.

## Path parameters

- `orgId` string, required: Organization ID
- `userId` string, required: User ID of the embedded user

## Request body `multipart/form-data`

- object
  - `avatar` string, binary: Image file (JPEG or PNG). Maximum size: 2 MB.

## Response `200`

Avatar uploaded successfully

- object
  - `data` object, required
    - `avatarUrl` string, required: URL of the uploaded avatar

## Other responses

- `400`: Bad request - Invalid file type, missing file, or malformed request
- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - User not found, not an embedded user, or no admin access
- `413`: Payload too large - File size exceeds 2 MB limit
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error
- `503`: Service unavailable - S3 storage is not configured

---

[API](https://skmtc.dev/basedash/apis/basedash-public-api.md) - [All operations](https://skmtc.dev/basedash/apis/basedash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/basedash/apis/basedash-public-api/revisions/efb9d40bc6f7?raw)
