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

# Collection Bulk Operations

Perform bulk operations on collection files.

<ParamField path="collection_id" type="string" required>
  The collection ID
</ParamField>

## Request Body

<ParamField body="operation" type="string" required>
  The operation: `add_files`, `remove_files`
</ParamField>

<ParamField body="file_ids" type="array" required>
  Array of file IDs to operate on
</ParamField>

### Bulk Add Files

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.artaios.ai/api/v1/collections/coll_123/bulk/ \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "operation": "add_files",
      "file_ids": ["file_123", "file_456", "file_789"]
    }'
  ```

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

  data = {
      "operation": "add_files",
      "file_ids": ["file_123", "file_456", "file_789"]
  }

  response = requests.post(
      "https://api.artaios.ai/api/v1/collections/coll_123/bulk/",
      headers={"x-api-key": "YOUR_API_KEY"},
      json=data
  )
  ```
</CodeGroup>

### Bulk Remove Files

```json theme={null}
{
  "operation": "remove_files",
  "file_ids": ["file_456", "file_789"]
}
```

## Response

```json theme={null}
{
  "success": true,
  "processed": 3,
  "failed": 0,
  "results": [
    {
      "file_id": "file_123",
      "status": "success"
    },
    {
      "file_id": "file_456",
      "status": "success" 
    },
    {
      "file_id": "file_789",
      "status": "success"
    }
  ]
}
```
