Trillet AI logo

Create Knowledge Base

Create a new knowledge base in your workspace.

POSThttps://api.trillet.ai/v1/api/knowledgebase

Creates an empty knowledge base. Add content with Upload File or Add Text, then attach it to a call flow through the flow's settings.knowledgeBases.

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Request Body

namestringrequired

Name of the knowledge base.

descriptionstring

Description of the knowledge base.

isSMBbooleandefault: false

true creates a Basic knowledge base, meant for text set with Add Text. The agent reads that text in full instead of searching an index. A call flow can have at most one Basic knowledge base attached; attaching a second fails with 400 on the call flow update.

Response

201 with the new knowledge base, in the same shape as Get Knowledge Base. files is empty.

Errors

StatusBodyWhen
400{"message": "X-Workspace-ID header is required"}No x-workspace-id
400{"message": "Knowledge base name is required."}name is missing or empty
500{"message": "..."}Anything else
{
  "_id": "a4a4a4a4a4a4a4a4a4a4a4a4",
  "name": "Product Documentation",
  "description": "All product-related documentation and FAQs",
  "workspaceId": "d1d1d1d1d1d1d1d1d1d1d1d1",
  "isSMB": false,
  "files": [],
  "usedInPathways": [],
  "createdAt": "2026-10-29T09:00:00.000Z",
  "updatedAt": "2026-10-29T09:00:00.000Z"
}

Last updated on