Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT token from Clerk authentication.

Must be from a user with org:admin role.

Body

application/json
name
string
required

Name of the knowledge base (must be unique within the org)

Example:

"Product Documentation"

embeddingModel
string
required

Embedding model identifier (e.g., openai:text-embedding-3-small)

Example:

"openai:text-embedding-3-small"

description
string | null

Optional description

Example:

"All product docs and user guides"

extractionModel
string | null

Optional model for structured data extraction from files

extractionSchema
object | null

JSON schema defining what structured data to extract from files

source
string | null

Integration source identifier. When set, the KB becomes integration-managed — manual file upload/deletion is disabled in the UI, but API access remains unrestricted.

Example:

"salesforce"

trigger
object

Trigger configuration that automatically runs an agent when new files are added. Set enabled: true with an agentId and prompt to activate.

Response

Knowledge base created successfully

success
boolean
required
knowledgeBase
object
required