https://retellai.com/?utm_source=discord&utm_medium=seo logo
API/Backend Integration for Knowledge Base Managem...
# ❓・bug-report
m
Hi Team, I'm working with voice agents and currently managing Knowledge Bases through the Retell dashboard. I'd like to automate this process and integrate KB management directly into my backend system. What I need: Ability to upload/update Knowledge Base documents programmatically via API Retrieve a Knowledge Base by ID and modify its contents Avoid manual updates through the Retell web interface Use case: My restaurant menu and information change frequently. I want to update the KB automatically from my backend when changes occur, rather than manually uploading files in the dashboard each time. Questions: Is there an API endpoint to upload/update Knowledge Base documents? Can I retrieve a KB by ID and modify its contents programmatically? What's the recommended approach for automated KB management? Thank you for your help!
o
Hello @matteo_v99 , Yes there is an API for Knowledge base
m
I'm getting HTTP 500 errors when trying to create a Knowledge Base via API, but listing existing KBs works fine. What Works: GET /list-knowledge-bases Returns: HTTP 200 OK (shows 6-7 existing KBs) What Fails: POST /create-knowledge-base Returns: HTTP 500 "Internal Server Error" API Key: key_... Request Details (Attempt 1 - with knowledge_base_urls): POST https://api.retellai.com/create-knowledge-base Headers: Authorization: Bearer key_... Content-Type: application/json Body: { "knowledge_base_name": "Menu Ristorante TavlyAI", "knowledge_base_urls": [ "https://my_backend.onrender.com/api/public/retell-menu/TavlyAI" ], "enable_auto_refresh": true } Response: HTTP 500 { "status": "error", "message": "Internal Server Error" } Request Details (Attempt 2 - with knowledge_base_texts): Body: { "knowledge_base_name": "Menu Ristorante TavlyAI", "knowledge_base_texts": [ { "title": "Menu Ristorante Completo", "text": "" } ] } Response: HTTP 500 (same error) Request Details (Attempt 3 - with auto_crawling_paths): Body: { "knowledge_base_name": "Menu Ristorante TavlyAI", "auto_crawling_paths": [{ "path": "https://my_backend.onrender.com/api/public/retell-menu/TavlyAI", "exclusion_urls": [] }], "enable_auto_refresh": true } Response: HTTP 400 { "status": "error", "message": "auto-crawling domain invalid" } Source URL Details: - URL: https://my_backend.onrender.com/api/public/retell-menu/TavlyAI - Size: 68,361 bytes (66.8 KB) - Content-Type: text/plain; charset=utf-8 - Format: Markdown - Publicly accessible: Yes (verified with curl, downloads successfully) - CORS headers: Access-Control-Allow-Origin: *
Questions: 1. Why is create-knowledge-base returning HTTP 500? 2. Which format should I use: knowledge_base_urls, knowledge_base_texts, or auto_crawling_paths? 3. Is there a size limit or KB count limit I'm hitting? 4. Does "auto-crawling domain invalid" mean tavly-test.onrender.com needs whitelisting? Workaround Needed: Currently creating KB manually via dashboard works, but I need API creation for automation.
@Omar Ashraf | Community Lead @User @Colin - Integrations @ Retell AI
o
I just checked For the Knowledge base you will have to use the SDK