Skip to main content
DELETE
/
api
/
knowledge-base
/
{id}
/
documents
/
{docId}
curl --request DELETE \
  --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents/doc_xyz789 \
  --header 'Authorization: Bearer <token>'
{
  "message": "Document deleted"
}
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
This operation is irreversible. The document and all its vector data will be permanently deleted.
Authorization
string
required
Bearer JWT Token
id
string
required
Knowledge base ID
docId
string
required
Document ID
message
string
Operation result message
curl --request DELETE \
  --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents/doc_xyz789 \
  --header 'Authorization: Bearer <token>'
{
  "message": "Document deleted"
}