Deletes one source from a knowledge base. Its stored chunks are deleted with it. The rest of the knowledge base is not re-ingested.
Request#
| Path parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The knowledge base ID, starting with knowledge_base_. |
source_id |
string | Yes | The source ID, starting with source_. |
Example request#
curl -X DELETE https://api.tried.com.au/delete-knowledge-base-source/knowledge_base_9f060d81a4d8df9b04ca6d12/source/source_21ce463cc228d0ea2a439493 \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch(
"https://api.tried.com.au/delete-knowledge-base-source/knowledge_base_9f060d81a4d8df9b04ca6d12/source/source_21ce463cc228d0ea2a439493",
{
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
},
);
const kb = await res.json();import os, requests
res = requests.delete(
"https://api.tried.com.au/delete-knowledge-base-source/knowledge_base_9f060d81a4d8df9b04ca6d12/source/source_21ce463cc228d0ea2a439493",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
kb = res.json()Response#
200 OK
Returns the knowledge base without the deleted source.
{
"knowledge_base_id": "knowledge_base_9f060d81a4d8df9b04ca6d12",
"knowledge_base_name": "Clinic FAQ",
"status": "complete",
"knowledge_base_sources": [
{
"source_id": "source_92055d142a2829e5c8e77a9f",
"type": "text",
"title": "Opening hours",
"url": null,
"content_url": "https://api.tried.com.au/get-knowledge-base-source-content/knowledge_base_9f060d81a4d8df9b04ca6d12/source_92055d142a2829e5c8e77a9f"
}
],
"enable_auto_refresh": false,
"last_refreshed_timestamp": 1760832000000,
"chunk_size": 800,
"chunk_overlap": 100,
"auto_add_pages": false,
"crawl_roots": []
}Fields are described in Get knowledge base.
Deleting a synced document does not stop the sync. If the document is still in the connected folder or page, the next sync adds it again. Use Delete knowledge base sync to stop syncing.
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request (this route needs the kb scope), or the caller is a read-only dashboard member. |
404 |
Knowledge base <id> not found or Source <source_id> not found. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.
Retell compatibility#
Same path, method and 200 response as Retell. Missing items return 404 (Retell uses 422).