curl -X POST https://api.okrapdf.com/v1/files/finalize \
-H "Authorization: Bearer $OKRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "upl_abc123",
"fileName": "report.pdf",
"r2Key": "uploads/...",
"sha256": "..."
}'
Files
Finalize Direct Upload
Finalize a direct-to-storage PDF upload.
POST
/
v1
/
files
/
finalize
curl -X POST https://api.okrapdf.com/v1/files/finalize \
-H "Authorization: Bearer $OKRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "upl_abc123",
"fileName": "report.pdf",
"r2Key": "uploads/...",
"sha256": "..."
}'
Overview
Call this after PUTing bytes to the signedupload_url returned by /v1/files/presign.
string
required
Upload session ID returned by
/v1/files/presign.string
required
Original filename.
string
required
Storage key returned by the presign response.
string
required
SHA-256 digest of the uploaded file.
curl -X POST https://api.okrapdf.com/v1/files/finalize \
-H "Authorization: Bearer $OKRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "upl_abc123",
"fileName": "report.pdf",
"r2Key": "uploads/...",
"sha256": "..."
}'