Claude
03/11/2026, 9:08 PMAI Evy
03/11/2026, 9:08 PMAI Evy
03/11/2026, 9:08 PMAI Evy
03/11/2026, 9:08 PMcaptureDeviceId parameter [(1) ]() :
javascript
await retellWebClient.startCall({
accessToken: createCallResponse.access_token,
sampleRate: 24000,
captureDeviceId: "default",
playbackDeviceId:
"0ec1807fd0fe6e51b990660ec4e2ebb78sdfcba51e279815d00c423ce03407ff",
emitRawAudioSamples: false,
}) ;
Listen to call events for debugging:
Monitor the call_started, call_ended, and error events to identify issues :
javascript
retellWebClient.on("call_started", () => {
console.log("call started") ;
}) ;
retellWebClient.on("error", (error) => {
console.error("An error occurred:", error) ;
retellWebClient.stopCall() ;
}) ;AI Evy
03/11/2026, 9:08 PMAI Evy
03/11/2026, 9:08 PMClaude
03/11/2026, 9:13 PMAI Evy
03/11/2026, 9:13 PMAI Evy
03/11/2026, 9:14 PMtasks array [(2) ]() . You can then choose to either "Send Now" to start the call immediately or "Schedule" for a future time [(1) ]() .
Here's how the API structure works for a single scheduled call [(2) ]() :
javascript
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) ;
To schedule it for a specific time, you would include the trigger_timestamp parameter, which represents the scheduled time as a Unix timestamp in milliseconds . If you omit this parameter, the call will be sent immediately .AI Evy
03/11/2026, 9:14 PMAI Evy
03/11/2026, 9:14 PMClaude
03/11/2026, 9:15 PMAI Evy
03/11/2026, 9:15 PMAI Evy
03/11/2026, 9:15 PMAI Evy
03/11/2026, 9:15 PMtasks array in the API accepts any number of tasks—including just one [(1) ]() . Each task represents a single outbound call , so you can create a batch call with a single task if you only need to schedule one call [(2) ]() .
The batch call feature is flexible for both single and bulk scenarios .AI Evy
03/11/2026, 9:15 PMClaude
03/11/2026, 9:18 PMAI Evy
03/11/2026, 9:18 PMAI Evy
03/11/2026, 9:18 PMtrigger_timestamp parameter when you create the batch call [(2) ]() . The scheduled time is set as a Unix timestamp in milliseconds . Once a batch call is scheduled, it executes at that predetermined time [(1) ]() [(2) ]() .
If during a call the person requests a different time, you would need to:
1. Capture that requested time during the conversation (your AI agent would need to be configured to handle this)
2. Create a new batch call with the rescheduled time using the API
The batch calling feature itself doesn't have built-in logic to dynamically reschedule based on in-call requests . You'd need to implement custom logic in your agent to:
- Detect the reschedule request
- Collect the new preferred time
- Trigger a new batch call creation via the API with the updated trigger_timestamp [(2) ]()
This would require integration with your backend systems to programmatically create new scheduled batch calls based on the conversation outcome.AI Evy
03/11/2026, 9:18 PMAI Evy
03/11/2026, 9:18 PMClaude
03/11/2026, 9:19 PMAI Evy
03/11/2026, 9:19 PMAI Evy
03/11/2026, 9:20 PMtrigger_timestamp parameter, which accepts a Unix timestamp in milliseconds [(1) ]() . If you omit this parameter, the call will be sent immediately . You can create batch calls with just one task (single call) or multiple tasks [(1) ]() [(2) ]() . When creating a batch call via the dashboard, you have two options: "Send Now" to start calls immediately or "Schedule" for a future time [(2) ]() . The scheduling functionality allows you to define specific time windows for when calls should be made . While I don't have information about Vapi's specific implementation to compare directly, Retell's batch calling feature does provide scheduling capabilities for outbound calls through the trigger_timestamp parameter [(1) ]() .AI Evy
03/11/2026, 9:20 PMAI Evy
03/11/2026, 9:20 PM