---
title: "Delete a document and its files"
method: DELETE
path: "/documents/{document_id}"
tags: ["documents"]
---

# Delete a document and its files

`DELETE /documents/{document_id}`

Delete a document and its files from storage.

By default (cascade=true) also deletes all facts extracted from this
document across all POTs in the workspace, removes their edges and
embeddings, and recalculates POT scores on affected neighbor facts.

BREAKING (v0.4.6): the default flipped from cascade=false to cascade=true
so the erasure semantics match the published retention policy — deleting a
source document must not leave derived knowledge behind. Integrators that
relied on the old default must pass cascade=false explicitly.

## Path parameters

- `document_id` string, uuid, required

## Query parameters

- `cascade` boolean — Cascade delete facts, edges, embeddings and recalculate scores. Default true since v0.4.6 (retention policy): deleting a document erases the knowledge derived from it. Pass cascade=false to keep extracted facts (metadata + files only).

## Response `200`

Document deleted with cascade (returns DeletionResult)

- unknown

## Other responses

- `204` — Document deleted (no cascade)
- `404` — Document not found
- `422` — Validation Error

---

[API](https://skmtc.dev/scipot/apis/scipot-core-api.md) · [All operations](https://skmtc.dev/scipot/apis/scipot-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scipot/scipot-core-api/revisions/e8712e9ffeae/schema)
