> ## 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.

# 删除文档

> 删除文档及其所有关联数据

删除文档时会同时：

1. 删除 pgvector 中该文档的所有向量 chunks
2. 使对应知识库的 BM25 索引失效
3. 删除本地文件
4. 删除 Next.js 端的数据库记录

<Warning>此操作不可逆，文档及其所有向量数据将被永久删除。</Warning>

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

<ParamField path="id" type="string" required>
  知识库 ID
</ParamField>

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

<ResponseField name="message" type="string">
  操作结果消息
</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": "文档已删除"
  }
  ```
</ResponseExample>
