PUT
/
api
/
workers
/
{workerId}
/
deployments
/
voicev1
/
{deploymentId}
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 voiceV1Deployment = await client.workers.deployments.voicev1.update('deploymentId', {
    workerId: 'workerId',
  });

  console.log(voiceV1Deployment.id);
}

main();
{
  "id": "<string>",
  "phoneNumber": "<string>",
  "objective": "<string>",
  "startSentence": "<string>",
  "endSentence": "<string>",
  "voiceId": "<string>",
  "language": "<string>",
  "allowedTransferNumbers": "<string>",
  "functions": {},
  "model": "<string>",
  "resourceKeys": "<string>",
  "wsBaseUrl": "<string>"
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required
deploymentId
string
required

Body

application/json

Response

200
application/json

Updated voice v1 deployment

The response is of type object.