Skip to content
TriedDocs
Knowledge bases

Refresh knowledge base

Re-fetch the URL sources of a knowledge base now, and add newly found pages.

POSThttps://api.tried.com.au/refresh-knowledge-base/{id}

Beyond Retell Starts a refresh in the background and returns the knowledge base right away. Use it after a website changes, instead of waiting for the daily auto refresh.

A refresh does two things:

  1. If auto_add_pages is on and crawl_roots is set, it crawls each root (up to 50 pages per root, sitemap first, the same way as Crawl preview) and adds pages that are not sources yet as new URL sources.
  2. It fetches every URL source again (plus the new ones), re-chunks the text with the current chunk settings and re-embeds it.

Text and file sources are not touched. When the refresh finishes, status is complete or error and last_refreshed_timestamp is updated.

With enable_auto_refresh on, Tried runs the same refresh for you when the last one is more than 24 hours old. The scheduler checks every 5 minutes.

Request#

Path parameter Type Required Description
id string Yes The knowledge base ID, starting with knowledge_base_.

This endpoint takes no body.

Example request#

curl -X POST https://api.tried.com.au/refresh-knowledge-base/knowledge_base_9f060d81a4d8df9b04ca6d12 \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch(
  "https://api.tried.com.au/refresh-knowledge-base/knowledge_base_9f060d81a4d8df9b04ca6d12",
  {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
  },
);
const kb = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/refresh-knowledge-base/knowledge_base_9f060d81a4d8df9b04ca6d12",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
kb = res.json()

Response#

200 OK

The knowledge base as it was when the refresh started. Poll Get knowledge base to follow progress.

{
  "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": 1760745600000,
  "chunk_size": 800,
  "chunk_overlap": 100,
  "auto_add_pages": true,
  "crawl_roots": ["https://example.com.au"]
}

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.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format. Failures during the background refresh do not produce an error response; they show as status: "error" on the knowledge base.