Get knowledge base source
Get one source with its full text (text, FAQ, snippet) and, optionally, the embedded chunks — the only stored text for file and URL sources.
GET
https://api.centerfy.ai/webhooks/inbound/knowledge-bases/:id/sources/:sourceId Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The knowledge base id. A non-uuid returns 400; a knowledge base that does not exist in this sub-account returns 404. |
sourceId | string (uuid) | Yes | The source id (a document or text-entry id, as returned when it was added or listed). |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
include_chunks | boolean | No | false | Also return the source’s embedded chunks from the vector store, in chunk order. |
chunk_limit | integer | No | 50 | Chunks per page, 1–200. |
chunk_offset | string | No | Cursor from a previous response’s next_chunk_offset to fetch the next page of chunks. |
Example
curl -X GET "https://api.centerfy.ai/webhooks/inbound/knowledge-bases/{id}/sources/{sourceId}?include_chunks=false&chunk_limit=50&chunk_offset=" \
-H "x-api-key: $CENTERFY_API_KEY" import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.knowledgeBases.getSource("<knowledgeBaseId>", "<sourceId>", {
"include_chunks": "false",
"chunk_limit": 50,
"chunk_offset": 0
});
console.log(result); centerfy knowledgeBases get-source <knowledgeBaseId> <sourceId> '{"include_chunks":"false","chunk_limit":50,"chunk_offset":0}' MCP tool: centerfy_knowledge_bases_get_source (see MCP server)
Response
{
"status": "success",
"knowledge_base_id": "66666666-7777-8888-9999-000000000000",
"source": {
"id": "9d3f1b2a-1111-4222-8333-000000000011",
"kind": "text_entry",
"type": "faq",
"title": "Opening hours FAQ",
"filename": null,
"source_url": null,
"file_type": null,
"file_size_bytes": null,
"status": "completed",
"error_message": null,
"total_chunks": null,
"vector_count": 4,
"content_preview": "Q1: What are your opening hours?\nA1: Monday to Friday, 8am to 6pm.\n\nQ2: Are you open on weekends?\nA2: Saturdays 9am to 1pm; closed Sundays.",
"content_length": 118,
"processed_at": "2026-10-01T09:01:12.000Z",
"created_at": "2026-10-01T09:00:00.000Z",
"updated_at": "2026-10-01T09:01:12.000Z",
"content": "Q1: What are your opening hours?\nA1: Monday to Friday, 8am to 6pm.\n\nQ2: Are you open on weekends?\nA2: Saturdays 9am to 1pm; closed Sundays.",
"faq_pairs": [
{
"question": "What are your opening hours?",
"answer": "Monday to Friday, 8am to 6pm."
},
{
"question": "Are you open on weekends?",
"answer": "Saturdays 9am to 1pm; closed Sundays."
}
]
},
"chunks": [
{
"id": "2f6a0c1e-aaaa-4bbb-8ccc-000000000001",
"chunk_index": 0,
"text": "Q1: What are your opening hours?\nA1: Monday to Friday, 8am to 6pm.",
"chunk_type": "faq"
}
],
"chunk_count": 1,
"next_chunk_offset": null,
"chunks_error": null
}Errors
400— for an invalid id; 404 if the knowledge base or the source is not in this sub-account.
Notes
Read-only. Text, snippet and FAQ sources return their full content; FAQ sources additionally return the parsed faq_pairs. File and URL sources return metadata only (there is no stored text), so pass include_chunks=true to read what was embedded: chunks has id, chunk_index, text and chunk_type, chunk_count is the page size returned, and next_chunk_offset is the cursor for the next page (null when there are no more). chunks_error is set, and chunks is empty, if the vector store could not be read; the source itself is still returned.