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

# Create Collection

> Create a new named collection, optionally seeded with documents.

## Overview

Creates a new collection. You can optionally include document IDs to add at creation time.

## Request

<ParamField body="name" type="string" required>
  Display name for the collection.
</ParamField>

<ParamField body="description" type="string">
  Optional description of the collection's purpose.
</ParamField>

<ParamField body="document_ids" type="string[]">
  Document IDs to seed into the collection. IDs already present are silently skipped.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.okrapdf.com/v1/collections \
    -H "Authorization: Bearer okra_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Q4 Earnings",
      "description": "Quarterly earnings reports",
      "document_ids": ["doc-abc123", "doc-def456"]
    }'
  ```
</RequestExample>

### Response (201)

```json theme={null}
{
  "id": "col-40da068481cf4f248853507cba6be611",
  "name": "Q4 Earnings",
  "description": "Quarterly earnings reports",
  "visibility": "private",
  "created_at": "2025-01-15T08:30:00Z",
  "document_count": 2
}
```
