curl --location 'https://api.weya.live/backend/api/knowledgeBase?page=1&limit=10&search=sales' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Fetched successfully",
"errorMessage": null,
"data": {
"knowledgeBases": [
{
"_id": "687b1c2ab7c7d3f123456789",
"knowledgeBaseName": "Sales Knowledge Base",
"description": "Contains sales documents and FAQs.",
"status": "PENDING",
"vectorDbCollection": "kb_sales_1a2b3c",
"createdAt": "2026-07-20T10:00:00.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 10,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}
}
Knowledge Base
Get Knowledge Bases
Retrieve the knowledge bases in your organization.
GET
/
api
/
knowledgeBase
curl --location 'https://api.weya.live/backend/api/knowledgeBase?page=1&limit=10&search=sales' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Fetched successfully",
"errorMessage": null,
"data": {
"knowledgeBases": [
{
"_id": "687b1c2ab7c7d3f123456789",
"knowledgeBaseName": "Sales Knowledge Base",
"description": "Contains sales documents and FAQs.",
"status": "PENDING",
"vectorDbCollection": "kb_sales_1a2b3c",
"createdAt": "2026-07-20T10:00:00.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 10,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}
}
Overview
List the knowledge bases in your organization, newest first, with pagination and search.Prerequisites
- An API key for your workspace
Request
Case-insensitive text matched against the name, description and status. Partial matches are returned.
curl --location 'https://api.weya.live/backend/api/knowledgeBase?page=1&limit=10&search=sales' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Fetched successfully",
"errorMessage": null,
"data": {
"knowledgeBases": [
{
"_id": "687b1c2ab7c7d3f123456789",
"knowledgeBaseName": "Sales Knowledge Base",
"description": "Contains sales documents and FAQs.",
"status": "PENDING",
"vectorDbCollection": "kb_sales_1a2b3c",
"createdAt": "2026-07-20T10:00:00.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 10,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}
}
Always
PENDING; it isn’t updated after creation. A knowledge base with a vectorDbCollection has been indexed.Name of the search index. A video agent uses it as
rag.vectorDBCollection. Empty if indexing failed.Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
No KnowledgeBases found: no knowledge base matches, including when your organization has none or the page is past the end. - 429 Too Many Requests – More than 1,000 Knowledge Base requests in 15 minutes from your IP address.
- 500 Internal Server Error – Unexpected server error.
Was this page helpful?

