API Reference
Delete Knowledge Base
DELETE /api/v1/knowledge-bases/:knowledgeBaseId — delete a Knowledge Base and everything in it.
Deletes the Knowledge Base, its documents, its crawled pages and its search index. This cannot be undone.
DELETE /api/v1/knowledge-bases/{knowledgeBaseId}A Knowledge Base that an Agent or a Workflow still uses cannot be deleted: detach it there first. This is the same rule Studio applies.
Response
204 No Content
Errors
| Status | error | When |
|---|---|---|
403 | forbidden | Your key is scoped to a project and this Knowledge Base is in a different one. |
404 | not_found | No Knowledge Base with this id exists in your organization. |
409 | knowledge_base_referenced | An Agent or Workflow still uses it. The response lists them under referents (kind, id, name). |