Skip to content
TriedDocs
Knowledge bases

Update knowledge base

Rename a knowledge base or change its refresh, crawl and chunk settings.

PATCHhttps://api.tried.com.au/update-knowledge-base/{id}

Beyond Retell Changes the name and settings of a knowledge base. Send only the fields you want to change. Sources are not touched; use Add sources and Delete source for that.

Request#

Path parameter Type Required Description
id string Yes The knowledge base ID, starting with knowledge_base_.
Field Type Required Description
knowledge_base_name string No 1 to 40 characters, the same as on create.
enable_auto_refresh boolean No Re-fetch URL sources about once a day.
chunk_size integer No Target characters per chunk. 200 to 4000.
chunk_overlap integer No Characters shared between neighbouring chunks. 0 to 1000. Must be smaller than the chunk size after the update.
auto_add_pages boolean No On refresh, crawl crawl_roots and add new pages as sources.
crawl_roots array of strings No Up to 10 site URLs. Replaces the current list.

New chunk settings apply to sources ingested after the change. Existing chunks are not rebuilt. A refresh re-ingests URL sources only, so to re-chunk a text or file source, delete it and add it again.

Example request#

curl -X PATCH https://api.tried.com.au/update-knowledge-base/knowledge_base_9f060d81a4d8df9b04ca6d12 \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enable_auto_refresh": true, "auto_add_pages": true, "crawl_roots": ["https://example.com.au"]}'
const res = await fetch(
  "https://api.tried.com.au/update-knowledge-base/knowledge_base_9f060d81a4d8df9b04ca6d12",
  {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ enable_auto_refresh: true, auto_add_pages: true, crawl_roots: ["https://example.com.au"] }),
  },
);
const kb = await res.json();
import os, requests

res = requests.patch(
    "https://api.tried.com.au/update-knowledge-base/knowledge_base_9f060d81a4d8df9b04ca6d12",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={"enable_auto_refresh": True, "auto_add_pages": True, "crawl_roots": ["https://example.com.au"]},
)
kb = res.json()

Response#

200 OK

{
  "knowledge_base_id": "knowledge_base_9f060d81a4d8df9b04ca6d12",
  "knowledge_base_name": "Clinic FAQ",
  "status": "complete",
  "knowledge_base_sources": [
    {
      "source_id": "source_21ce463cc228d0ea2a439493",
      "type": "url",
      "title": "https://example.com.au/pricing",
      "url": "https://example.com.au/pricing",
      "content_url": "https://api.tried.com.au/get-knowledge-base-source-content/knowledge_base_9f060d81a4d8df9b04ca6d12/source_21ce463cc228d0ea2a439493"
    }
  ],
  "enable_auto_refresh": true,
  "last_refreshed_timestamp": 1760832000000,
  "chunk_size": 800,
  "chunk_overlap": 100,
  "auto_add_pages": true,
  "crawl_roots": ["https://example.com.au"]
}

Fields are described in Get knowledge base.

Errors#

Status When
400 A field fails validation, or chunk_overlap must be smaller than chunk_size.
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.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.