Skip to main content
Uploading a contract is a three-step flow. You first ask the API for a signed upload URL, then send the file bytes straight to storage, and finally confirm the upload so the file is queued for processing. You can optionally request specific extractions to run automatically after upload.
Only PDF files are supported. Maximum file size is 50 MB.
The file bytes are uploaded directly to storage, not through the API. This removes the request-body size limit and lets you upload large contracts reliably.

Upload Flow

1

Mint a signed upload URL

Call POST /v1/contracts/uploads with the file metadata. This creates a staging record and returns an upload_url you can write the file to.
2

Upload the file to storage

Send the raw file bytes with an HTTP PUT to the returned upload_url.
3

Confirm the upload

Call POST /v1/contracts/uploads/complete with the stagingId. This verifies the stored file and queues it for processing.

Step 1 — Create the upload URL

Creates a new contract staging record and returns a signed URL to upload the file to.

Request

Query Parameters

Headers

Body

Example

Response

Extraction Types

Pass any combination of the following extraction types to automatically process the contract after upload:

Step 2 — Upload the file

Send the raw file bytes with an HTTP PUT to the upload_url from step 1. Set Content-Type to the file’s MIME type.
The fileSize and fileType you send in step 1 describe what you intend to upload. The API re-checks the actual stored file in step 3 — a file that is not a valid PDF, or that exceeds 50 MB, is rejected there.

Step 3 — Confirm the upload

Confirms the file was uploaded, verifies it, and queues it for processing.

Request

Query Parameters

Body

Example

Response

Track processing progress with the contract processes endpoint using the staging_id.

Errors