Skip to main content
POST
/
v1
/
documents
/
{id}
/
upload
curl -X POST https://api.okrapdf.com/v1/documents/doc-abc123/upload \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @report.pdf

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

Upload a PDF by streaming the raw binary in the request body. Set Content-Type: application/pdf. Useful for programmatic uploads where you already have the file bytes.

Request

id
string
required
Document ID (e.g. doc-abc123) or 6-char short hash.
page_images
string
Page image rendering strategy: eager (default, render all pages), cover (page 1 only), or none. lazy is accepted as a deprecated alias for eager.
filename
string
Original filename hint (used in UI and exports).
curl -X POST https://api.okrapdf.com/v1/documents/doc-abc123/upload \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @report.pdf

Response (202)

{
  "id": "doc-abc123",
  "phase": "uploading",
  "status_url": "https://api.okrapdf.com/v1/documents/doc-abc123"
}