curl --location --request PUT 'https://api.weya.live/backend/api/knowledgeBase/687b1c2ab7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY' \
--form 'knowledgeBaseName="Updated Customer Support KB"' \
--form 'description="Updated support documentation"'
{
"status": true,
"code": 200,
"message": "KnowledgeBase updated successfully",
"errorMessage": null,
"data": {
"_id": "687b1c2ab7c7d3f123456789",
"knowledgeBaseName": "Updated Customer Support KB",
"description": "Updated support documentation",
"vectorDbCollection": "kb_customer_support_1a2b3c",
"status": "PENDING",
"updatedAt": "2026-07-20T16:45:18.000Z"
}
}
Knowledge Base
Update Knowledge Base
Rename a knowledge base, change its description, or store more files in it.
PUT
/
api
/
knowledgeBase
/
{knowledgeBaseId}
curl --location --request PUT 'https://api.weya.live/backend/api/knowledgeBase/687b1c2ab7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY' \
--form 'knowledgeBaseName="Updated Customer Support KB"' \
--form 'description="Updated support documentation"'
{
"status": true,
"code": 200,
"message": "KnowledgeBase updated successfully",
"errorMessage": null,
"data": {
"_id": "687b1c2ab7c7d3f123456789",
"knowledgeBaseName": "Updated Customer Support KB",
"description": "Updated support documentation",
"vectorDbCollection": "kb_customer_support_1a2b3c",
"status": "PENDING",
"updatedAt": "2026-07-20T16:45:18.000Z"
}
}
Overview
Update one of your organization’s knowledge bases. Send only the fields you want to change. Existing files are kept.Files uploaded with this endpoint are stored but the knowledge base is not indexed again, so agents can’t answer from them yet. To add files that agents can use, upload them with Create Knowledge Base using the same
knowledgeBaseName; that indexes the whole knowledge base again.Prerequisites
- An API key for your workspace
- The knowledge base ID, from Get Knowledge Bases
- Send the request as
multipart/form-data
Request
Files to store: up to 50 files of up to 10 MB each. A file with the same name as an existing one replaces it.
curl --location --request PUT 'https://api.weya.live/backend/api/knowledgeBase/687b1c2ab7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY' \
--form 'knowledgeBaseName="Updated Customer Support KB"' \
--form 'description="Updated support documentation"'
Response
{
"status": true,
"code": 200,
"message": "KnowledgeBase updated successfully",
"errorMessage": null,
"data": {
"_id": "687b1c2ab7c7d3f123456789",
"knowledgeBaseName": "Updated Customer Support KB",
"description": "Updated support documentation",
"vectorDbCollection": "kb_customer_support_1a2b3c",
"status": "PENDING",
"updatedAt": "2026-07-20T16:45:18.000Z"
}
}
The updated knowledge base record. It doesn’t list files; use List Knowledge Base Documents.
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
knowledgeBaseIdisn’t a valid ID,File exceeds the 10MB per-file limit, orYou can upload at most 50 files per request. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
KnowledgeBase not found: it doesn’t exist in your organization. - 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?

