knowledge_document table and have no impact on the existing contract (Document) model.
Key characteristics
| Property | Description |
|---|---|
| Separate storage | Own table, independent from contracts |
| Supported formats | PDF, DOCX, XLSX, PNG, JPG |
| Soft delete | Archived, not permanently deleted |
| Org-scoped | Every document belongs to an organization |
Upload flow
- Presign — Call
POST /api/knowledge/presignwith filename, organization, and content type. Receive a presigned S3 POST (url + form fields) and aknowledge_document_uid. - Upload — Build a
FormDatafrom the returned fields, append the file, andPOSTdirectly to the S3 URL. - Confirm — Call
POST /api/knowledge/confirmwith theknowledge_document_uidand organization. The server verifies the file exists in S3, checks the file size (max 25 MB), and starts a background workflow to create the database record.
Endpoints
List documents
Paginated, searchable document list
Create document
Finalize an uploaded file as a knowledge document
Update document
Rename a knowledge document
Delete document
Soft-delete (archive) a knowledge document