Ai Knowledge Sources
Required Permission: chatbots.knowledge-source.list
Resource: chatbots/:chatbotId
The ID of the chatbot.
The date after which to filter sources. Only sources created after this date will be fetched.
2025-09-29T07:08:00ZThe limit for how many sources should be fetched.
TODO
List of all knowledge sources.
Optional error message
The date of the latest fetched source.
2025-09-29T07:08:00ZInsufficient permissions.
GET /v1/chatbots/{chatbotId}/ai/knowledge/sources?parentId=text&groupId=text HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
"sources": [
{
"id": "bWDWW8q3ks31wQsc6xiD",
"source": "https://www.example-company.com/faq",
"groupIds": [
"meEcrKgnNHuBqDFXc3Pv"
],
"enabled": true,
"isIndexing": false,
"created": "2025-09-29T10:00:00Z",
"type": 0,
"status": 2,
"name": "FAQ page",
"errorReason": "Source not found.",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"role": 2,
"parentId": "bWDWW8q3ks31wQsc6xiD",
"updated": "2025-09-29T12:00:00Z",
"firecrawlJobData": {
"jobId": "text",
"jobStarted": "text",
"pagesCrawled": 1,
"creditsUsed": 1,
"lastCrawlJobId": "text",
"lastCrawlStatus": 0
},
"firecrawlCrawlOptions": {
"maxDepth": 3,
"limit": 50,
"includePaths": [
"/blog/*",
"/docs/*"
],
"excludePaths": [
"/admin/*",
"/private/*"
]
},
"pageChecksum": "abc123def456",
"autoRecrawl": true
}
],
"error": "text",
"pageToken": "2025-09-29T07:08:00Z"
}Required Permission: chatbots.knowledge-source.delete
Resource: chatbots/:chatbotId
The ID of the chatbot.
A list of deleted source Id's.
10ß443d31264etgDeletion result.
Optional error message.
Indicates whether the deletion succeeded.
trueInsufficient permissions.
DELETE /v1/chatbots/{chatbotId}/ai/knowledge/sources HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"sourceIds": "10ß443d31264etg"
}{
"error": "text",
"deleted": true
}Required Permission: chatbots.knowledge-source.get
Resource: chatbots/:chatbotId
The ID of the chatbot.
The ID of the knowledge source to retrieve.
Knowledge source details.
Optional error message
Content of the source split into chunks.
["Some Paragraph.","Another Paragraph"]Insufficient permissions.
GET /v1/chatbots/{chatbotId}/ai/knowledge/sources/{sourceId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
"source": {
"id": "bWDWW8q3ks31wQsc6xiD",
"source": "https://www.example-company.com/faq",
"groupIds": [
"meEcrKgnNHuBqDFXc3Pv"
],
"enabled": true,
"isIndexing": false,
"created": "2025-09-29T10:00:00Z",
"type": 0,
"status": 2,
"name": "FAQ page",
"errorReason": "Source not found.",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"role": 2,
"parentId": "bWDWW8q3ks31wQsc6xiD",
"updated": "2025-09-29T12:00:00Z",
"firecrawlJobData": {
"jobId": "text",
"jobStarted": "text",
"pagesCrawled": 1,
"creditsUsed": 1,
"lastCrawlJobId": "text",
"lastCrawlStatus": 0
},
"firecrawlCrawlOptions": {
"maxDepth": 3,
"limit": 50,
"includePaths": [
"/blog/*",
"/docs/*"
],
"excludePaths": [
"/admin/*",
"/private/*"
]
},
"pageChecksum": "abc123def456",
"autoRecrawl": true
},
"error": "text",
"chunksContent": [
"Some Paragraph.",
"Another Paragraph"
]
}Required Permission: chatbots.knowledge-source.create
Resource: chatbots/:chatbotId
The ID of the chatbot.
botKq8BxZaJd2wZR9cxd1PThe URL to crawl.
https://example.comThe crawl job was started successfully.
No content
POST /v1/chatbots/{chatbotId}/ai/knowledge/sources/crawl HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 143
{
"url": "https://example.com",
"options": {
"maxDepth": 3,
"limit": 50,
"includePaths": [
"/blog/*",
"/docs/*"
],
"excludePaths": [
"/admin/*",
"/private/*"
]
}
}The crawl job was started successfully.
No content
Required Permission: chatbots.knowledge-source.create
Resource: chatbots/:chatbotId
The ID of the chatbot.
Files to be uploaded as knowledge sources.
Upload result.
Indicates whether the upload was successful.
trueInsufficient permissions.
POST /v1/chatbots/{chatbotId}/ai/knowledge/sources/upload HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 20
{
"files": [
"binary"
]
}{
"success": true
}Last updated