curl -X POST https://api.okrapdf.com/v1/files/presign \
-H "Authorization: Bearer $OKRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fileName": "report.pdf",
"fileSize": 10485760,
"sha256": "..."
}'
Files
Create Direct Upload
Create a direct-to-storage upload session for a PDF.
POST
/
v1
/
files
/
presign
curl -X POST https://api.okrapdf.com/v1/files/presign \
-H "Authorization: Bearer $OKRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fileName": "report.pdf",
"fileSize": 10485760,
"sha256": "..."
}'
Overview
Use this for larger PDFs or browser/server uploads where you want to PUT bytes directly to the signed storage URL, then finalize the file with/v1/files/finalize.
string
required
Original filename.
integer
required
File size in bytes.
string
required
SHA-256 digest of the file bytes.
curl -X POST https://api.okrapdf.com/v1/files/presign \
-H "Authorization: Bearer $OKRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fileName": "report.pdf",
"fileSize": 10485760,
"sha256": "..."
}'