Files
The Files API stores organization-scoped documents in S3 and tracks their metadata in PostgreSQL. Use the presigned upload flow when you want clients, scripts, or CI jobs to upload files autonomously and trigger downstream classification.Recommended Upload Flow
Upload Files
Request presigned URLs, upload bytes directly to S3, then confirm the upload to trigger classification.
List File Readings
Retrieve extracted file readings after the async classification and processing steps complete.
Core Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/v1/files/presigned-urls | POST | Create pending file records and return presigned S3 upload URLs |
/v1/files/batch-update | PATCH | Mark uploads as uploaded or error after the S3 step |
/v1/files/upload | POST | Legacy/simple multipart upload through the backend |
/v1/files | GET | List files in the active organization |
/v1/files/{file_id} | GET | Fetch one file with metadata |
/v1/files/send-event | POST | Manually re-trigger file processing events such as PROCESS_DOCUMENT |
/v1/files/readings | GET | List extracted file readings or fetch readings for specific file IDs |
/v1/files/readings/{file_reading_id} | PUT | Update extracted reading content before creating records |
/v1/files/readings | POST | Create invoices or wastes from a file reading and link them to facilities |
/v1/files/{file_id} | DELETE | Soft-delete a file |
/v1/files/{file_id}/recover | PUT | Recover a soft-deleted file |
Status Lifecycle
Notes
folder_idis optional on upload requests. Omit it to upload at the root level.project_idis optional onPATCH /v1/files/batch-update. When present, the backend createsfile_projectlinks.POST /v1/files/uploadis still available, but the presigned flow is recommended for automation and large-file friendly clients.POST /v1/files/send-eventcan be used to manually retry downstream processing when a classified file has not produced afile_readingyet.- Once processing finishes, clients can use
GET /v1/files/readings, optionally edit extracted values withPUT /v1/files/readings/{file_reading_id}, and then create linked invoices or wastes withPOST /v1/files/readings. POST /v1/files/readingscurrently supports one file reading per request, even though the request body accepts an array.

