Assets
Chat Deployment Logs
Chat Deployments
Voice Deployments
- GETList custom webhooks for a deployment
- POSTCreate a new custom webhook for voice deployment
- GETGet a specific custom webhook
- DELDelete a custom webhook
- PATCHUpdate a custom webhook
- GETGet all voice deployments for a worker
- POSTCreate a new voice deployment
- GETGet a single voice deployment
- DELDelete a voice deployment
- PATCHUpdate a voice deployment
- POSTMake batch calls for a voice deployment
Voice Deployment Logs
Flows
Integrations
Folders
Resources
Tests
Voice V1 Deployments
- GETGet all voice v1 deployments for a worker
- POSTCreate a new voice v1 deployment
- GETGet a single voice v1 deployment
- PUTUpdate a voice v1 deployment
- DELDelete a voice v1 deployment
- POSTCreate a new campaign for a voice v1 deployment
- POSTMake batch calls for a voice v1 deployment
- POSTRun a campaign with provided data
- GETGet a campaign by ID
- GETGet specific campaign data by ID
- PUTUpdate specific campaign data by ID
Voice V1 Deployments
Create a new voice v1 deployment
POST
/
api
/
workers
/
{workerId}
/
deployments
/
voicev1
Copy
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 voiceV1Deployment = await client.workers.deployments.voicev1.create('workerId', {
allowedTransferNumbers: ['string'],
config: {},
endSentence: 'endSentence',
extractions: { foo: { description: 'description', required: true, type: 'string' } },
flowId: 'flowId',
functions: 'functions',
language: 'language',
model: 'model',
name: 'name',
objective: 'objective',
phoneNumber: 'phoneNumber',
resourceKeys: ['string'],
startSentence: 'startSentence',
voiceId: 'voiceId',
wsBaseUrl: 'wsBaseUrl',
});
console.log(voiceV1Deployment.id);
Copy
{
"id": "<string>",
"phoneNumber": "<string>",
"objective": "<string>",
"startSentence": "<string>",
"endSentence": "<string>",
"voiceId": "<string>",
"language": "<string>",
"allowedTransferNumbers": "<string>",
"functions": {},
"model": "<string>",
"resourceKeys": "<string>",
"wsBaseUrl": "<string>"
}
Authorizations
API key authentication
Path Parameters
Body
application/json
Response
201
application/json
Voice v1 deployment created
The response is of type object
.
Copy
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 voiceV1Deployment = await client.workers.deployments.voicev1.create('workerId', {
allowedTransferNumbers: ['string'],
config: {},
endSentence: 'endSentence',
extractions: { foo: { description: 'description', required: true, type: 'string' } },
flowId: 'flowId',
functions: 'functions',
language: 'language',
model: 'model',
name: 'name',
objective: 'objective',
phoneNumber: 'phoneNumber',
resourceKeys: ['string'],
startSentence: 'startSentence',
voiceId: 'voiceId',
wsBaseUrl: 'wsBaseUrl',
});
console.log(voiceV1Deployment.id);
Copy
{
"id": "<string>",
"phoneNumber": "<string>",
"objective": "<string>",
"startSentence": "<string>",
"endSentence": "<string>",
"voiceId": "<string>",
"language": "<string>",
"allowedTransferNumbers": "<string>",
"functions": {},
"model": "<string>",
"resourceKeys": "<string>",
"wsBaseUrl": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.