> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Finalize Direct Upload

> Finalize a direct-to-storage PDF upload.

## Overview

Call this after PUTing bytes to the signed `upload_url` returned by `/v1/files/presign`.

<ParamField body="id" type="string" required>
  Upload session ID returned by `/v1/files/presign`.
</ParamField>

<ParamField body="fileName" type="string" required>
  Original filename.
</ParamField>

<ParamField body="r2Key" type="string" required>
  Storage key returned by the presign response.
</ParamField>

<ParamField body="sha256" type="string" required>
  SHA-256 digest of the uploaded file.
</ParamField>

<RequestExample>
  ```bash theme={null}
  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": "..."
    }'
  ```
</RequestExample>
