Delete Document
curl --request DELETE \
--url https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "Document deleted successfully."
}
{
"error": "Knowledgebase not found."
}
{
"error": "Document not found."
}
{
"error": "Failed to delete document. Please try again."
}
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.
DELETE
/
api
/
user
/
knowledgebases
/
{knowledgebaseId}
/
documents
/
{documentId}
Delete Document
curl --request DELETE \
--url https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents/{documentId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "Document deleted successfully."
}
{
"error": "Knowledgebase not found."
}
{
"error": "Document not found."
}
{
"error": "Failed to delete document. Please try again."
}
This endpoint permanently deletes a document from a knowledge base. The document’s vector embeddings are also removed from the vector database.
Path Parameters
integer
required
The unique identifier of the knowledge base
integer
required
The unique identifier of the document to delete
Response Fields
string
Success message
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
This action is irreversible. The document and all its processed content will be permanently deleted.
If this was the last document in the knowledge base, the knowledge base status will change to
empty.{
"message": "Document deleted successfully."
}
{
"error": "Knowledgebase not found."
}
{
"error": "Document not found."
}
{
"error": "Failed to delete document. Please try again."
}
Related pages: Introduction and Authentication Guide, and API Integration Examples.