curl --request POST \
--url https://api.zeroruntime.ai/v1/knowledge-bases \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Help center: billing",
"source": {
"type": "url",
"config": {
"pages": [
"https://help.example.com/billing",
"https://help.example.com/billing/refunds",
"https://help.example.com/plans"
],
"autoRefresh": {
"enabled": true,
"intervalDays": 7
}
}
}
}
'{
"knowledgeId": "w8d3k",
"name": "Help center: billing",
"type": "url",
"status": "processing",
"statusReason": null,
"failureCode": null,
"sizeInBytes": 0,
"pageCount": null,
"sectionCount": null,
"charCount": null,
"folderId": null,
"currentVersion": 1,
"latestVersion": 1,
"createdAt": "2026-10-13T09:30:00.000Z",
"updatedAt": "2026-10-13T09:30:00.000Z"
}{
"message": "Invalid payload",
"errors": {
"formErrors": [],
"fieldErrors": {
"name": [
"String must contain at least 1 character(s)"
]
}
}
}{
"error": "<string>"
}{
"message": "Folder not found"
}{
"message": "A folder named \"Product docs\" already exists, send its folderId instead"
}{
"message": "File exceeds the 30MB limit"
}{
"message": "URL is unreachable"
}Knowledge bases
Create knowledge base
Creates a knowledge base from files, website pages or text. The source you pick decides how you send the request:
| Source | Content type | What to send |
|---|---|---|
| Files | multipart/form-data | One or more files in files |
| Website pages | application/json | The page URLs in source.config.pages |
| Text | application/json | The text in source.config.content |
Processing runs in the background. Poll Get knowledge base status until it’s ready before an agent can use it.
POST
/
v1
/
knowledge-bases
curl --request POST \
--url https://api.zeroruntime.ai/v1/knowledge-bases \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Help center: billing",
"source": {
"type": "url",
"config": {
"pages": [
"https://help.example.com/billing",
"https://help.example.com/billing/refunds",
"https://help.example.com/plans"
],
"autoRefresh": {
"enabled": true,
"intervalDays": 7
}
}
}
}
'{
"knowledgeId": "w8d3k",
"name": "Help center: billing",
"type": "url",
"status": "processing",
"statusReason": null,
"failureCode": null,
"sizeInBytes": 0,
"pageCount": null,
"sectionCount": null,
"charCount": null,
"folderId": null,
"currentVersion": 1,
"latestVersion": 1,
"createdAt": "2026-10-13T09:30:00.000Z",
"updatedAt": "2026-10-13T09:30:00.000Z"
}{
"message": "Invalid payload",
"errors": {
"formErrors": [],
"fieldErrors": {
"name": [
"String must contain at least 1 character(s)"
]
}
}
}{
"error": "<string>"
}{
"message": "Folder not found"
}{
"message": "A folder named \"Product docs\" already exists, send its folderId instead"
}{
"message": "File exceeds the 30MB limit"
}{
"message": "URL is unreachable"
}Authorizations
Body
application/jsonmultipart/form-data
- Website pages
- Text
Response
Created, with status: "processing". Pages and text return the knowledge base. Files return { data: [ ... ] }, one per file. A file that couldn't be stored comes back with status: "failed", while the rest still go through.
- Option 1
- Option 2
Status and size fields describe the current version.