Add Knowledge Base Documents
REST API - Knowledge
Add Documents to Knowledge Base
Add one or more documents to a knowledge base
POST
Add Knowledge Base Documents
Upload documents to a knowledge base by providing URLs. The documents will be downloaded, processed, and indexed for semantic search.Documentation Index
Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Unique identifier of the knowledge base (UUID format)
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:Knowledge base ID
Unique identifier for the document (UUID) - initially null, assigned after processing completes
Document name (initially null)
URL of the document
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
Authorizations
API Key for authentication
Path Parameters
Body
application/json
Request model for adding documents to a knowledge base.
Documents URLs

