https://retellai.com/?utm_source=discord&utm_medium=seo logo
gimme api call postman collection for knowledge ba...
# ❓・ai-evy-support
s
@AI Evy gimme api call postman collection for knowledge base apis..
a
Thanks for tagging me @sekharm_95325. I'll look through relevant sources and get back to you shortly.
### Answer I don't have a Postman collection file available in the sources, but I can provide you with the key Knowledge Base API endpoints and their formats for Postman: Create Knowledge Base [(1) ]() - **Method**: POST - **Endpoint**:
/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:
Copy code
json
{
  "knowledge_base_texts": [
    {
      "text": "Hello, how are you?",
      "title": "Sample Question"
    }
  ]
}
For detailed API reference documentation, visit [Create Knowledge Base]() , [Get Knowledge Base]() , and [Add Knowledge Base Sources]() .
​ To learn more, see the sources I considered: [[1] Create Knowledge Base](https://docs.retellai.com/api-references/create-knowledge-base) [[2] Get Knowledge Base](https://docs.retellai.com/api-references/get-knowledge-base) [[3] Add Knowledge Base Sources](https://docs.retellai.com/api-references/add-knowledge-base-sources) [[4] Cannot Add Source to Knowledge Base Through API](https://discord.com/channels/1186424376300679209/1428127903199269046) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
what is the URL to hit ?
@AI Evy what is the exact URL i need to use for api integration ?
a
Thanks for the follow-up, @sekharm_95325. I'll get back to you soon.
### Answer The base URL for Retell AI's Knowledge Base API endpoints is: **` [(1) ]() For the specific Knowledge Base operations, you would use: - **Get Knowledge Base**: `GET [(2) ]() - **Delete Knowledge Base**: `DELETE [(3) ]() - **Delete Knowledge Base Source**: `DELETE [(4) ]() - **Add Knowledge Base Sources**: `POST [(1) ]() All requests require the Authorization header with your API key in the format:
Bearer YOUR_RETELL_API_KEY
[(2) ]()
​ To learn more, see the sources I considered: [[1] Add Knowledge Base Source API is not working -Please help](https://discord.com/channels/1186424376300679209/1352422278930890772) [[2] Get Knowledge Base](https://docs.retellai.com/api-references/get-knowledge-base) [[3] Delete Knowledge Base](https://docs.retellai.com/api-references/delete-knowledge-base) [[4] Delete Knowledge Base Source](https://docs.retellai.com/api-references/delete-knowledge-base-source) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy how do i add knowldeg bas ein spwcific namespace and agent ?
a
Thanks for the follow-up, @sekharm_95325. I'll get back to you soon.
### Answer ### Answer To add a knowledge base to a specific agent in Retell AI: Via Dashboard: [(1) ]() 1. Open the agent editor 2. Locate the "Knowledge Base" section 3. Select the knowledge base items you want to use For Conversation Flow Agents - Node Level Knowledge Base: 1. Open the agent editor 2. Click the Conversation Node you want to configure 3. Select and add the knowledge base items you want to use at that node level 4. Node level knowledge base will be combined with agent global knowledge base to provide more accurate context for a specific topic Important Notes: - An agent can have more than one knowledge base linked to it - When a knowledge base is linked to an agent, the agent will always try to retrieve information from the knowledge base before responding - There's no need to change your prompt for it to trigger, as it will be done automatically for every response generation Regarding Namespaces: I don't have information in the sources about adding knowledge bases to specific "namespaces" in Retell AI. The sources discuss workspaces and organizations [(2) ]() , but not namespaces in the context of knowledge base assignment. If you're looking to organize knowledge bases across different client accounts or teams, you may want to explore the Workspace feature , which allows you to create different organizations for clients or invite teammates. **
​ To learn more, see the sources I considered: [[1] Knowledge Base](https://docs.retellai.com/build/knowledge-base) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy getting 500 internal server error when creating knowldeg base uisng api {"status":"error","message":"Internal Server Error"}
a
Thanks for the follow-up, @sekharm_95325. I'll get back to you soon.
### Answer Based on the community discussions, the 500 Internal Server Error when creating a knowledge base is a known issue that several users have encountered [(1) ]() [(2) ]() [(3) ]() . Common Causes: 1. URL Format Issues - When including
knowledge_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) ]() :
Copy code
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) ]() :
Copy code
javascript
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 [)
​ To learn more, see the sources I considered: [[1] Discord message from @colin_43491 on 2025-11-04](https://discord.com/channels/1186424376300679209/1294891368505937952/1435219186719653920) [[2] Discord message from @aditya_11066 on 2025-02-11](https://discord.com/channels/1186424376300679209/1186462578310910112/1338784945216426035) [[3] internal server error on create knowledge base by API](https://discord.com/channels/1186424376300679209/1391417148215136376) [[4] Create Knowledge Base](https://docs.retellai.com/api-references/create-knowledge-base) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
still getting same error ❌ Error occurred: Message: Failed to create knowledge base: {"status":"error","message":"Internal Server Error"} Stack: Error: Failed to create knowledge base: {"status":"error","message":"Internal Server Error"} at RetellClient.createKnowledgeBase (/Users/sekharb@us.ibm.com/nirvah-ai/lib/api/retell.ts:44:13) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async main (/Users/sekharb@us.ibm.com/nirvah-ai/lib/api/retell.test.ts:42:20)
@AI Evy still getting same error ❌ Error occurred: Message: Failed to create knowledge base: {"status":"error","message":"Internal Server Error"} Stack: Error: Failed to create knowledge base: {"status":"error","message":"Internal Server Error"} at RetellClient.createKnowledgeBase (/Users/sekharb@us.ibm.com/nirvah-ai/lib/api/retell.ts:44:13) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async main (/Users/sekharb@us.ibm.com/nirvah-ai/lib/api/retell.test.ts:42:20)
a
Thanks for the follow-up, @sekharm_95325. I'll get back to you soon.
### Answer I understand you're still experiencing the 500 Internal Server Error when creating a knowledge base. Based on community reports, this is a known issue that the Retell team has been working on [(1) ]() . Verified Working Approach from Community: A community member shared a working solution using the Retell SDK with proper FormData handling :
Copy code
javascript
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() ;
Key Points from Community Troubleshooting: 1. When using variables for
knowledge_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. **
​ To learn more, see the sources I considered: [[1] internal server error on create knowledge base by API](https://discord.com/channels/1186424376300679209/1391417148215136376) [[2] Discord message from @colin_43491 on 2025-11-04](https://discord.com/channels/1186424376300679209/1294891368505937952/1435219186719653920) [[3] Create Knowledge Base](https://docs.retellai.com/api-references/create-knowledge-base) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy can we create custom recorded voice programmatically ?
a
Thanks for the follow-up, @sekharm_95325. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific information about creating custom voice clones programmatically through the Retell AI API [(1) ]() [(2) ]() . What the sources show: The documentation indicates you can add custom voices and voice clones through the Retell AI dashboard interface [(1) ]() : 1. Access the voice selector for ElevenLabs or Cartesia voices 2. Click "Add custom voice" or "Add voice clone" 3. Upload voice recordings to train the voice clone Important considerations from community discussions: - Voice cloning is sensitive and requires proper authorization [(2) ]() - Custom voices uploaded through ElevenLabs or Cartesia remain private to your account - You must have full rights to use any voice you clone - There's a limit of 100 custom voices per account [(1) ]() What's not documented: The sources don't provide API endpoints or programmatic methods for: - Creating voice clones via API - Uploading voice training samples programmatically - Managing custom voices through code Since this functionality isn't documented in the available sources, I recommend: - Visit [Contact Sales]() - Visit The Retell team can confirm whether programmatic voice clone creation is supported or if it's a feature that could be added.
​ To learn more, see the sources I considered: [[1] Choose a custom voice](https://docs.retellai.com/build/voice) [[2] Custom Voices from ElevenLabs](https://discord.com/channels/1186424376300679209/1294954011132432384) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.