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

# Delete Document

> Delete a specific document from a Famulor knowledge base via API. Permanently removes its content from the RAG index used by your AI voice assistant.

<Warning>
  **Famulor 1.0 API (legacy).** This page applies only to Famulor 1.0 (`app.famulor.de`) and is retained for legacy compatibility. For the current platform, use the [Famulor 2.0 API reference](/api-reference/introduction).
</Warning>

This endpoint permanently deletes a document from a knowledge base. The document's vector embeddings are also removed from the vector database.

### Path Parameters

<ParamField path="knowledgebaseId" type="integer" required>
  The unique identifier of the knowledge base
</ParamField>

<ParamField path="documentId" type="integer" required>
  The unique identifier of the document to delete
</ParamField>

### Response Fields

<ResponseField name="message" type="string">
  Success message
</ResponseField>

### What Gets Deleted

When you delete a document:

* **Document record** is removed from the database
* **Vector embeddings** are deleted from the vector database
* **Processed content** is removed from external document storage
* **Parent knowledge base status** is automatically updated

<Warning>
  This action is irreversible. The document and all its processed content will be permanently deleted.
</Warning>

<Note>
  If this was the last document in the knowledge base, the knowledge base status will change to `empty`.
</Note>

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

  ```json 404 Knowledgebase Not Found theme={null}
  {
    "error": "Knowledgebase not found."
  }
  ```

  ```json 404 Document Not Found theme={null}
  {
    "error": "Document not found."
  }
  ```

  ```json 500 Error theme={null}
  {
    "error": "Failed to delete document. Please try again."
  }
  ```
</ResponseExample>

<Tip>
  Related pages: [Introduction](/api-v1/introduction) and [Authentication Guide](/api-v1/authentication), and [API Integration Examples](/api-v1/introduction).
</Tip>
