---
title: "Set Asset Metadata Value"
method: PUT
path: "/metadata/attributes/{attribute_id}/assets/{asset_id}"
tags: ["Metadata"]
---

# Set Asset Metadata Value

`PUT /metadata/attributes/{attribute_id}/assets/{asset_id}`

## Request

- Base URL: `https://api.aspect.inc`
- URL: `https://api.aspect.inc/metadata/attributes/{attribute_id}/assets/{asset_id}`
- Auth: API key in header `Authorization`

Set a metadata value for an asset.

The attribute must belong to the asset's project (otherwise `404`) and be editable (`is_editable`, otherwise `400`).

## Path parameters

- `attribute_id` string, uuid, required: Attribute ID
- `asset_id` string, uuid, required: Asset ID

## Request body

- MetadataValueSetRequest: API request schema for setting a metadata value.
  - `value` unknown, required

## Response `200`

Successful Response

- MetadataValueResponse: API response schema for a single metadata value.
  - `attribute_id` string, uuid, required: ID of the attribute this value is for
  - `name` string, nullable: Display name of the attribute
  - `data_type` 'string' | 'integer' | 'float' | 'boolean' | 'datetime' | 'single_select' | 'multi_select' | 'user_id' | 'person_id' | 'object_id' | 'directory_id', required: Type of value an attribute holds. - `string`: Text. - `integer`: A whole number. - `float`: A decimal number. - `boolean`: True or false. - `datetime`: A date and time. - `single_select`: One of the attribute's `options`. - `multi_select`: Any number of the attribute's `options`. - `user_id`: Users. - `person_id`: People recognized in the asset. Used by the built-in People attribute. - `object_id`: Objects recognized in the asset. Used by the built-in Objects attribute. - `directory_id`: The directories containing the asset. Used by the built-in Path attribute.
  - `value` unknown, required
  - `source` 'user' | 'ai': Who wrote the value: a user or AI.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/aspect/apis/aspect-api.md) - [All operations](https://skmtc.dev/aspect/apis/aspect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aspect/apis/aspect-api/revisions/28ea5f1adb54?raw)
