> ## Documentation Index
> Fetch the complete documentation index at: https://aspect.inc/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Asset Metadata Value

> Set a metadata value for an asset.

An attribute that is not one of the asset's project's is not found, as a
missing one is. The Objects column cannot be written through this route.
For share users, setting values on hidden attributes (configured in share settings) is forbidden.



## OpenAPI

````yaml /api-reference/openapi.json put /metadata/attributes/{attribute_id}/assets/{asset_id}
openapi: 3.1.0
info:
  title: Aspect API
  description: Manage and search media in Aspect.
  version: 1.0.0
servers:
  - url: https://api.aspect.inc
security:
  - ApiKeyAuth: []
tags:
  - name: Users
  - name: API Keys
  - name: Workspaces
  - name: Projects
  - name: Directories
  - name: Assets
  - name: Attachments
  - name: Filesystem Items
  - name: Jobs
  - name: Collections
  - name: Comments
  - name: Search
  - name: Transcription
  - name: Metadata
  - name: Shares
  - name: Share Templates
  - name: Watermarks
paths:
  /metadata/attributes/{attribute_id}/assets/{asset_id}:
    put:
      tags:
        - Metadata
      summary: Set Asset Metadata Value
      description: >-
        Set a metadata value for an asset.


        An attribute that is not one of the asset's project's is not found, as a

        missing one is. The Objects column cannot be written through this route.

        For share users, setting values on hidden attributes (configured in
        share settings) is forbidden.
      operationId: set_asset_metadata_value
      parameters:
        - name: attribute_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Attribute ID
            title: Attribute Id
          description: Attribute ID
        - name: asset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Asset ID
            title: Asset Id
          description: Asset ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataValueSetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataValueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MetadataValueSetRequest:
      properties:
        value:
          title: Value
          description: The value to set
      type: object
      required:
        - value
      title: MetadataValueSetRequest
      description: API request schema for setting a metadata value.
    MetadataValueResponse:
      properties:
        attribute_id:
          type: string
          format: uuid
          title: Attribute Id
          description: ID of the attribute this value is for
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name of the attribute
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
          description: Grouping category of the attribute
        data_type:
          $ref: '#/components/schemas/MetadataDataType'
          description: Data type of the value
        value:
          title: Value
          description: >-
            The actual value, type depends on data_type; null when the cell was
            answered with no value. For Objects: the objects present, each as
            {object_id, label, source}
        source:
          $ref: '#/components/schemas/CellSource'
          description: >-
            Author of the value's current content: user for manual writes, ai
            for generated ones
          default: user
      type: object
      required:
        - attribute_id
        - data_type
        - value
      title: MetadataValueResponse
      description: API response schema for a single metadata value.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MetadataDataType:
      type: string
      enum:
        - string
        - integer
        - float
        - boolean
        - datetime
        - single_select
        - multi_select
        - user_id
        - person_id
        - object_id
        - directory_id
      title: MetadataDataType
      description: Data types for metadata attribute values.
    CellSource:
      type: string
      enum:
        - user
        - ai
      title: CellSource
      description: |-
        Who wrote a cell's current answer: every answer write stamps its actor.

        Read by the overwrite run, which leaves user-authored cells out unless
        asked to replace them, and by clients, which animate AI landings only.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.