Skip to main content
POST
Manage knowledge base collections including creation, updating, file management, and deletion. Each knowledge base serves as a container for related documents that can be queried together.

Create Knowledge Base

Create a new knowledge base collection.

Request Body

string
Custom identifier for the knowledge base (auto-generated if not provided)
string
required
Display name for the knowledge base
string
Description of the knowledge base content and purpose
object
Additional metadata to store with the knowledge base
array
Array of access control rules. Each grant specifies permissions for users or groups.
string
Type of grantee: "user" or "group"
string
ID of the user or group
string
Permission level: "read" or "write"

Update Knowledge Base

Request Body

Same fields as create endpoint. All fields are optional - only provided fields will be updated.

Get Knowledge Base Details

Retrieve detailed information about a knowledge base including its files.

Manage Files in Knowledge Base

List Files

integer
default:"1"
Page number for pagination
string
Search term to filter files by name
string
Filter by view option
string
Field to sort by (e.g., “name”, “created_at”)
string
Sort direction: “asc” or “desc”

Remove File from Knowledge Base

string
required
ID of the file to remove
boolean
default:"true"
Whether to delete the file entirely or just remove from this knowledge base

Update File in Knowledge Base

Reprocess a file and update its embeddings:
string
required
ID of the file to reprocess
This will:
  1. Remove existing embeddings for the file
  2. Re-extract content from the file
  3. Re-chunk and re-embed the content
  4. Update the vector database

Reindex Knowledge Base

Admin only. Reindex all files across all knowledge bases. Useful after changing embedding models or chunking settings.

Reset Knowledge Base

Remove all file associations and embeddings from a knowledge base without deleting the knowledge base itself.

Delete Knowledge Base

Permanently delete a knowledge base and all its associations. Files are not deleted.

Export Knowledge Base

Admin only. Export all files in a knowledge base as a ZIP archive containing .txt files with extracted content.

Update Access Control

Update who can access the knowledge base.

Request Body

array
required
Array of access control rules (replaces existing grants)

Notes

  • Knowledge base IDs must be unique
  • The creator automatically gets write access
  • Access grants can be filtered by user permissions (e.g., sharing.public_knowledge)
  • Deleting a knowledge base removes it from associated models
  • Files can belong to multiple knowledge bases
  • Each knowledge base has its own vector collection for embeddings
  • Metadata is embedded for semantic discovery of knowledge bases