---
title: "Delete a document from the knowledge base. When deleting a document, which can consist of multiple files, all the memories previously extracted are deleted too."
method: DELETE
path: "/documents"
tags: ["Microsoft.KernelMemory.ServiceAssembly"]
---

# Delete a document from the knowledge base. When deleting a document, which can consist of multiple files, all the memories previously extracted are deleted too.

`DELETE /documents`

Delete a document from the knowledge base.

## Query parameters

- `index` string
- `documentId` string, required

## Response `202`

Accepted

- DeleteAccepted
  - `index` string, nullable
  - `documentId` string, nullable
  - `message` string, nullable

## Other responses

- `401` — Unauthorized
- `403` — Forbidden

## Changes

- **2024-12-17** `f1234181a074` — 1 info
  - api operation id `DeleteDocumentById` was added
- **2024-10-19** `10e0db8acfa5` — 1 info
  - api operation id `DeleteDocumentById` removed and replaced with ``

[Change history](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly/changes/documents/delete.md)

---

[API](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly.md) · [All operations](https://skmtc.dev/azure/apis/microsoft-kernelmemory-serviceassembly/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/microsoft-kernelmemory-serviceassembly/revisions/0c988a89a508/schema)
