Detach a source
curl --request DELETE \
--url https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "knowledge_base.document",
"deleted": true
}Documents
Detach a source
Deletes vectors (keyed by document_id), chunks, and the document
row; notifies the crawler to drop crawler_document_id when
relevant. Never deletes the native file - call
DELETE /v2/workspaces/{ws}/files/{id} separately if the bytes
should go too. Requires editor+ and document ownership - a
non-owner, non-admin editor deleting a document they do not own
gets 403 FORBIDDEN.
DELETE
/
v1
/
knowledge_bases
/
{knowledgeBaseId}
/
documents
/
{documentId}
Detach a source
curl --request DELETE \
--url https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "knowledge_base.document",
"deleted": true
}Authorizations
User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.
Path Parameters
Knowledge base id. Legacy physical prefix vs_ (the kb_ rename is deferred).
Maximum string length:
128Pattern:
^vs_[A-Za-z0-9-]+$Document id. Legacy physical prefix vsf_ (the doc_ rename is deferred).
Maximum string length:
128Pattern:
^vsf_[A-Za-z0-9-]+$Was this page helpful?