Skip to main content
POST
/
v1
/
collections
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"]
  }'

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.

Overview

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

Request

name
string
required
Display name for the collection.
description
string
Optional description of the collection’s purpose.
document_ids
string[]
Document IDs to seed into the collection. IDs already present are silently skipped.
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"]
  }'

Response (201)

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