Create a knowledge base

Create a knowledge base. The knowledge base starts empty.

POST https://api.centerfy.ai/webhooks/inbound/knowledge-bases

Headers

HeaderRequiredValueDescription
x-api-keyYesyour sub-account API key (cfy_…)Authenticates the request; or Authorization: Bearer <key>.
Content-TypeYesapplication/jsonRequest body is JSON.

Body parameters

NameTypeRequiredDefaultDescription
namestringYes—Knowledge base name; required (400 if empty). Must be unique (409 if a knowledge base with this name already exists).
descriptionstringNo—Optional description; null if omitted.
chunk_sizeintegerNo—Chunk size used for processing; must be a positive integer if provided (400 otherwise). Defaults to 1000.
chunk_overlapintegerNo—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.
© 2026 Centerfy AI. All rights reserved.