Skip to main content
DELETE
/
v1
/
knowledge
/
{kb_id}
/
documents
/
{document_id}
Delete Knowledge Base Document By Id
curl --request DELETE \
  --url https://api.xpander.ai/v1/knowledge/{kb_id}/documents/{document_id} \
  --header 'x-api-key: <api-key>'
{
  "message": "Document deleted successfully"
}
Permanently remove a document from a knowledge base. This deletes the document file, all extracted chunks, and vector embeddings.

Path Parameters

kb_id
string
required
Unique identifier of the knowledge base (UUID format)
document_id
string
required
Unique identifier of the document to delete (UUID format)

Response

Returns 202 Accepted on successful deletion.

Example Request

curl -X DELETE -H "x-api-key: <your-api-key>" \
  https://api.xpander.ai/v1/knowledge/<kb-id>/documents/<document-id>

Example Response

HTTP/1.1 202 Accepted
Content-Type: application/json

null

Notes

  • This action cannot be undone
  • All vector embeddings for this document will be removed from search
  • Agents using this knowledge base will no longer have access to this document’s content
  • The document file itself is permanently deleted from storage
  • Returns 404 if the document or knowledge base is not found

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

kb_id
string
required
document_id
string
required

Response

Successful Response