---
title: "Replace the user-defined metadata of an asset"
method: PUT
path: "/assets/{asset_id}/user-metadata"
tags: ["assets"]
---

# Replace the user-defined metadata of an asset

`PUT /assets/{asset_id}/user-metadata`

This method replaces the entire user-defined metadata of the specified asset. Unlike the [`PATCH`](/v1.3/api-reference/upload-content/direct-uploads/update-user-metadata) method, which merges your changes with the existing metadata, this method overwrites the stored value in full:
- A key with a value creates or replaces that key.
- A key set to an empty string (`""`) or `null` is ignored.
- A key you omit from the request body is removed.

To clear all metadata, send an empty object (`{}`) in the `user_metadata` field. This produces the same result as the [`DELETE`](/v1.3/api-reference/upload-content/direct-uploads/delete-user-metadata) method.

## Path parameters

- `asset_id` string, required

## Headers

- `x-api-key` string, required

## Request body

- object
  - `user_metadata` UserMetadata, required — Metadata that helps you categorize your assets. The object contains user-defined keys and values, where keys are strings and values are one of `string`, `integer`, `float`, or `boolean`. **Example**: ```JSON "user_metadata": { "category": "recentlyAdded", "batchNumber": 5, "rating": 9.3, "needsReview": true } ``` <Note title="Note"> To store other types of data, such as objects or arrays, convert your data into string values before sending it. </Note>

## Response `200`

Successful response

## Other responses

- `400` — The request has failed.
- `404` — The specified resource does not exist.

---

[API](https://skmtc.net/twelvelabs/apis/twelvelabs-api.md) · [All operations](https://skmtc.net/twelvelabs/apis/twelvelabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/twelvelabs/twelvelabs-api/versions/5dbd6e8473c9/schema)
