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

# Add Documents to Collection

> Add one or more documents to an existing collection.

## Overview

Adds documents to a collection by ID. Documents already in the collection are silently skipped.

## Request

<ParamField path="id" type="string" required>
  Collection ID (`col-...`) or collection name.
</ParamField>

<ParamField body="document_ids" type="string[]" required>
  Array of document IDs to add. Must contain at least one ID.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.okrapdf.com/v1/collections/col-40da068481cf4f248853507cba6be611/documents \
    -H "Authorization: Bearer okra_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"document_ids": ["doc-abc123", "doc-def456"]}'
  ```
</RequestExample>

### Response (200)

```json theme={null}
{
  "ok": true,
  "added": 2
}
```
