POST
/
api
/
workers
/
{workerId}
/
deployments
/
voicev1
/
{deploymentId}
/
campaigns
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() {
  const campaign = await client.workers.deployments.voicev1.campaigns.create('deploymentId', {
    workerId: 'workerId',
  });

  console.log(campaign.id);
}

main();
{
  "id": "<string>",
  "status": "RUNNING",
  "steps": [
    {}
  ]
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required
deploymentId
string
required

Body

application/json
steps
object[]

Array of campaign steps

Response

201
application/json
Campaign created successfully
id
string
status
enum<string>
Available options:
RUNNING,
COMPLETED,
FAILED
steps
object[]