Knowledge base documents, retrieval, and indexing.
List Knowledge Bases
List all knowledge bases for your organization.
Supports filtering with both snake_case and camelCase query parameters.
Date Filters:
createdAtGt/created_at_gt: After this datetimecreatedAtLt/created_at_lt: Before this datetimecreatedAtGe/created_at_ge: On or after this datetimecreatedAtLe/created_at_le: On or before this datetime
Pagination:
limit: Max records (default 100, max 1000)skip: Offset for paginationsortOrder: ASC or DESC (default DESC)
Returns documents with their processing status and chunk counts.
query Parameters
skipNumber of records to skip for pagination. Defaults to 0.
limitMaximum number of records to return. Defaults to 100. Max 1000.
sortOrderSort order: ASC (oldest first) or DESC (newest first). Defaults to DESC.
Sort order for list endpoints
createdAtGtFilter records created after this datetime (ISO 8601). Example: 2024-01-01T00:00:00Z
createdAtLtFilter records created before this datetime (ISO 8601). Example: 2024-12-31T23:59:59Z
createdAtGeFilter records created on or after this datetime (ISO 8601). Example: 2024-01-01T00:00:00Z
createdAtLeFilter records created on or before this datetime (ISO 8601). Example: 2024-12-31T23:59:59Z
page(Legacy) Use skip/limit
page_size(Legacy) Use limit
List Knowledge Bases › Responses
Successful Response
Pagination metadata in API responses.
Get Knowledge Base
Get a knowledge base by ID.
path Parameters
kb_idThe unique identifier of the knowledge base.
Get Knowledge Base › Responses
Successful Response
idorganization_idnamesource_typeType of knowledge base source.
size_byteschunk_countstatusProcessing status.
created_atupdated_atis_activeprogressUpdate Knowledge Base
Update a knowledge base's name, description, or content (text documents only).
path Parameters
kb_idThe unique identifier of the knowledge base to update.
Update Knowledge Base › Request Body
Updated content for text-based documents
Update Knowledge Base › Responses
Successful Response
idorganization_idnamesource_typeType of knowledge base source.
size_byteschunk_countstatusProcessing status.
created_atupdated_atis_activeprogressCreate Knowledge Base From URL
Create a knowledge base from a URL.
Scrapes the web page content and processes it for RAG retrieval. Processing happens asynchronously - check status field for completion.
Create Knowledge Base From URL › Request Body
nameDisplay name
urlURL to scrape content from
Create Knowledge Base From URL › Responses
Successful Response
idorganization_idnamesource_typeType of knowledge base source.
size_byteschunk_countstatusProcessing status.
created_atupdated_atis_activeprogressCreate Knowledge Base From Text
Create a knowledge base from direct text input.
Text is immediately chunked and ready for RAG retrieval.
Create Knowledge Base From Text › Request Body
nameDisplay name
contentText content (up to 500KB)
Create Knowledge Base From Text › Responses
Successful Response
idorganization_idnamesource_typeType of knowledge base source.
size_byteschunk_countstatusProcessing status.
created_atupdated_atis_activeprogressCreate Knowledge Base From File
Create a knowledge base from an uploaded file.
Supported formats: txt, md, html, pdf, docx, epub (up to 21MB). Processing happens asynchronously - check status field for completion.
Create Knowledge Base From File › Request Body
nameDisplay name for the knowledge base
fileFile to upload (txt, md, html, pdf, docx, epub)
Optional description
Create Knowledge Base From File › Responses
Successful Response
idorganization_idnamesource_typeType of knowledge base source.
size_byteschunk_countstatusProcessing status.
created_atupdated_atis_activeprogressQuery Knowledge Bases
Query knowledge bases for relevant content.
Used by voice agents during calls to retrieve context. Returns top_k most relevant chunks across specified knowledge bases.
Query Knowledge Bases › Request Body
queryUser's question/query
knowledge_base_idsKB IDs to search
top_kNumber of results to return
Query Knowledge Bases › Responses
Successful Response
querytotal_chunks_searchedAssign Agent Knowledge Bases
Assign knowledge bases to an agent.
Replaces existing assignments with the provided list. Pass empty list to remove all assignments.
path Parameters
agent_idThe unique identifier of the agent.
Assign Agent Knowledge Bases › Request Body
knowledge_base_idsKB IDs to assign
Assign Agent Knowledge Bases › Responses
Successful Response
agent_id