---
title: "Delete Knowledge Base"
method: DELETE
path: "/knowledge_bases/v2/{kb_id}"
tags: ["Knowledge Bases V2"]
deprecated: true
---

# Delete Knowledge Base

`DELETE /knowledge_bases/v2/{kb_id}`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/knowledge_bases/v2/{kb_id}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

> **Deprecated.**

Soft delete a knowledge base and clean up associated vector data.

This endpoint:
1. Verifies KB exists and user has permission, locking the KB row
2. In one transaction, soft deletes all chunks (lightrag_doc_chunks), all
   documents (knowledge_documents) and the knowledge base (is_deleted=True)
3. Deletes the KB's vectors from Weaviate, best-effort, after the
   transaction commits: the legacy tenant collections (by workspace) and
   this tenant's objects in the v2 ``Doc_kb_<id>_chunks`` collection
4. Preserves chunk access logs for analytics
5. Leaves S3 files intact (for audit/recovery purposes)

Note: The knowledge base can be restored by setting is_deleted=False,
but vector data will need to be re-ingested from the preserved chunks.

## Path parameters

- `kb_id` integer, required

## Response `200`

Successful Response

- unknown

## Other responses

- `403`: Permission denied
- `404`: Knowledge base not found
- `422`: Validation Error

## Changes

- **2026-10-27** `883849803623`: 1 warning
  - for the `path` request parameter `kb_id`, the exclusiveMinimum was set to `0.00`

[Operation history](https://skmtc.dev/myaltimate/apis/myaltimate-api/changes/knowledge_bases/v2/:kb_id/delete.md)

---

[API](https://skmtc.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
