Update the user-defined metadata of an asset

This method updates the user-defined metadata of the specified asset. The platform merges your changes with the existing metadata: - A key with a value creates or replaces that key. - A key set to `null` deletes that key. - A key set to an empty string (`""`) is ignored. - A key you omit from the request keeps its current value. To replace all metadata in a single call, use the [`PUT`](/v1.3/api-reference/upload-content/direct-uploads/replace-asset-user-metadata) method of the `/assets/{asset_id}/user-metadata` endpoint instead.

Authentication

x-api-keystring
Your API key. <Note title="Note"> You can find your API key on the <a href="https://playground.twelvelabs.io/dashboard/api-keys" target="_blank">API Keys</a> page. </Note>

Path parameters

asset_idstringRequired

The unique identifier of the asset whose user-defined metadata to update.

Request

This endpoint expects an object.
user_metadatamap from strings to anyRequired
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

If successful, this method returns a 204 No Content response code. It does not return anything in the response body.

Errors

400
Bad Request Error
404
Not Found Error