REST API - Knowledge
Add Documents to Knowledge Base
Add one or more documents to a knowledge base
POST
Add Knowledge Base Documents
Knowledge bases are replaced by the Company Brain. Knowledge bases in use move into brains automatically, and these calls keep working on a moved knowledge base for one release. For new content, use collections.
Path Parameters
Request Body
Array of document URLs to add to the knowledge baseSupported formats:
- PDF documents
- Microsoft Word (.docx, .doc)
- Text files (.txt, .md)
- Web pages (HTML)
- CSV and Excel files
- Presentations (PPTX, PPT)
- JSON and YAML files
Response
Returns an array of created document objects:Unique identifier for the document (UUID) - initially null, assigned after processing completes
Example Request
Example Response
Processing Flow
- Upload - Documents are queued for processing
- Download - System downloads documents from provided URLs
- Extract - Text content is extracted from documents
- Chunk - Content is split into searchable chunks
- Embed - Chunks are converted to vector embeddings
- Index - Embeddings are stored in the vector database
Supported File Types
- Documents: PDF, DOCX, DOC, TXT, MD, RTF
- Spreadsheets: CSV, XLSX, XLS
- Presentations: PPTX, PPT
- Web: HTML, XML
- Code: JSON, YAML, various programming languages
Notes
- Documents must be publicly accessible via HTTP/HTTPS
- Maximum file size: 50MB per document
- The
idfield isnullinitially until the document is processed and indexed - The document ID is assigned after processing/indexing completes
- Use List Documents to check processing progress
- Duplicate URLs will create separate document entries
Body
application/json

