v1
latestOpenAPI 3.0.02026-07-2464438356.8 KBDocuments
Get an upload URL for a document
Returns a one-time upload URL plus the form fields you need to attach. Send a multipart/form-data POST to the URL with each uploadUrlFormFields entry as a form field, then the file field last. The URL is valid for 60 minutes. Maximum file size is 10 MB.
post/api/documents/generate-upload-url
Headers
on-behalf-ofstring
Organization ID to act on behalf of
idempotency-keystring uuid required
Required UUID to safely retry requests without creating duplicate operations. Subsequent requests with the same key and identical body return the original cached response with an idempotency-replayed: true response header. Keys expire after 24 hours.
Request body
Example request
{
"contentType": "application/pdf",
"filename": "passport_scan.pdf"
}Response
Upload URL generated.
Example response
{
"uploadUrlFormFields": {
"Content-Type": "application/pdf",
"Policy": "<base64-encoded policy>",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Credential": "AKIA.../us-east-1/s3/aws4_request",
"X-Amz-Date": "20260409T120000Z",
"X-Amz-Signature": "<signature>",
"bucket": "my-bucket",
"key": "documents/org-id/doc-id/filename.pdf"
}
}