> ## 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.

# Detach Assets from Order

> Remove one or more custom-attached assets from an order.

<Note>
  **Beta.** The order asset management endpoints are in active development. The
  request and response shapes shown here are stable for production use, but we may
  add new fields or capabilities without notice.
  [Contact support](mailto:support@filemonk.io) to be notified of breaking changes.
</Note>

Remove assets that were previously attached to an order via
[Attach Assets to Order](/api-reference/orders/attach-assets). This only affects
custom (order-level) assets — product-level assets linked through digital
products are not affected.

## Path parameters

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

## Request body

<ParamField body="asset_ids" type="array" required>
  An array of asset UUIDs to detach from the order. IDs that are not currently
  attached are silently ignored.
</ParamField>

## Response

Returns `204 No Content` on success.

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE 'https://app.filemonk.io/api/v1/external/orders/a1b2c3d4-e5f6-7890-abcd-ef1234567890/detach_assets' \
    -H 'X-Auth-Token: fm_api_key_your_key_here' \
    -H 'Content-Type: application/json' \
    -d '{
      "asset_ids": ["f1e2d3c4-b5a6-7890-fedc-ba0987654321"]
    }'
  ```

  ```javascript Node.js theme={null}
  const orderId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
  const response = await fetch(
    `https://app.filemonk.io/api/v1/external/orders/${orderId}/detach_assets`,
    {
      method: 'DELETE',
      headers: {
        'X-Auth-Token': 'fm_api_key_your_key_here',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        asset_ids: ['f1e2d3c4-b5a6-7890-fedc-ba0987654321']
      })
    }
  );
  // 204 No Content on success
  ```

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

  order_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
  response = requests.delete(
      f'https://app.filemonk.io/api/v1/external/orders/{order_id}/detach_assets',
      headers={'X-Auth-Token': 'fm_api_key_your_key_here'},
      json={
          'asset_ids': ['f1e2d3c4-b5a6-7890-fedc-ba0987654321']
      }
  )
  # 204 No Content on success
  ```
</RequestExample>

<ResponseExample>
  ```json 204 theme={null}
  ```

  ```json 404 theme={null}
  {
    "error": "No custom assets attached to this order"
  }
  ```

  ```json 422 theme={null}
  {
    "error": "asset_ids must be a non-empty array"
  }
  ```
</ResponseExample>
