Upload
Upload documents to your knowledge base via presigned URLs.
Document upload uses a two-step process: initialize to get presigned S3 URLs, then confirm after uploading.
Initialize Upload
POST /upload/initReturns presigned URLs for uploading files directly to S3.
Scope: kb:write
Requires: Active subscription + sufficient storage quota
{
"workspace_id": "ws_abc123",
"files": [
{
"filename": "report.pdf",
"size": 1048576,
"hash": "sha256-hex-hash"
}
]
}[
{
"document_id": "doc_xyz",
"upload_url": "https://s3.amazonaws.com/...",
"headers": {
"Content-Type": "application/pdf",
"x-amz-meta-hash": "sha256-hex-hash"
},
"expires_at": "2026-03-09T12:05:00Z"
}
]Upload Flow
- Call
POST /upload/initwith file metadata - Upload each file to the returned presigned URL with required headers
- Call
POST /upload/completeto verify and start processing
Complete Upload
POST /upload/completeVerifies uploaded files exist in S3 and enqueues them for processing (OCR, chunking, embedding).
Scope: kb:write
{
"document_ids": ["doc_xyz"]
}Limits
| Limit | Value |
|---|---|
| Max files per upload | 10 |
| Max file size | 100 MB |
| Presigned URL expiry | 5 minutes |
Supported File Types
PDF, DOCX, PPTX, TXT, MD, CSV, and common image formats (PNG, JPG — processed via OCR).