---
title: "Update asset metadata"
method: PUT
path: "/api/assets/{id}"
tags: ["file"]
---

# Update asset metadata

`PUT /api/assets/{id}`

Updates an asset's metadata. At least one field must be provided.
Only name, mime_type, preview_id, and user_metadata can be updated.
For tag management, use the dedicated PUT /api/assets/{id}/tags endpoint.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `mime_type` string — Updated MIME type of the asset
  - `name` string — New display name for the asset
  - `preview_id` string, uuid — Updated preview asset ID
  - `user_metadata` object — Updated custom metadata

## Response `200`

Asset updated successfully

- AssetUpdated — Response returned when an existing asset is successfully updated.
  - `asset_hash` string — Deprecated: use hash instead. Blake3 hash of the asset content.
  - `display_name` string, nullable — Display name of the asset. Mirrors name for backwards compatibility.
  - `hash` string — Blake3 hash of the asset content. Preferred over asset_hash.
  - `id` string, uuid, required — Asset ID
  - `job_id` string, uuid, nullable — ID of the job that created this asset, if available
  - `mime_type` string — Updated MIME type of the asset
  - `name` string — Updated name of the asset
  - `tags` string[] — Tags associated with the asset
  - `updated_at` string, date-time, required — Timestamp of the update
  - `user_metadata` object — Updated custom metadata

## Other responses

- `400` — Invalid request (no fields provided)
- `401` — Unauthorized
- `404` — Asset not found
- `500` — Internal server error

## Changes

- **2026-06-03** `8560879e6188` — 1 breaking, 1 warning, 7 info
  - the request property `mime_type` became not nullable
  - removed the optional property `prompt_id` from the response with the `200` status
  - api tag `file` added
  - api tag `assets` removed
  - …5 more
- **2026-05-22** `09a5075587c8` — 4 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - added the non-success response with the status `404`
  - added the non-success response with the status `500`
- **2026-05-08** `c9640fded659` — 1 breaking, 4 info
  - the response property `asset_hash` became nullable for the status `200`
  - added the optional property `hash` to the response with the `200` status
  - added the optional property `job_id` to the response with the `200` status
  - added the optional property `prompt_id` to the response with the `200` status
  - …1 more
- **2026-05-05** `0d50eed29d03` — 1 info
  - added the new optional request property `mime_type`
- **2026-04-24** `a66055fa384e` — 5 warning, 7 info
  - removed the request property `mime_type`
  - removed the optional property `display_name` from the response with the `200` status
  - removed the optional property `file_path` from the response with the `200` status
  - removed the optional property `hash` from the response with the `200` status
  - …8 more

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/assets/:id/put.md)

---

[API](https://skmtc.dev/comfy-org/apis/comfyui-api.md) · [All operations](https://skmtc.dev/comfy-org/apis/comfyui-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comfy-org/comfyui-api/revisions/8560879e6188/schema)
