Create a new knowledge base in the authenticated user’s organization.
Required fields:
name — must be unique within the organizationembeddingModel — the model used to generate embeddings (e.g., openai:text-embedding-3-small)Optional features:
source — marks the KB as integration-managed (disables manual file upload in UI)trigger — automatically runs an agent when new files are addedextractionModel / extractionSchema — structured data extraction from uploaded filesJWT token from Clerk authentication.
Must be from a user with org:admin role.
Name of the knowledge base (must be unique within the org)
"Product Documentation"
Embedding model identifier (e.g., openai:text-embedding-3-small)
"openai:text-embedding-3-small"
Optional description
"All product docs and user guides"
Optional model for structured data extraction from files
JSON schema defining what structured data to extract from files
Integration source identifier. When set, the KB becomes integration-managed — manual file upload/deletion is disabled in the UI, but API access remains unrestricted.
"salesforce"
Trigger configuration that automatically runs an agent when new files are added.
Set enabled: true with an agentId and prompt to activate.