Skip to content

Get a presigned URL for document upload

POST
/v1/documents/upload-url

Returns a pre-signed R2 PUT URL valid for 15 minutes. Upload the file binary directly to the URL, then call POST /v1/documents/{id}/process to trigger OCR + extraction.

Authorizations

Request Body required

object
filename
required
string
mimeType
required
string
size_bytes
integer
nullable

Responses

200

OK

object
upload_url
string format: uri
document_id
string format: uuid
storage_key
string

400

Validation error

object
error
required
string
Invalid link
code
integer
1003

429

Rate limit

object
error
required
string
Invalid link
code
integer
1003