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

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: none, cover (default), or lazy.
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"
}