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

# Update Asset

> Update the metadata of an existing asset.

## Path parameters

<ParamField path="id" type="string" required>
  The asset's unique identifier (UUID).
</ParamField>

## Request body

<ParamField body="asset" type="object" required>
  <Expandable title="Asset fields">
    <ParamField body="name" type="string">
      Display name for the asset.
    </ParamField>

    <ParamField body="external_url" type="string">
      The URL of the external file. Only applicable to `external` type assets.
    </ParamField>

    <ParamField body="watermark_asset" type="boolean">
      Whether to apply PDF watermarking to this asset.
    </ParamField>

    <ParamField body="autogenerate_licence_key" type="boolean">
      Whether to auto-generate a licence key on purchase. Only applicable to `licence` type assets.
    </ParamField>
  </Expandable>
</ParamField>

## Response

Returns the updated asset object.

<ResponseField name="asset" type="object" required>
  The updated asset.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH 'https://app.filemonk.io/api/v1/external/assets/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
    -H 'X-Auth-Token: fm_api_key_your_key_here' \
    -H 'Content-Type: application/json' \
    -d '{
      "asset": {
        "name": "Photoshop Brushes Pack v3",
        "external_url": "https://cdn.example.com/files/brushes-pack-v3.zip"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const assetId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
  const response = await fetch(
    `https://app.filemonk.io/api/v1/external/assets/${assetId}`,
    {
      method: 'PATCH',
      headers: {
        'X-Auth-Token': 'fm_api_key_your_key_here',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        asset: {
          name: 'Photoshop Brushes Pack v3',
          external_url: 'https://cdn.example.com/files/brushes-pack-v3.zip'
        }
      })
    }
  );
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  asset_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
  response = requests.patch(
      f'https://app.filemonk.io/api/v1/external/assets/{asset_id}',
      headers={'X-Auth-Token': 'fm_api_key_your_key_here'},
      json={
          'asset': {
              'name': 'Photoshop Brushes Pack v3',
              'external_url': 'https://cdn.example.com/files/brushes-pack-v3.zip'
          }
      }
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "asset": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "type": "external",
      "name": "Photoshop Brushes Pack v3",
      "filename": "brushes-pack-v3.zip",
      "external_url": "https://cdn.example.com/files/brushes-pack-v3.zip",
      "content_type": "application/zip",
      "byte_size": 0,
      "watermark_asset": false,
      "autogenerate_licence_key": false,
      "created_at": "2026-03-01T14:30:00Z",
      "updated_at": "2026-04-08T10:00:00Z"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Asset not found"
  }
  ```

  ```json 422 theme={null}
  {
    "errors": ["External url can't be blank"]
  }
  ```
</ResponseExample>
