Add a text source
Add a plain-text source to a knowledge base. The entry is queued and embedded asynchronously, not inline.
POST
https://api.centerfy.ai/webhooks/inbound/knowledge-bases/:id/text 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. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The knowledge base id. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | Yes | — | Title for the text entry; required (400 if empty). |
content | string | Yes | — | The text content to add; required (400 if empty). |
entry_type | string | No | — | Plain-text source type; must be ‘text’ or ‘snippet’ (case-insensitive) if provided (400 otherwise). Defaults to ‘text’. For FAQ content, use the /faq endpoint. |
Request body
{
"title": "Refund Policy",
"content": "Customers may request a refund within 30 days of purchase...",
"entry_type": "text"
}Example
curl -X POST "https://api.centerfy.ai/webhooks/inbound/knowledge-bases/{id}/text" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Refund Policy",
"content": "Customers may request a refund within 30 days of purchase...",
"entry_type": "text"
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.knowledgeBases.addText("<knowledgeBaseId>", {
"title": "Refund Policy",
"content": "Customers may request a refund within 30 days of purchase...",
"entry_type": "text"
});
console.log(result); centerfy knowledgeBases add-text <knowledgeBaseId> '{"title":"Refund Policy","content":"Customers may request a refund within 30 days of purchase...","entry_type":"text"}' MCP tool: centerfy_knowledge_bases_add_text (see MCP server)
Response
{
"status": "success",
"added": true,
"knowledge_base_id": "66666666-7777-8888-9999-000000000000",
"text_entry": {
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"title": "Refund Policy",
"entry_type": "text",
"status": "queued",
"vector_count": 0,
"created_at": "2026-06-12T10:00:00.000Z",
"updated_at": "2026-06-12T10:00:00.000Z"
}
}Errors
400— if the id is invalid, title or content is missing, or entry_type is invalid.404— if the knowledge base does not exist.201— on success.
Notes
The entry is queued, not embedded inline (vector_count starts at 0, status ‘queued’).