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

# Update Asset

> Update asset metadata, name, or tags

Update an asset's metadata, name, description, or tags. The file itself cannot be replaced - upload a new asset instead.

## Path Parameters

<ParamField path="organizationId" type="string" required>
  The unique identifier of the organization
</ParamField>

<ParamField path="projectId" type="string" required>
  The unique identifier of the project
</ParamField>

<ParamField path="id" type="string" required>
  The unique identifier of the asset
</ParamField>

## Request Body

<ParamField body="name" type="string">
  New display name for the asset
</ParamField>

<ParamField body="description" type="string">
  New description following the structured markdown format
</ParamField>

<ParamField body="metadata" type="object">
  Updated metadata object. Merged with existing metadata.

  <Expandable title="metadata properties">
    <ParamField body="alt" type="string">
      Alternative text for accessibility
    </ParamField>

    <ParamField body="caption" type="string">
      Caption or credit information
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tags" type="string[]">
  New array of tag IDs. Replaces existing tags.
</ParamField>

## Response

Returns the updated Asset object.

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/assets/asset789" \
    -H "Authorization: Bearer YOUR_JWT" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "updated-hero-image.jpg",
      "metadata": {
        "alt": "Updated hero image",
        "caption": "New product showcase"
      },
      "tags": ["hero", "product", "featured"]
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/assets/asset789',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_JWT',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        name: 'updated-hero-image.jpg',
        metadata: {
          alt: 'Updated hero image',
          caption: 'New product showcase'
        },
        tags: ['hero', 'product', 'featured']
      })
    }
  );
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": "asset789",
      "name": "updated-hero-image.jpg",
      "description": null,
      "type": "image/jpeg",
      "status": "active",
      "url": "https://cdn.metabind.ai/org123/proj456/assets/asset789/updated-hero-image.jpg",
      "size": 2048576,
      "metadata": {
        "width": 1920,
        "height": 1080,
        "format": "jpeg",
        "alt": "Updated hero image",
        "caption": "New product showcase"
      },
      "tags": ["hero", "product", "featured"],
      "createdAt": "2024-03-20T10:00:00Z",
      "updatedAt": "2024-03-21T15:30:00Z"
    }
  }
  ```
</ResponseExample>
