For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ai Knowledge Groups

Lists all knowledge groups

get

Required Permission: chatbots.knowledge-source.list

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Query parameters
pageTokenstringOptional

The date after which to filter groups. Only groups created after this date will be fetched.

Example: 2025-09-29T07:08:00Z
limitnumberOptional

The limit for how many groups should be fetched.

Responses
200

List of all knowledge groups.

application/json
errorstringOptional

Optional error message.

pageTokenstringRequired

The date of the latest fetched group.

Example: 2025-09-29T07:08:00Z
get/v1/chatbots/{chatbotId}/ai/knowledge/groups
GET /v1/chatbots/{chatbotId}/ai/knowledge/groups HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "groups": [
    {
      "id": "zwMeh3bYIMZQfzOqDFiO",
      "name": "General FAQs",
      "created": "2025-09-29T07:08:00Z",
      "systemDefault": false,
      "sourceIds": [
        "2BkwBSWySONimJWNwtws"
      ]
    }
  ],
  "error": "text",
  "pageToken": "2025-09-29T07:08:00Z"
}

Creates a new knowledge group

post

Required Permission: chatbots.knowledge-source.create

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Body
namestringRequired

Name of the new knowledge group.

Example: General FAQs
Responses
201

Knowledge group created successfully.

application/json
errorstringOptional

Optional error message.

post/v1/chatbots/{chatbotId}/ai/knowledge/groups
POST /v1/chatbots/{chatbotId}/ai/knowledge/groups HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "name": "General FAQs"
}
{
  "group": {
    "id": "zwMeh3bYIMZQfzOqDFiO",
    "name": "General FAQs",
    "created": "2025-09-29T07:08:00Z",
    "systemDefault": false,
    "sourceIds": [
      "2BkwBSWySONimJWNwtws"
    ]
  },
  "error": "text"
}

Retrieves a specific knowledge group

get

Required Permission: chatbots.knowledge-source.get

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

groupIdstringRequired

The ID of the knowledge group to retrieve.

Responses
200

Knowledge group details.

application/json
errorstringOptional

Optional error message.

get/v1/chatbots/{chatbotId}/ai/knowledge/groups/{groupId}
GET /v1/chatbots/{chatbotId}/ai/knowledge/groups/{groupId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "group": {
    "id": "zwMeh3bYIMZQfzOqDFiO",
    "name": "General FAQs",
    "created": "2025-09-29T07:08:00Z",
    "systemDefault": false,
    "sourceIds": [
      "2BkwBSWySONimJWNwtws"
    ]
  },
  "error": "text"
}

Deletes a knowledge group

delete

Required Permission: chatbots.knowledge-source.delete

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

groupIdstringRequired

The ID of the knowledge group to delete.

Responses
200

Knowledge group deleted successfully.

application/json
errorstringOptional

Optional error message.

delete/v1/chatbots/{chatbotId}/ai/knowledge/groups/{groupId}
DELETE /v1/chatbots/{chatbotId}/ai/knowledge/groups/{groupId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "error": "text"
}

Updates an existing knowledge group

patch

Required Permission: chatbots.knowledge-source.edit

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

groupIdstringRequired

The ID of the knowledge group to update.

Body
Responses
200

Knowledge group updated successfully.

application/json
errorstringOptional

Optional error message.

patch/v1/chatbots/{chatbotId}/ai/knowledge/groups/{groupId}
PATCH /v1/chatbots/{chatbotId}/ai/knowledge/groups/{groupId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 110

{
  "updated": {
    "name": "Product information Q4 2025",
    "sourceIds": [
      "hC79d9u4lUjGWUCTzhSF",
      "PkF60rG0wzDg3ZhJlaXp"
    ]
  }
}
{
  "group": {
    "id": "zwMeh3bYIMZQfzOqDFiO",
    "name": "General FAQs",
    "created": "2025-09-29T07:08:00Z",
    "systemDefault": false,
    "sourceIds": [
      "2BkwBSWySONimJWNwtws"
    ]
  },
  "error": "text"
}

Last updated