---
title: "Delete knowledge base"
method: DELETE
path: "/knowledgeBase/{kbId}"
tags: ["Knowledge Base"]
---

# Delete knowledge base

`DELETE /knowledgeBase/{kbId}`

Permanently delete a knowledge base and all its contents.

**Required permission:**

User must have `OWNER` role on the knowledge base.

**What gets deleted:**

- All folders within the KB
- All records and their indexed content
- All permission grants
- Associated storage files

**Warning:** This action is irreversible. Consider exporting data before deletion.

## Path parameters

- `kbId` string, required

## Response `200`

Knowledge base deleted successfully

- DeleteKnowledgeBaseById — Response returned by DELETE /knowledgeBase/{kbId} (deleteKnowledgeBase).
  - `success` boolean, required
  - `message` string, required

## Other responses

- `401` — Unauthorized — valid bearer token required
- `403` — Forbidden. Possible reasons: - OAuth token lacks the `kb:delete` scope - User has no permission on this knowledge base - User is not `OWNER` (only KB owners can delete) - Connector service denied the request
- `404` — Not found. Possible reasons: - Knowledge base does not exist - Authenticated user does not exist in the graph database
- `500` — Internal server error — deleting knowledge base failed in connector or database
- `503` — Service unavailable — connector service is unreachable

---

[API](https://skmtc.net/pipeshub-ai/apis/pipeshub-api.md) · [All operations](https://skmtc.net/pipeshub-ai/apis/pipeshub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipeshub-ai/pipeshub-api/versions/abd27cfefc73/schema)
