Add a URL source
Add a URL source to a knowledge base. The page is fetched, chunked, and embedded asynchronously, not inline.
POST
https://api.centerfy.ai/webhooks/inbound/knowledge-bases/:id/url 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 |
|---|---|---|---|---|
url | string | Yes | — | The URL to scrape; required (400 if empty) and must be a well-formed, parseable URL (400 ‘invalid URL format’ otherwise). |
title | string | No | — | Optional label for the source; falls back to the URL when omitted. |
Request body
{
"url": "https://example.com/docs/getting-started",
"title": "Getting Started Guide"
}Example
curl -X POST "https://api.centerfy.ai/webhooks/inbound/knowledge-bases/{id}/url" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/docs/getting-started",
"title": "Getting Started Guide"
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.knowledgeBases.addUrl("<knowledgeBaseId>", {
"url": "https://example.com/docs/getting-started",
"title": "Getting Started Guide"
});
console.log(result); centerfy knowledgeBases add-url <knowledgeBaseId> '{"url":"https://example.com/docs/getting-started","title":"Getting Started Guide"}' MCP tool: centerfy_knowledge_bases_add_url (see MCP server)
Response
{
"status": "success",
"added": true,
"knowledge_base_id": "66666666-7777-8888-9999-000000000000",
"document": {
"id": "cccccccc-dddd-eeee-ffff-000000000000",
"title": "Getting Started Guide",
"source_url": "https://example.com/docs/getting-started",
"file_type": "url",
"status": "queued",
"total_chunks": 0,
"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, url is missing, or url is malformed.404— if the knowledge base does not exist.201— on success.
Notes
The source is queued, not scraped inline (vector_count and total_chunks start at 0, status ‘queued’).