Create a knowledge base
Create a knowledge base. The knowledge base starts empty.
POST
https://api.centerfy.ai/webhooks/inbound/knowledge-bases Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or Authorization: Bearer <key>. |
Content-Type | Yes | application/json | Request body is JSON. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Knowledge base name; required (400 if empty). Must be unique (409 if a knowledge base with this name already exists). |
description | string | No | — | Optional description; null if omitted. |
chunk_size | integer | No | — | Chunk size used for processing; must be a positive integer if provided (400 otherwise). Defaults to 1000. |
chunk_overlap | integer | No | — | Chunk overlap; must be a non-negative integer if provided (400 otherwise). Defaults to 200. |
Request body
{
"name": "Product FAQ",
"description": "Frequently asked questions about our product",
"chunk_size": 1000,
"chunk_overlap": 200
}Example
curl -X POST "https://api.centerfy.ai/webhooks/inbound/knowledge-bases" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Product FAQ",
"description": "Frequently asked questions about our product",
"chunk_size": 1000,
"chunk_overlap": 200
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.knowledgeBases.create({
"name": "Product FAQ",
"description": "Frequently asked questions about our product",
"chunk_size": 1000,
"chunk_overlap": 200
});
console.log(result); centerfy knowledgeBases create '{"name":"Product FAQ","description":"Frequently asked questions about our product","chunk_size":1000,"chunk_overlap":200}' MCP tool: centerfy_knowledge_bases_create (see MCP server)
Response
{
"status": "success",
"created": true,
"knowledge_base": {
"id": "66666666-7777-8888-9999-000000000000",
"name": "Product FAQ",
"description": "Frequently asked questions about our product",
"chunk_size": 1000,
"chunk_overlap": 200,
"embedding_model": null,
"is_enabled": true,
"document_count": 0,
"vector_count": 0,
"created_at": "2026-06-12T10:00:00.000Z",
"updated_at": "2026-06-12T10:00:00.000Z"
}
}Errors
400— if name, chunk_size, or chunk_overlap is invalid.409— if a knowledge base with this name already exists.502— if vector store provisioning fails (the knowledge base is not created).201— on success.