import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const outboundCampaign = await client.workers.deployments.voice.outboundCampaigns.create(
'deploymentId',
{ workerId: 'workerId', data: [{}] },
);
console.log(outboundCampaign.id);{
"id": "<string>",
"status": "<string>",
"data": {},
"batchSize": 123,
"batchIntervalMinutes": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deploymentId": "<string>",
"workerId": "<string>",
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"additionalData": {},
"telephonyProvider": {},
"flowId": "<string>",
"createdById": "<string>"
}import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const outboundCampaign = await client.workers.deployments.voice.outboundCampaigns.create(
'deploymentId',
{ workerId: 'workerId', data: [{}] },
);
console.log(outboundCampaign.id);{
"id": "<string>",
"status": "<string>",
"data": {},
"batchSize": 123,
"batchIntervalMinutes": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deploymentId": "<string>",
"workerId": "<string>",
"teamId": "<string>",
"name": "<string>",
"description": "<string>",
"additionalData": {},
"telephonyProvider": {},
"flowId": "<string>",
"createdById": "<string>"
}API key authentication
Contact data array
Campaign name
Campaign description
Number of calls to make simultaneously
Minutes to wait between batches
Additional metadata
Telephony provider configuration
Campaign status
CREATED, STARTED, RUNNING, COMPLETED, STOPPED, FAILED User ID who created the campaign
Team ID
Flow ID
Campaign created successfully