Skip to main content
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 signed upload_url returned by /v1/files/presign.
id
string
required
Upload session ID returned by /v1/files/presign.
fileName
string
required
Original filename.
r2Key
string
required
Storage key returned by the presign response.
sha256
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": "..."
  }'