Add an FAQ source
Add an FAQ source to a knowledge base. The faq_pairs are combined into one entry, queued, and embedded asynchronously.
POST
https://api.centerfy.ai/webhooks/inbound/knowledge-bases/:id/faq 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 FAQ entry; required (400 if empty). |
faq_pairs | array | Yes | — | Non-empty array of FAQ pairs (minItems 1). Each pair is an object requiring both ‘question’ (string) and ‘answer’ (string) — 400 if any pair is missing either. The pairs are combined into one entry. |
Request body
{
"title": "Shipping FAQ",
"faq_pairs": [
{
"question": "How long does shipping take?",
"answer": "Standard shipping takes 3-5 business days."
},
{
"question": "Do you ship internationally?",
"answer": "Yes, we ship to over 50 countries."
}
]
}Example
curl -X POST "https://api.centerfy.ai/webhooks/inbound/knowledge-bases/{id}/faq" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Shipping FAQ",
"faq_pairs": [
{
"question": "How long does shipping take?",
"answer": "Standard shipping takes 3-5 business days."
},
{
"question": "Do you ship internationally?",
"answer": "Yes, we ship to over 50 countries."
}
]
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.knowledgeBases.addFaq("<knowledgeBaseId>", {
"title": "Shipping FAQ",
"faq_pairs": [
{
"question": "How long does shipping take?",
"answer": "Standard shipping takes 3-5 business days."
},
{
"question": "Do you ship internationally?",
"answer": "Yes, we ship to over 50 countries."
}
]
});
console.log(result); centerfy knowledgeBases add-faq <knowledgeBaseId> '{"title":"Shipping FAQ","faq_pairs":[{"question":"How long does shipping take?","answer":"Standard shipping takes 3-5 business days."},{"question":"Do you ship internationally?","answer":"Yes, we ship to over 50 countries."}]}' MCP tool: centerfy_knowledge_bases_add_faq (see MCP server)
Response
{
"status": "success",
"added": true,
"knowledge_base_id": "66666666-7777-8888-9999-000000000000",
"faq_count": 2,
"text_entry": {
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"title": "Shipping FAQ",
"entry_type": "faq",
"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 is missing, faq_pairs is not a non-empty array, or any pair is missing question or answer.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’).