Overview
The Files API handles document upload, processing, and retrieval. Supports PDF, DOCX, PPTX, images, and more. Base Path:/api/files
Endpoints
Upload File
Upload a document for processing.multipart/form-data
Form Fields:
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The file to upload |
company_id | UUID | No | Associated company |
document_type | string | No | Type (cim, pitch_deck, financial, contract) |
description | string | No | File description |
Get File
Get file metadata and status.Download File
Download the original file.Get Processing Status
Check document processing status.pending: Queued for processingprocessing: Currently being processedcompleted: Processing finishedfailed: Processing error occurred
List Files
Get a paginated list of files.| Parameter | Type | Description |
|---|---|---|
page | integer | Page number |
page_size | integer | Items per page |
company_id | UUID | Filter by company |
document_type | string | Filter by type |
status | string | Filter by processing status |
Delete File
Delete a file.Processing Flow
Supported File Types
| Type | Extensions | Max Size |
|---|---|---|
.pdf | 100 MB | |
| Word | .doc, .docx | 50 MB |
| PowerPoint | .ppt, .pptx | 50 MB |
| Excel | .xls, .xlsx | 50 MB |
| Images | .jpg, .png, .tiff | 20 MB |
| HTML | .html, .htm | 10 MB |
Extracted Data Structure
For CIMs
For Financial Statements
Examples
Upload with Frontend
Monitor Processing
Python Upload
Error Handling
| Code | Error | Description |
|---|---|---|
| 400 | file_too_large | File exceeds maximum size |
| 400 | unsupported_format | File type not supported |
| 404 | file_not_found | File ID doesn’t exist |
| 422 | processing_failed | Document processing error |
| 507 | storage_full | Insufficient storage space |
