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, first delete it using [`DELETE`](/v1.3/api-reference/upload-content/direct-uploads/delete-asset-user-metadata) method of the `/assets/{asset_id}/user-metadata` endpoint, then use this method to set the new values.
Request
This endpoint expects an object.
user_metadatamap from strings to anyRequired
Metadata that helps you categorize your assets. You can specify a list of keys and values. Keys must be of type `string`, and values can be of the following types: `string`, `integer`, `float` or `boolean`.
**Example**:
```JSON
"user_metadata": {
"category": "recentlyAdded",
"batchNumber": 5,
"rating": 9.3,
"needsReview": true
}
```
<Note title="Note">
If you want to store other types of data such as objects or arrays, you must convert your data into string values.
</Note>