Create a new knowledge base in your organization to store and manage documents.
Request Body
Display name for the knowledge base
Optional description of the knowledge base purpose
Response
Unique identifier for the knowledge base (UUID)
Display name of the knowledge base
Description of the knowledge base (nullable)
Knowledge base type: managed
UUID of the organization that owns this knowledge base
Associated agent ID (nullable)
Number of documents in the knowledge base (initially 0)
Example Request
curl -X POST -H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"name": "Technical Documentation",
"description": "Internal technical guides and API documentation"
}' \
https://api.xpander.ai/v1/knowledge
Example Response
{
"id": "<kb-id>",
"name": "Product Catalog",
"description": "Product information and specifications for customer support",
"type": "managed",
"organization_id": "<org-id>",
"agent_id": null,
"total_documents": 0
}
Notes
- New knowledge bases start with zero documents
- Use the returned
id to add documents via the Add Documents endpoint
API Key for authentication
KB name specified by the user
KB description specified by the user
Represents a Knowledge Base item.
Attributes:
id (str): KB unique identifier.
name (str): KB name specified by the user.
description (str): KB description specified by the user.
type (KnowledgeBaseType): KB type, either managed or external.
organization_id (str): Organization ID associated with the KB.
total_documents (int): Total count of embedded documents. Defaults to 0.
KB name specified by the user
KB type, managed / external
Available options:
managed,
external
KB description specified by the user
Total count of embedded documents