---
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 POST (add) and DELETE (remove) /api/assets/{id}/tags.

## 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.
  - `display_name` string, nullable — Display name of the asset. Mirrors name for backwards compatibility.
  - `file_path` string, nullable — Relative path in global-namespace-root form (e.g. "models/checkpoints/flux.safetensors")
  - `hash` string — Blake3 hash of the asset content.
  - `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, or `preview_id` is the zero UUID (`INVALID_PREVIEW_ID`).
- `401` — Unauthorized
- `404` — Asset not found — returned both when the asset being updated does not exist and when `preview_id` does not reference an asset accessible to the caller.
- `500` — Internal server error

## Changes

- **2026-06-09** `84406063d958` — 1 warning, 1 info
  - removed the optional property `asset_hash` from the response with the `200` status
  - added the optional property `file_path` to the response with the `200` status
- **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`

[Full 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/8af4304e9fb0/schema)
