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
Document ID (e.g. doc-abc123) or 6-char short hash.
Page image rendering strategy: none, cover (default), or lazy.
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"
}