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);
{
"batch_call_id": "batch_call_dbcc4412483ebfc348abb",
"name": "First batch call",
"from_number": "+14157774444",
"scheduled_timestamp": 1735718400,
"total_task_count": 123
}
Create a batch call
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);
{
"batch_call_id": "batch_call_dbcc4412483ebfc348abb",
"name": "First batch call",
"from_number": "+14157774444",
"scheduled_timestamp": 1735718400,
"total_task_count": 123
}
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Successfully created a batch call.
The response is of type object
.
Was this page helpful?