---
title: "Upsert a avatar for the specific user"
method: PUT
path: "/user/{user_id}/avatar"
tags: ["User Avatar"]
---

# Upsert a avatar for the specific user

`PUT /user/{user_id}/avatar`

## Request body

- UserAvatarDef — user avatar
  - `name` string, required
  - `metadata` object, required
    - `file_size` integer, required
    - `file_type` string, required
    - `etag` string, required
    - `md5_digest` string, required
    - `original_file_name` string, required

## Response `200`

User avatar record will be returned

- UserAvatarResponseDef
  - `_id` string, required
  - `signed_upload_url` string, required
  - `headers` object[], required
    - `name` string
    - `value` string

## Other responses

- `400` — Validation errors caused by missing or invalid header / path or payloads
- `401` — Failed to authenticate the user making the request
- `default` — Server error occurred

---

[API](https://skmtc.dev/staffshift/apis/staffshift-api-gateway.md) · [All operations](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/staffshift/staffshift-api-gateway/revisions/6e2cb83db3a9/schema)
