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

const client = new BrainbaseLabs({
  apiKey: 'My API Key',
});

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

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
number
required

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

batch_interval_minutes
number
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

Batch calls started successfully