Upload Files
Upload Files
Autonomous file uploads via presigned S3 URLs, with explicit upload confirmation
POST
Upload Files
Upload Files
Use this 3-step handshake to upload files from browsers, scripts, CI jobs, or the Dcycle CLI without streaming file bytes through the API server.Create presigned upload URLs
Call
POST /v1/files/presigned-urls. The backend creates pending file rows and returns one presigned S3 URL per file.Upload file bytes to S3
PUT the raw file bytes to each presigned URL using the same Content-Type you sent in step 1.Step 1: Create Presigned URLs
Headers
API key for authentication.
Organization UUID that owns the uploaded files.
Body
Send an array so one request can prepare multiple uploads.File name without the extension.
File extension such as
pdf, csv, xlsx, jpg, or png.MIME type for the uploaded file.
File size in kilobytes.
Optional folder UUID. Omit for root-level uploads.
Example
Response Fields
File UUID stored in PostgreSQL.
Starts as
pending.Final S3-backed file URL stored on the File record.
Temporary S3
PUT URL used for the direct upload.Step 2: Upload to S3
Upload the raw file bytes to thepresigned_url returned in step 1.
Step 3: Confirm the Upload
PATCH /v1/files/batch-update is the step that flips the file from pending to uploaded and triggers document classification.
Body
File IDs returned by step 1.
Use
uploaded after a successful S3 upload, or error if the upload failed.Optional project UUID. When present, the backend also creates
file_project links.Example
Event Trigger
Whenstatus=uploaded, the backend emits CLASSIFY_DOCUMENT with:
Legacy Alternative
If you do not need the direct-to-S3 flow,POST /v1/files/upload still accepts a standard multipart upload through the backend.
