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 voiceDeployment = await client.workers.deployments.voice.create('workerId', {
flowId: 'flowId',
name: 'name',
phoneNumber: 'phoneNumber',
});
console.log(voiceDeployment.id);import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
voice_deployment = client.workers.deployments.voice.create(
worker_id="workerId",
flow_id="flowId",
name="name",
phone_number="phoneNumber",
)
print(voice_deployment.id)curl --request POST \
--url https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"phoneNumber": "<string>",
"flowId": "<string>",
"backupPhoneNumber": "<string>",
"backupPhoneMessage": "<string>",
"flowVersionId": "<string>",
"externalConfig": {
"language": "<string>",
"voiceId": "<string>",
"fallbackVoiceIds": [
"<string>"
],
"voiceTemperature": 123,
"voiceSpeed": 123,
"volume": 123,
"responsiveness": 123,
"interruptibility": 123,
"enableResponsiveReactions": true,
"responsiveReactionsFrequency": 123,
"responsiveReactionsWords": [
"<string>"
],
"reminderTriggerMs": 123,
"reminderMaxCount": 123,
"ambientSound": "<string>",
"ambientSoundVolume": 123,
"boostedKeywords": [
"<string>"
],
"enableTranscriptionFormatting": true,
"optOutSensitiveDataStorage": true,
"pronunciationDictionary": [
{
"word": "<string>",
"phoneme": "<string>"
}
],
"normalizeForSpeech": true,
"endCallAfterSilenceMs": 123,
"maxCallDurationMs": 123,
"enableVoicemailDetection": true,
"voicemailMessage": "<string>",
"voicemailDetectionTimeoutMs": 123,
"voiceEmotionEnabled": true,
"beginMessageDelayMs": 123,
"ringDurationMs": 123,
"audioEncoding": "<string>",
"sampleRate": 123,
"reduceSilence": true,
"fillerAudioEnabled": true,
"enableBackchannel": true,
"backchannelFrequency": 123,
"backchannelWords": [
"<string>"
],
"piiConfig": {
"categories": [
"<string>"
]
},
"engineVersion": "<string>",
"includeReason": true,
"filters": "<string>"
},
"enableVoiceSentiment": true,
"engineModel": "<string>",
"extractions": {},
"createSipTrunk": true,
"successCriteria": [
{
"title": "<string>",
"items": [
{
"title": "<string>",
"description": "<string>",
"threshold": 123
}
],
"description": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phoneNumber' => '<string>',
'flowId' => '<string>',
'backupPhoneNumber' => '<string>',
'backupPhoneMessage' => '<string>',
'flowVersionId' => '<string>',
'externalConfig' => [
'language' => '<string>',
'voiceId' => '<string>',
'fallbackVoiceIds' => [
'<string>'
],
'voiceTemperature' => 123,
'voiceSpeed' => 123,
'volume' => 123,
'responsiveness' => 123,
'interruptibility' => 123,
'enableResponsiveReactions' => true,
'responsiveReactionsFrequency' => 123,
'responsiveReactionsWords' => [
'<string>'
],
'reminderTriggerMs' => 123,
'reminderMaxCount' => 123,
'ambientSound' => '<string>',
'ambientSoundVolume' => 123,
'boostedKeywords' => [
'<string>'
],
'enableTranscriptionFormatting' => true,
'optOutSensitiveDataStorage' => true,
'pronunciationDictionary' => [
[
'word' => '<string>',
'phoneme' => '<string>'
]
],
'normalizeForSpeech' => true,
'endCallAfterSilenceMs' => 123,
'maxCallDurationMs' => 123,
'enableVoicemailDetection' => true,
'voicemailMessage' => '<string>',
'voicemailDetectionTimeoutMs' => 123,
'voiceEmotionEnabled' => true,
'beginMessageDelayMs' => 123,
'ringDurationMs' => 123,
'audioEncoding' => '<string>',
'sampleRate' => 123,
'reduceSilence' => true,
'fillerAudioEnabled' => true,
'enableBackchannel' => true,
'backchannelFrequency' => 123,
'backchannelWords' => [
'<string>'
],
'piiConfig' => [
'categories' => [
'<string>'
]
],
'engineVersion' => '<string>',
'includeReason' => true,
'filters' => '<string>'
],
'enableVoiceSentiment' => true,
'engineModel' => '<string>',
'extractions' => [
],
'createSipTrunk' => true,
'successCriteria' => [
[
'title' => '<string>',
'items' => [
[
'title' => '<string>',
'description' => '<string>',
'threshold' => 123
]
],
'description' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"flowId\": \"<string>\",\n \"backupPhoneNumber\": \"<string>\",\n \"backupPhoneMessage\": \"<string>\",\n \"flowVersionId\": \"<string>\",\n \"externalConfig\": {\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"fallbackVoiceIds\": [\n \"<string>\"\n ],\n \"voiceTemperature\": 123,\n \"voiceSpeed\": 123,\n \"volume\": 123,\n \"responsiveness\": 123,\n \"interruptibility\": 123,\n \"enableResponsiveReactions\": true,\n \"responsiveReactionsFrequency\": 123,\n \"responsiveReactionsWords\": [\n \"<string>\"\n ],\n \"reminderTriggerMs\": 123,\n \"reminderMaxCount\": 123,\n \"ambientSound\": \"<string>\",\n \"ambientSoundVolume\": 123,\n \"boostedKeywords\": [\n \"<string>\"\n ],\n \"enableTranscriptionFormatting\": true,\n \"optOutSensitiveDataStorage\": true,\n \"pronunciationDictionary\": [\n {\n \"word\": \"<string>\",\n \"phoneme\": \"<string>\"\n }\n ],\n \"normalizeForSpeech\": true,\n \"endCallAfterSilenceMs\": 123,\n \"maxCallDurationMs\": 123,\n \"enableVoicemailDetection\": true,\n \"voicemailMessage\": \"<string>\",\n \"voicemailDetectionTimeoutMs\": 123,\n \"voiceEmotionEnabled\": true,\n \"beginMessageDelayMs\": 123,\n \"ringDurationMs\": 123,\n \"audioEncoding\": \"<string>\",\n \"sampleRate\": 123,\n \"reduceSilence\": true,\n \"fillerAudioEnabled\": true,\n \"enableBackchannel\": true,\n \"backchannelFrequency\": 123,\n \"backchannelWords\": [\n \"<string>\"\n ],\n \"piiConfig\": {\n \"categories\": [\n \"<string>\"\n ]\n },\n \"engineVersion\": \"<string>\",\n \"includeReason\": true,\n \"filters\": \"<string>\"\n },\n \"enableVoiceSentiment\": true,\n \"engineModel\": \"<string>\",\n \"extractions\": {},\n \"createSipTrunk\": true,\n \"successCriteria\": [\n {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"flowId\": \"<string>\",\n \"backupPhoneNumber\": \"<string>\",\n \"backupPhoneMessage\": \"<string>\",\n \"flowVersionId\": \"<string>\",\n \"externalConfig\": {\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"fallbackVoiceIds\": [\n \"<string>\"\n ],\n \"voiceTemperature\": 123,\n \"voiceSpeed\": 123,\n \"volume\": 123,\n \"responsiveness\": 123,\n \"interruptibility\": 123,\n \"enableResponsiveReactions\": true,\n \"responsiveReactionsFrequency\": 123,\n \"responsiveReactionsWords\": [\n \"<string>\"\n ],\n \"reminderTriggerMs\": 123,\n \"reminderMaxCount\": 123,\n \"ambientSound\": \"<string>\",\n \"ambientSoundVolume\": 123,\n \"boostedKeywords\": [\n \"<string>\"\n ],\n \"enableTranscriptionFormatting\": true,\n \"optOutSensitiveDataStorage\": true,\n \"pronunciationDictionary\": [\n {\n \"word\": \"<string>\",\n \"phoneme\": \"<string>\"\n }\n ],\n \"normalizeForSpeech\": true,\n \"endCallAfterSilenceMs\": 123,\n \"maxCallDurationMs\": 123,\n \"enableVoicemailDetection\": true,\n \"voicemailMessage\": \"<string>\",\n \"voicemailDetectionTimeoutMs\": 123,\n \"voiceEmotionEnabled\": true,\n \"beginMessageDelayMs\": 123,\n \"ringDurationMs\": 123,\n \"audioEncoding\": \"<string>\",\n \"sampleRate\": 123,\n \"reduceSilence\": true,\n \"fillerAudioEnabled\": true,\n \"enableBackchannel\": true,\n \"backchannelFrequency\": 123,\n \"backchannelWords\": [\n \"<string>\"\n ],\n \"piiConfig\": {\n \"categories\": [\n \"<string>\"\n ]\n },\n \"engineVersion\": \"<string>\",\n \"includeReason\": true,\n \"filters\": \"<string>\"\n },\n \"enableVoiceSentiment\": true,\n \"engineModel\": \"<string>\",\n \"extractions\": {},\n \"createSipTrunk\": true,\n \"successCriteria\": [\n {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"flowId\": \"<string>\",\n \"backupPhoneNumber\": \"<string>\",\n \"backupPhoneMessage\": \"<string>\",\n \"flowVersionId\": \"<string>\",\n \"externalConfig\": {\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"fallbackVoiceIds\": [\n \"<string>\"\n ],\n \"voiceTemperature\": 123,\n \"voiceSpeed\": 123,\n \"volume\": 123,\n \"responsiveness\": 123,\n \"interruptibility\": 123,\n \"enableResponsiveReactions\": true,\n \"responsiveReactionsFrequency\": 123,\n \"responsiveReactionsWords\": [\n \"<string>\"\n ],\n \"reminderTriggerMs\": 123,\n \"reminderMaxCount\": 123,\n \"ambientSound\": \"<string>\",\n \"ambientSoundVolume\": 123,\n \"boostedKeywords\": [\n \"<string>\"\n ],\n \"enableTranscriptionFormatting\": true,\n \"optOutSensitiveDataStorage\": true,\n \"pronunciationDictionary\": [\n {\n \"word\": \"<string>\",\n \"phoneme\": \"<string>\"\n }\n ],\n \"normalizeForSpeech\": true,\n \"endCallAfterSilenceMs\": 123,\n \"maxCallDurationMs\": 123,\n \"enableVoicemailDetection\": true,\n \"voicemailMessage\": \"<string>\",\n \"voicemailDetectionTimeoutMs\": 123,\n \"voiceEmotionEnabled\": true,\n \"beginMessageDelayMs\": 123,\n \"ringDurationMs\": 123,\n \"audioEncoding\": \"<string>\",\n \"sampleRate\": 123,\n \"reduceSilence\": true,\n \"fillerAudioEnabled\": true,\n \"enableBackchannel\": true,\n \"backchannelFrequency\": 123,\n \"backchannelWords\": [\n \"<string>\"\n ],\n \"piiConfig\": {\n \"categories\": [\n \"<string>\"\n ]\n },\n \"engineVersion\": \"<string>\",\n \"includeReason\": true,\n \"filters\": \"<string>\"\n },\n \"enableVoiceSentiment\": true,\n \"engineModel\": \"<string>\",\n \"extractions\": {},\n \"createSipTrunk\": true,\n \"successCriteria\": [\n {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"enableVoiceSentiment": true,
"allowedCountries": "<string>",
"phoneNumber": "<string>",
"voiceProvider": "<string>",
"voiceId": "<string>",
"agentId": "<string>",
"externalConfig": {},
"backupPhoneNumber": "<string>",
"backupPhoneMessage": "<string>",
"twilmlBinSid": "<string>"
}Voice Deployments
Create a new voice deployment
POST
/
api
/
workers
/
{workerId}
/
deployments
/
voice
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 voiceDeployment = await client.workers.deployments.voice.create('workerId', {
flowId: 'flowId',
name: 'name',
phoneNumber: 'phoneNumber',
});
console.log(voiceDeployment.id);import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
voice_deployment = client.workers.deployments.voice.create(
worker_id="workerId",
flow_id="flowId",
name="name",
phone_number="phoneNumber",
)
print(voice_deployment.id)curl --request POST \
--url https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"phoneNumber": "<string>",
"flowId": "<string>",
"backupPhoneNumber": "<string>",
"backupPhoneMessage": "<string>",
"flowVersionId": "<string>",
"externalConfig": {
"language": "<string>",
"voiceId": "<string>",
"fallbackVoiceIds": [
"<string>"
],
"voiceTemperature": 123,
"voiceSpeed": 123,
"volume": 123,
"responsiveness": 123,
"interruptibility": 123,
"enableResponsiveReactions": true,
"responsiveReactionsFrequency": 123,
"responsiveReactionsWords": [
"<string>"
],
"reminderTriggerMs": 123,
"reminderMaxCount": 123,
"ambientSound": "<string>",
"ambientSoundVolume": 123,
"boostedKeywords": [
"<string>"
],
"enableTranscriptionFormatting": true,
"optOutSensitiveDataStorage": true,
"pronunciationDictionary": [
{
"word": "<string>",
"phoneme": "<string>"
}
],
"normalizeForSpeech": true,
"endCallAfterSilenceMs": 123,
"maxCallDurationMs": 123,
"enableVoicemailDetection": true,
"voicemailMessage": "<string>",
"voicemailDetectionTimeoutMs": 123,
"voiceEmotionEnabled": true,
"beginMessageDelayMs": 123,
"ringDurationMs": 123,
"audioEncoding": "<string>",
"sampleRate": 123,
"reduceSilence": true,
"fillerAudioEnabled": true,
"enableBackchannel": true,
"backchannelFrequency": 123,
"backchannelWords": [
"<string>"
],
"piiConfig": {
"categories": [
"<string>"
]
},
"engineVersion": "<string>",
"includeReason": true,
"filters": "<string>"
},
"enableVoiceSentiment": true,
"engineModel": "<string>",
"extractions": {},
"createSipTrunk": true,
"successCriteria": [
{
"title": "<string>",
"items": [
{
"title": "<string>",
"description": "<string>",
"threshold": 123
}
],
"description": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phoneNumber' => '<string>',
'flowId' => '<string>',
'backupPhoneNumber' => '<string>',
'backupPhoneMessage' => '<string>',
'flowVersionId' => '<string>',
'externalConfig' => [
'language' => '<string>',
'voiceId' => '<string>',
'fallbackVoiceIds' => [
'<string>'
],
'voiceTemperature' => 123,
'voiceSpeed' => 123,
'volume' => 123,
'responsiveness' => 123,
'interruptibility' => 123,
'enableResponsiveReactions' => true,
'responsiveReactionsFrequency' => 123,
'responsiveReactionsWords' => [
'<string>'
],
'reminderTriggerMs' => 123,
'reminderMaxCount' => 123,
'ambientSound' => '<string>',
'ambientSoundVolume' => 123,
'boostedKeywords' => [
'<string>'
],
'enableTranscriptionFormatting' => true,
'optOutSensitiveDataStorage' => true,
'pronunciationDictionary' => [
[
'word' => '<string>',
'phoneme' => '<string>'
]
],
'normalizeForSpeech' => true,
'endCallAfterSilenceMs' => 123,
'maxCallDurationMs' => 123,
'enableVoicemailDetection' => true,
'voicemailMessage' => '<string>',
'voicemailDetectionTimeoutMs' => 123,
'voiceEmotionEnabled' => true,
'beginMessageDelayMs' => 123,
'ringDurationMs' => 123,
'audioEncoding' => '<string>',
'sampleRate' => 123,
'reduceSilence' => true,
'fillerAudioEnabled' => true,
'enableBackchannel' => true,
'backchannelFrequency' => 123,
'backchannelWords' => [
'<string>'
],
'piiConfig' => [
'categories' => [
'<string>'
]
],
'engineVersion' => '<string>',
'includeReason' => true,
'filters' => '<string>'
],
'enableVoiceSentiment' => true,
'engineModel' => '<string>',
'extractions' => [
],
'createSipTrunk' => true,
'successCriteria' => [
[
'title' => '<string>',
'items' => [
[
'title' => '<string>',
'description' => '<string>',
'threshold' => 123
]
],
'description' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"flowId\": \"<string>\",\n \"backupPhoneNumber\": \"<string>\",\n \"backupPhoneMessage\": \"<string>\",\n \"flowVersionId\": \"<string>\",\n \"externalConfig\": {\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"fallbackVoiceIds\": [\n \"<string>\"\n ],\n \"voiceTemperature\": 123,\n \"voiceSpeed\": 123,\n \"volume\": 123,\n \"responsiveness\": 123,\n \"interruptibility\": 123,\n \"enableResponsiveReactions\": true,\n \"responsiveReactionsFrequency\": 123,\n \"responsiveReactionsWords\": [\n \"<string>\"\n ],\n \"reminderTriggerMs\": 123,\n \"reminderMaxCount\": 123,\n \"ambientSound\": \"<string>\",\n \"ambientSoundVolume\": 123,\n \"boostedKeywords\": [\n \"<string>\"\n ],\n \"enableTranscriptionFormatting\": true,\n \"optOutSensitiveDataStorage\": true,\n \"pronunciationDictionary\": [\n {\n \"word\": \"<string>\",\n \"phoneme\": \"<string>\"\n }\n ],\n \"normalizeForSpeech\": true,\n \"endCallAfterSilenceMs\": 123,\n \"maxCallDurationMs\": 123,\n \"enableVoicemailDetection\": true,\n \"voicemailMessage\": \"<string>\",\n \"voicemailDetectionTimeoutMs\": 123,\n \"voiceEmotionEnabled\": true,\n \"beginMessageDelayMs\": 123,\n \"ringDurationMs\": 123,\n \"audioEncoding\": \"<string>\",\n \"sampleRate\": 123,\n \"reduceSilence\": true,\n \"fillerAudioEnabled\": true,\n \"enableBackchannel\": true,\n \"backchannelFrequency\": 123,\n \"backchannelWords\": [\n \"<string>\"\n ],\n \"piiConfig\": {\n \"categories\": [\n \"<string>\"\n ]\n },\n \"engineVersion\": \"<string>\",\n \"includeReason\": true,\n \"filters\": \"<string>\"\n },\n \"enableVoiceSentiment\": true,\n \"engineModel\": \"<string>\",\n \"extractions\": {},\n \"createSipTrunk\": true,\n \"successCriteria\": [\n {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"flowId\": \"<string>\",\n \"backupPhoneNumber\": \"<string>\",\n \"backupPhoneMessage\": \"<string>\",\n \"flowVersionId\": \"<string>\",\n \"externalConfig\": {\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"fallbackVoiceIds\": [\n \"<string>\"\n ],\n \"voiceTemperature\": 123,\n \"voiceSpeed\": 123,\n \"volume\": 123,\n \"responsiveness\": 123,\n \"interruptibility\": 123,\n \"enableResponsiveReactions\": true,\n \"responsiveReactionsFrequency\": 123,\n \"responsiveReactionsWords\": [\n \"<string>\"\n ],\n \"reminderTriggerMs\": 123,\n \"reminderMaxCount\": 123,\n \"ambientSound\": \"<string>\",\n \"ambientSoundVolume\": 123,\n \"boostedKeywords\": [\n \"<string>\"\n ],\n \"enableTranscriptionFormatting\": true,\n \"optOutSensitiveDataStorage\": true,\n \"pronunciationDictionary\": [\n {\n \"word\": \"<string>\",\n \"phoneme\": \"<string>\"\n }\n ],\n \"normalizeForSpeech\": true,\n \"endCallAfterSilenceMs\": 123,\n \"maxCallDurationMs\": 123,\n \"enableVoicemailDetection\": true,\n \"voicemailMessage\": \"<string>\",\n \"voicemailDetectionTimeoutMs\": 123,\n \"voiceEmotionEnabled\": true,\n \"beginMessageDelayMs\": 123,\n \"ringDurationMs\": 123,\n \"audioEncoding\": \"<string>\",\n \"sampleRate\": 123,\n \"reduceSilence\": true,\n \"fillerAudioEnabled\": true,\n \"enableBackchannel\": true,\n \"backchannelFrequency\": 123,\n \"backchannelWords\": [\n \"<string>\"\n ],\n \"piiConfig\": {\n \"categories\": [\n \"<string>\"\n ]\n },\n \"engineVersion\": \"<string>\",\n \"includeReason\": true,\n \"filters\": \"<string>\"\n },\n \"enableVoiceSentiment\": true,\n \"engineModel\": \"<string>\",\n \"extractions\": {},\n \"createSipTrunk\": true,\n \"successCriteria\": [\n {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"flowId\": \"<string>\",\n \"backupPhoneNumber\": \"<string>\",\n \"backupPhoneMessage\": \"<string>\",\n \"flowVersionId\": \"<string>\",\n \"externalConfig\": {\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"fallbackVoiceIds\": [\n \"<string>\"\n ],\n \"voiceTemperature\": 123,\n \"voiceSpeed\": 123,\n \"volume\": 123,\n \"responsiveness\": 123,\n \"interruptibility\": 123,\n \"enableResponsiveReactions\": true,\n \"responsiveReactionsFrequency\": 123,\n \"responsiveReactionsWords\": [\n \"<string>\"\n ],\n \"reminderTriggerMs\": 123,\n \"reminderMaxCount\": 123,\n \"ambientSound\": \"<string>\",\n \"ambientSoundVolume\": 123,\n \"boostedKeywords\": [\n \"<string>\"\n ],\n \"enableTranscriptionFormatting\": true,\n \"optOutSensitiveDataStorage\": true,\n \"pronunciationDictionary\": [\n {\n \"word\": \"<string>\",\n \"phoneme\": \"<string>\"\n }\n ],\n \"normalizeForSpeech\": true,\n \"endCallAfterSilenceMs\": 123,\n \"maxCallDurationMs\": 123,\n \"enableVoicemailDetection\": true,\n \"voicemailMessage\": \"<string>\",\n \"voicemailDetectionTimeoutMs\": 123,\n \"voiceEmotionEnabled\": true,\n \"beginMessageDelayMs\": 123,\n \"ringDurationMs\": 123,\n \"audioEncoding\": \"<string>\",\n \"sampleRate\": 123,\n \"reduceSilence\": true,\n \"fillerAudioEnabled\": true,\n \"enableBackchannel\": true,\n \"backchannelFrequency\": 123,\n \"backchannelWords\": [\n \"<string>\"\n ],\n \"piiConfig\": {\n \"categories\": [\n \"<string>\"\n ]\n },\n \"engineVersion\": \"<string>\",\n \"includeReason\": true,\n \"filters\": \"<string>\"\n },\n \"enableVoiceSentiment\": true,\n \"engineModel\": \"<string>\",\n \"extractions\": {},\n \"createSipTrunk\": true,\n \"successCriteria\": [\n {\n \"title\": \"<string>\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"enableVoiceSentiment": true,
"allowedCountries": "<string>",
"phoneNumber": "<string>",
"voiceProvider": "<string>",
"voiceId": "<string>",
"agentId": "<string>",
"externalConfig": {},
"backupPhoneNumber": "<string>",
"backupPhoneMessage": "<string>",
"twilmlBinSid": "<string>"
}Authorizations
API key authentication
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Voice deployment created
⌘I
