Skip to main content
DELETE
/
api
/
v1
/
assistants
/
{assistant_id}
/
documents
/
{document_id}
Delete Document
curl --request DELETE \
  --url https://api.example.com/api/v1/assistants/{assistant_id}/documents/{document_id} \
  --header 'Authorization: Bearer <token>'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
This endpoint permanently deletes a document from an assistant’s knowledge base. This action also removes all associated vector embeddings from the database and cannot be undone.

Path Parameters

  • assistant_id (string, required): The identifier of the assistant that owns the document.
  • document_id (string, required): The identifier of the document to delete.

Response

A successful deletion will return a 200 OK status code with a confirmation message.
Response
{
  "message": "Document deleted successfully"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

assistant_id
integer
required
document_id
integer
required

Response

Successful Response