Knowledge Base API
Programmatically manage the documents and data your AI agents use to answer questions.
Upload Document
POST
/knowledge/documentsDescription
Uploads a file to the knowledge base and begins the vectorization process. Supports multipart/form-data for PDF, DOCX, and TXT files.
Permissions
Requires Admin or Manager role.
Request Body (multipart/form-data)
file(binary) - The document file to upload (Max 20MB).title(string) - A descriptive name for the document.
Response
{
"document_id": "doc_991122",
"status": "processing",
"message": "Document uploaded successfully and is being vectorized."
}
Check Document Status
GET
/knowledge/documents/{document_id}Description
Checks if a document has finished processing and is ready for the AI to use.
Response
{
"document_id": "doc_991122",
"title": "Pricing_Guide_2026.pdf",
"status": "active",
"chunks_created": 45
}
Delete Document
DELETE
/knowledge/documents/{document_id}Description
Removes a document from the knowledge base. The AI will immediately stop using this data.
Response
{
"success": true,
"message": "Document and associated vectors have been deleted."
}