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 campaign = await client.workers.deployments.voicev1.campaigns.create('deploymentId', {
workerId: 'workerId',
});
console.log(campaign.id);
{
"id": "<string>",
"steps": [
{}
]
}
Voice V1 Deployments
Create a new campaign for a voice v1 deployment
POST
/
api
/
workers
/
{workerId}
/
deployments
/
voicev1
/
{deploymentId}
/
campaigns
JavaScript
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 campaign = await client.workers.deployments.voicev1.campaigns.create('deploymentId', {
workerId: 'workerId',
});
console.log(campaign.id);