Delete Knowledge Base
This method allows you to delete a previously created knowledge base using its ID.
You can obtain the ID of the knowledge base to delete either from the API response when you created the knowledge base, or by listing the available knowledge bases. Note that knowledge bases that are in use by an agent cannot be deleted. If you attempt to do so, the API will raise an error. In this case, you have to unlink the knowledge base from all agents before being able to delete it.
When asynchronous deletion is requested (via async_mode=true), the knowledge base is marked for deletion but continues to be visible in the API until all content has been fully removed.
knowledge_base_id
When true, the deletion is performed asynchronously in the background. Synchronous deletion (async_mode=false) is subject to removal in a future release. Only asynchronous deletion will be supported going forward. Callers should migrate to async_mode=true and poll GET /knowledge-bases/{id} until the resource returns HTTP 404.
Successful Response
{
"id": "string",
"object": "string",
"deleted": false
}
id
object
deleted
Invalid knowledge base ID.
The knowledge base is not in a state where it can be deleted.
Validation Error
{
"detail": [
{
"loc": [
{}
],
"msg": "string",
"type": "string",
"ctx": {}
}
]
}
detail
curl -X DELETE -H 'Authorization: <value>' https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}