POST
/
api
/
workers
/
{workerId}
/
deployments
/
voicev1
/
{deploymentId}
/
make-batch-calls
import BrainbaseLabs from 'brainbase-labs';

const client = new BrainbaseLabs({
  apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});

async function main() {
  await client.workers.deployments.voicev1.makeBatchCalls('deploymentId', {
    workerId: 'workerId',
    batch_interval_minutes: 'batch_interval_minutes',
    batch_size: 'batch_size',
    data: [{ id: 'id', phoneNumber: 'phoneNumber' }],
  });
}

main();

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required
deploymentId
string
required

Body

application/json
data
object[]
required

Array of data objects to process in batches, each requiring at least an id and phoneNumber

batch_size
string
required

Number of items to process in each batch (default 10)

batch_interval_minutes
string
required

Time interval between batches in minutes (default 5)

condition
string

Optional condition to evaluate for processing data. Supports template variables like {{variableName}}

extractions
object

Definitions of data to extract during calls, with each key representing a field to extract

wsUrl
string

Webhook URL to receive events when calls complete or extract data

additional_data
object

Additional data to pass with each request that will be available during the call

Response

200
_mintlify/placeholder

Batch calls started successfully