> ## 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 Digital Product

> Update the settings or assets of an existing digital product.

## Path parameters

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

## Request body

<ParamField body="digital_product" type="object" required>
  <Expandable title="Digital product fields">
    <ParamField body="asset_ids" type="array">
      Replacement list of asset UUIDs. **Fully replaces** the current asset list — omit
      this field entirely to leave the asset list unchanged.
    </ParamField>

    <ParamField body="upsert_always" type="boolean">
      Whether to create a new copy of assets for each order.
    </ParamField>

    <ParamField body="custom_message" type="string">
      Custom message shown on the download page.
    </ParamField>

    <ParamField body="preorder_enabled" type="boolean">
      Whether this is a preorder product. Requires `preorder_launch_date` and `custom_message` when `true`.
    </ParamField>

    <ParamField body="preorder_launch_date" type="string">
      ISO 8601 datetime when preorder content becomes available. Must be at least 2 hours in the future.
    </ParamField>

    <ParamField body="preorder_subject" type="string">
      Email subject for the preorder notification.
    </ParamField>

    <ParamField body="preorder_heading" type="string">
      Heading shown on the download page while in preorder.
    </ParamField>

    <ParamField body="preorder_description" type="string">
      Description shown on the download page while in preorder.
    </ParamField>
  </Expandable>
</ParamField>

## Response

Returns the updated digital product object.

<RequestExample>
  ```bash cURL (update assets) theme={null}
  curl -X PATCH 'https://app.filemonk.io/api/v1/external/digital_products/b2c3d4e5-f6a7-8901-bcde-f12345678901' \
    -H 'X-Auth-Token: fm_api_key_your_key_here' \
    -H 'Content-Type: application/json' \
    -d '{
      "digital_product": {
        "asset_ids": [
          "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "c3d4e5f6-a7b8-9012-cdef-123456789012"
        ]
      }
    }'
  ```

  ```bash cURL (enable preorder) theme={null}
  curl -X PATCH 'https://app.filemonk.io/api/v1/external/digital_products/b2c3d4e5-f6a7-8901-bcde-f12345678901' \
    -H 'X-Auth-Token: fm_api_key_your_key_here' \
    -H 'Content-Type: application/json' \
    -d '{
      "digital_product": {
        "preorder_enabled": true,
        "preorder_launch_date": "2026-05-01T09:00:00Z",
        "custom_message": "Your download will be available on launch day!",
        "preorder_heading": "Coming Soon",
        "preorder_description": "Your files will be ready on May 1st."
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const productId = 'b2c3d4e5-f6a7-8901-bcde-f12345678901';
  const response = await fetch(
    `https://app.filemonk.io/api/v1/external/digital_products/${productId}`,
    {
      method: 'PATCH',
      headers: {
        'X-Auth-Token': 'fm_api_key_your_key_here',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        digital_product: {
          asset_ids: [
            'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
            'c3d4e5f6-a7b8-9012-cdef-123456789012'
          ]
        }
      })
    }
  );
  const data = await response.json();
  ```

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

  product_id = 'b2c3d4e5-f6a7-8901-bcde-f12345678901'
  response = requests.patch(
      f'https://app.filemonk.io/api/v1/external/digital_products/{product_id}',
      headers={'X-Auth-Token': 'fm_api_key_your_key_here'},
      json={
          'digital_product': {
              'asset_ids': [
                  'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
                  'c3d4e5f6-a7b8-9012-cdef-123456789012'
              ]
          }
      }
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "digital_product": {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "shopify_product_id": 8847261098265,
      "shopify_variant_id": null,
      "assets": [
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "type": "external",
          "name": "Photoshop Brushes Pack",
          "filename": "brushes-pack-v2.zip",
          "external_url": "https://cdn.example.com/files/brushes-pack-v2.zip",
          "content_type": "application/zip",
          "byte_size": 0,
          "created_at": "2026-03-01T14:30:00Z"
        },
        {
          "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
          "type": "external",
          "name": "Bonus Textures Pack",
          "filename": "bonus-textures.zip",
          "external_url": "https://cdn.example.com/files/bonus-textures.zip",
          "content_type": "application/zip",
          "byte_size": 0,
          "created_at": "2026-03-10T08:00:00Z"
        }
      ],
      "upsert_always": false,
      "custom_message": "Thanks for your purchase!",
      "preorder_enabled": false,
      "preorder_launch_date": null,
      "preorder_subject": null,
      "preorder_heading": null,
      "preorder_description": null,
      "created_at": "2026-03-05T10:00:00Z",
      "updated_at": "2026-04-08T10:00:00Z"
    }
  }
  ```

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

  ```json 422 theme={null}
  {
    "errors": ["Preorder launch date must be in the future"]
  }
  ```
</ResponseExample>
