hhbuddy
07/30/2025, 6:38 PMAI Evy
07/30/2025, 6:38 PMAI Evy
07/30/2025, 6:39 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const batchCallResponse = await client.batchCall.createBatchCall({
from_number: '+14157774444',
tasks: [{ to_number: '+12137774445' }],
}) ;
console.log(batchCallResponse.batch_call_id) ;
The API accepts:
- `from_number`: Your purchased Retell number in E.164 format
- `tasks`: An array of call tasks, each containing a to_number and optional retell_llm_dynamic_variables
- `name`: Optional batch call name for reference
- `trigger_timestamp`: Optional scheduling for future execution
For your use case with Convoso, you would:
1. Make an API call to Convoso to retrieve your phone number list
2. Format the numbers into the tasks array structure
3. Call Retell's batch call API with your formatted data
The batch calling feature supports scheduling calls for immediate dispatch or future timing, and pricing is $0.005 per dial [(2) ]() . You can monitor the progress and results through the dashboard or additional API calls [(3) ]() .AI Evy
07/30/2025, 6:39 PMAI Evy
07/30/2025, 6:39 PMhhbuddy
07/30/2025, 6:40 PMAI Evy
07/30/2025, 6:40 PMAI Evy
07/30/2025, 6:41 PMget_phone_numbers)
- Provide a description of what the function does
- Set the HTTP method (GET, POST, PATCH, PUT, or DELETE) [(1) ]() [(2) ]()
- Add your external service's endpoint URL
2. Set up request parameters :
- Define custom headers if needed for authentication
- Set query parameters for your API call
- Define parameters using JSON schema format for POST/PATCH/PUT requests
3. Handle the response :
- Extract values from the API response and save them as dynamic variables
- Use these variables later in the conversation or for subsequent API calls
When Retell calls your custom function, it sends a request with this structure :AI Evy
07/30/2025, 6:41 PMjson
{
"call": {
"call_type": "phone_call",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"call_status": "registered",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"opt_out_sensitive_data_storage": true
},
"name": "get_weather",
"args": {
"city": "New York"
}
}
[(3) ]()
Your endpoint can then make calls to external services (like Convoso) to retrieve phone numbers and return the data to Retell for further processing [(1) ]() [(2) ]() . The response can be in various formats (string, JSON object, etc.) and will be converted to string before sending to the LLM .
For verification, you can check the X-Retell-Signature header to ensure requests are coming from Retell .AI Evy
07/30/2025, 6:41 PMAI Evy
07/30/2025, 6:41 PMhhbuddy
07/30/2025, 6:44 PMAI Evy
07/30/2025, 6:44 PMAI Evy
07/30/2025, 6:44 PMAI Evy
07/30/2025, 6:44 PMAI Evy
07/30/2025, 6:44 PMhhbuddy
07/30/2025, 6:50 PMAI Evy
07/30/2025, 6:50 PMAI Evy
07/30/2025, 6:50 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const batchCallResponse = await client.batchCall.createBatchCall({
from_number: '+14157774444',
tasks: [{ to_number: '+12137774445' }],
}) ;
console.log(batchCallResponse.batch_call_id) ;AI Evy
07/30/2025, 6:50 PMtasks arrays containing phone numbers and optional dynamic variables
The community has noted that platforms like Make.com or n8n are commonly used for these types of integrations rather than Zapier, since there's no direct Zapier integration with Retell [(3) ]() . These platforms provide better control over API interactions and result handling .
Your custom solution would essentially act as a bridge between your existing auto dialer's intelligence (who to call, when to call) and Retell AI's conversational capabilities (what to say, how to handle the conversation) [(1) ]() [(4) ]() .AI Evy
07/30/2025, 6:50 PMAI Evy
07/30/2025, 6:50 PMhhbuddy
07/30/2025, 6:53 PMAI Evy
07/30/2025, 6:53 PMAI Evy
07/30/2025, 6:54 PMAI Evy
07/30/2025, 6:54 PMAI Evy
07/30/2025, 6:54 PM