> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.agentspro.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Document

> Delete a document and all its associated data

Deleting a document will simultaneously:

1. Remove all vector chunks for this document from pgvector
2. Invalidate the BM25 index for the corresponding knowledge base
3. Delete the local file
4. Delete the database record on the Next.js side

<Warning>This operation is irreversible. The document and all its vector data will be permanently deleted.</Warning>

<ParamField header="Authorization" type="string" required>
  Bearer JWT Token
</ParamField>

<ParamField path="id" type="string" required>
  Knowledge base ID
</ParamField>

<ParamField path="docId" type="string" required>
  Document ID
</ParamField>

<ResponseField name="message" type="string">
  Operation result message
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents/doc_xyz789 \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Document deleted"
  }
  ```
</ResponseExample>
