Upload Documents Flow
These endpoints are used to upload a document.
Uploading a document is a three-step process:
Get a presigned URL — Call the Presigned endpoint with document metadata. The response returns an
upload_idand a temporaryupload_url.Upload the file — Send the raw file as the body of a
PUTrequest directly to theupload_urlreturned in step 1. This uploads the file to secure storage.Complete the upload — Call the Complete endpoint with the
upload_idfrom step 1. This finalizes the document in the system and makes it available.
Flow Diagram
Client API Storage
│ │ │
├── POST /upload/presigned ───► │ │
│◄── { upload_id, upload_url } ─┤ │
│ │ │
├── PUT {upload_url} ───────────────────────────────────────► │
│◄── 200 OK ────────────────────────────────────────────────── │
│ │ │
├── POST /upload/{upload_id} ──►│ │
│◄── { document_id } ───────────┤ │
Important: The upload_url is temporary and expires. Complete all three steps in sequence without significant delay.