sekharm_95325
11/17/2025, 6:31 PMAI Evy
11/17/2025, 6:31 PMAI Evy
11/17/2025, 6:32 PM/create-knowledge-base
- **Authorization**: Bearer YOUR_RETELL_API_KEY
- **Body Type**: multipart/form-data
- **Required Fields**:
- knowledge_base_name (string)
- knowledge_base_texts (array of objects with title and text)
- knowledge_base_files (file array, limit 25 files, 50MB each)
- knowledge_base_urls (string array)
- enable_auto_refresh (boolean)
Get Knowledge Base [(2) ]()
- **Method**: GET
- **Endpoint**: /get-knowledge-base/{knowledge_base_id}
- **Authorization**: Bearer YOUR_RETELL_API_KEY
- **Path Parameter**: knowledge_base_id (e.g., "kb_1234567890")
Add Knowledge Base Sources [(3) ]()
- **Method**: POST
- **Endpoint**: /add-knowledge-base-sources/{knowledge_base_id}
- **Authorization**: Bearer YOUR_RETELL_API_KEY
- **Body Type**: multipart/form-data
- **Fields**:
- knowledge_base_texts (array)
- knowledge_base_files (file array)
- knowledge_base_urls (string array)
**Important Note**: When using the Add Knowledge Base Sources endpoint in Postman, use JSON format for the knowledge_base_texts field rather than form-data [(4) ]() . The format should be:
json
{
"knowledge_base_texts": [
{
"text": "Hello, how are you?",
"title": "Sample Question"
}
]
}AI Evy
11/17/2025, 6:32 PMAI Evy
11/17/2025, 6:32 PMsekharm_95325
11/17/2025, 6:35 PMsekharm_95325
11/17/2025, 6:39 PMAI Evy
11/17/2025, 6:39 PMAI Evy
11/17/2025, 6:39 PMBearer YOUR_RETELL_API_KEY [(2) ]()AI Evy
11/17/2025, 6:40 PMAI Evy
11/17/2025, 6:40 PMsekharm_95325
11/17/2025, 6:40 PMAI Evy
11/17/2025, 6:40 PMAI Evy
11/17/2025, 6:40 PMAI Evy
11/17/2025, 6:40 PMAI Evy
11/17/2025, 6:40 PMsekharm_95325
11/17/2025, 7:23 PMAI Evy
11/17/2025, 7:23 PMAI Evy
11/17/2025, 7:23 PMknowledge_base_urls, ensure they are valid URLs [(1) ]() [(3) ]()
2. Request Body Format - The Retell team has been working on knowledge base issues [(3) ]()
3. Payload Structure - Incorrect formatting of knowledge_base_texts or other fields
Troubleshooting Steps:
First, verify your request body matches this exact format [(4) ]() :
json
{
"knowledge_base_name": "Sample KB",
"knowledge_base_texts": [
{
"text": "Hello, how are you?",
"title": "Sample Question"
}
],
"knowledge_base_urls": [
"<https://www.retellai.com%22,>
"<https://docs.retellai.com%22>
]
}
Key Requirements:
- knowledge_base_name must be less than 40 characters
- knowledge_base_texts should be an array of objects with title and text fields
- knowledge_base_urls must be valid URLs
- Files are limited to 25 files, 50MB each
Alternative Approach:
If the error persists, try using the Retell SDK instead of direct API calls [(3) ]() :AI Evy
11/17/2025, 7:23 PMjavascript
import Retell from 'retell-sdk';
import fs from 'fs';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
async function main() {
const formData = new FormData() ;
formData.append('knowledge_base_name', 'KB_Name') ;
const response = await fetch('<https://api.retellai.com/create-knowledge-base',> {
method: 'POST',
headers: {
'Authorization': `Bearer ${client.apiKey}`,
},
body: formData,
}) ;
const result = await response.json() ;
console.log(result) ;
}
If these steps don't resolve the issue, I recommend:
- Visit [Contact Sales]()
- Visit [)AI Evy
11/17/2025, 7:24 PMAI Evy
11/17/2025, 7:24 PMsekharm_95325
11/17/2025, 7:34 PMsekharm_95325
11/17/2025, 7:34 PMAI Evy
11/17/2025, 7:34 PMAI Evy
11/17/2025, 7:35 PMjavascript
import Retell from 'retell-sdk';
import fs from 'fs';
const client = new Retell({
apiKey: 'Key',
}) ;
async function main() {
try {
const formData = new FormData() ;
const fileContent = fs.readFileSync('./test.txt') ;
const fileBlob = new Blob([fileContent], { type: 'text/plain' }) ;
formData.append('knowledge_base_name', 'KB_Name') ;
formData.append('knowledge_base_files', fileBlob, 'FILE_NAME.txt') ;
const response = await fetch('<https://api.retellai.com/create-knowledge-base',> {
method: 'POST',
headers: {
'Authorization': `Bearer ${client.apiKey}`,
},
body: formData,
}) ;
if (!response.ok) {
const errorText = await response.text() ;
console.error('Error creating knowledge base:', errorText) ;
return;
}
const result = await response.json() ;
console.log('Knowledge base created successfully:', result) ;
} catch (error) {
console.error('Error:', error) ;
}
}
main() ;AI Evy
11/17/2025, 7:35 PMknowledge_base_name, ensure they're properly formatted as strings
2. The Retell support team confirmed they're actively working on knowledge base API issues
3. Multiple users reported the same 500 error, particularly when including URLs in the request [(2) ]() [(1) ]()
What to Check:
- Ensure your knowledge_base_name is less than 40 characters [(3) ]()
- If including URLs, verify they're valid and accessible
- For files, stay within the 25 file limit with each file under 50MB
Since this appears to be a platform issue that multiple users have encountered, I recommend:
- Visit [Contact Sales]()
- Visit
The support team can investigate your specific case and provide updates on the ongoing knowledge base API fixes.
**AI Evy
11/17/2025, 7:35 PMAI Evy
11/17/2025, 7:35 PMsekharm_95325
11/17/2025, 8:52 PMAI Evy
11/17/2025, 8:52 PMAI Evy
11/17/2025, 8:52 PMAI Evy
11/17/2025, 8:52 PMAI Evy
11/17/2025, 8:52 PM