Agents
Update Agent
Updates the specified agent
PATCH
/
api
/
agents
/
{agent_id}
cURL
curl --request PATCH \
--url https://api.ultravox.ai/api/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
]
}
}
'import requests
url = "https://api.ultravox.ai/api/agents/{agent_id}"
payload = {
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": { "dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"invokingTool": True
} },
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"invokingTool": True
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"exotel": { "dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
} },
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": True,
"firstSpeakerSettings": {
"user": { "fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
} },
"agent": {
"uninterruptible": True,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": True
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [{ "name": "<string>" }],
"requirements": {
"httpSecurityOptions": { "options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": { "scopes": ["<string>"] }
}
] },
"requiredParameterOverrides": ["<string>"]
},
"timeout": "<string>",
"precomputable": True,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": { "responseText": "<string>" }
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": { "sampleRate": 123 },
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"invokingTool": True
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": ["<string>"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
callTemplate: {
name: '<string>',
created: '2023-11-07T05:31:56Z',
updated: '2023-11-07T05:31:56Z',
medium: {
webRtc: {
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
invokingTool: true
}
},
twilio: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
serverWebSocket: {
inputSampleRate: 123,
outputSampleRate: 123,
clientBufferSizeMs: 123,
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
invokingTool: true
},
mediaIdleTimeout: '<string>'
},
telnyx: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
plivo: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
exotel: {dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}},
sip: {
incoming: {},
outgoing: {to: '<string>', from: '<string>', username: '<string>', password: '<string>'}
}
},
joinTimeout: '<string>',
maxDuration: '<string>',
vadSettings: {
turnEndpointDelay: '<string>',
minimumTurnDuration: '<string>',
minimumInterruptionDuration: '<string>',
frameActivationThreshold: 123
},
recordingEnabled: true,
firstSpeakerSettings: {
user: {fallback: {delay: '<string>', text: '<string>', prompt: '<string>'}},
agent: {uninterruptible: true, text: '<string>', prompt: '<string>', delay: '<string>'}
},
systemPrompt: '<string>',
temperature: 123,
model: '<string>',
voice: '<string>',
externalVoice: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
voiceOverrides: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
languageHint: '<string>',
timeExceededMessage: '<string>',
inactivityMessages: [{duration: '<string>', message: '<string>'}],
selectedTools: [
{
toolId: '<string>',
toolName: '<string>',
temporaryTool: {
modelToolName: '<string>',
description: '<string>',
dynamicParameters: [{name: '<string>', schema: {}, required: true}],
staticParameters: [{name: '<string>', value: '<unknown>'}],
automaticParameters: [{name: '<string>'}],
requirements: {
httpSecurityOptions: {
options: [{requirements: {}, ultravoxCallTokenRequirement: {scopes: ['<string>']}}]
},
requiredParameterOverrides: ['<string>']
},
timeout: '<string>',
precomputable: true,
http: {baseUrlPattern: '<string>', httpMethod: '<string>'},
client: {},
dataConnection: {},
staticResponse: {responseText: '<string>'}
},
nameOverride: '<string>',
descriptionOverride: '<string>',
authTokens: {},
parameterOverrides: {},
transitionId: '<string>'
}
],
dataConnection: {
websocketUrl: '<string>',
audioConfig: {sampleRate: 123},
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
invokingTool: true
},
headers: {}
},
contextSchema: {},
sharedSecrets: ['<string>']
}
})
};
fetch('https://api.ultravox.ai/api/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ultravox.ai/api/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'callTemplate' => [
'name' => '<string>',
'created' => '2023-11-07T05:31:56Z',
'updated' => '2023-11-07T05:31:56Z',
'medium' => [
'webRtc' => [
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'invokingTool' => true
]
],
'twilio' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'serverWebSocket' => [
'inputSampleRate' => 123,
'outputSampleRate' => 123,
'clientBufferSizeMs' => 123,
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'invokingTool' => true
],
'mediaIdleTimeout' => '<string>'
],
'telnyx' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'plivo' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'exotel' => [
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'sip' => [
'incoming' => [
],
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'username' => '<string>',
'password' => '<string>'
]
]
],
'joinTimeout' => '<string>',
'maxDuration' => '<string>',
'vadSettings' => [
'turnEndpointDelay' => '<string>',
'minimumTurnDuration' => '<string>',
'minimumInterruptionDuration' => '<string>',
'frameActivationThreshold' => 123
],
'recordingEnabled' => true,
'firstSpeakerSettings' => [
'user' => [
'fallback' => [
'delay' => '<string>',
'text' => '<string>',
'prompt' => '<string>'
]
],
'agent' => [
'uninterruptible' => true,
'text' => '<string>',
'prompt' => '<string>',
'delay' => '<string>'
]
],
'systemPrompt' => '<string>',
'temperature' => 123,
'model' => '<string>',
'voice' => '<string>',
'externalVoice' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'voiceOverrides' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'languageHint' => '<string>',
'timeExceededMessage' => '<string>',
'inactivityMessages' => [
[
'duration' => '<string>',
'message' => '<string>'
]
],
'selectedTools' => [
[
'toolId' => '<string>',
'toolName' => '<string>',
'temporaryTool' => [
'modelToolName' => '<string>',
'description' => '<string>',
'dynamicParameters' => [
[
'name' => '<string>',
'schema' => [
],
'required' => true
]
],
'staticParameters' => [
[
'name' => '<string>',
'value' => '<unknown>'
]
],
'automaticParameters' => [
[
'name' => '<string>'
]
],
'requirements' => [
'httpSecurityOptions' => [
'options' => [
[
'requirements' => [
],
'ultravoxCallTokenRequirement' => [
'scopes' => [
'<string>'
]
]
]
]
],
'requiredParameterOverrides' => [
'<string>'
]
],
'timeout' => '<string>',
'precomputable' => true,
'http' => [
'baseUrlPattern' => '<string>',
'httpMethod' => '<string>'
],
'client' => [
],
'dataConnection' => [
],
'staticResponse' => [
'responseText' => '<string>'
]
],
'nameOverride' => '<string>',
'descriptionOverride' => '<string>',
'authTokens' => [
],
'parameterOverrides' => [
],
'transitionId' => '<string>'
]
],
'dataConnection' => [
'websocketUrl' => '<string>',
'audioConfig' => [
'sampleRate' => 123
],
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'invokingTool' => true
],
'headers' => [
]
],
'contextSchema' => [
],
'sharedSecrets' => [
'<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://api.ultravox.ai/api/agents/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.ultravox.ai/api/agents/{agent_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ultravox.ai/api/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"statistics": {
"calls": 0
},
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
]
}
}Allows partial modifications to the agent.
Authorizations
API key
Path Parameters
Body
application/json
Response
200 - application/json
Show child attributes
Show child attributes
Maximum string length:
64A CallTemplate that can be used to create Ultravox calls with shared properties.
Show child attributes
Show child attributes
⌘I
cURL
curl --request PATCH \
--url https://api.ultravox.ai/api/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
]
}
}
'import requests
url = "https://api.ultravox.ai/api/agents/{agent_id}"
payload = {
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": { "dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"invokingTool": True
} },
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"invokingTool": True
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
}
},
"exotel": { "dtmfHandling": {
"ignore": True,
"userTextMessage": { "text": "<string>" }
} },
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": True,
"firstSpeakerSettings": {
"user": { "fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
} },
"agent": {
"uninterruptible": True,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": True,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": True
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": ["<string>"],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": True
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": True
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": True
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [{ "name": "<string>" }],
"requirements": {
"httpSecurityOptions": { "options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": { "scopes": ["<string>"] }
}
] },
"requiredParameterOverrides": ["<string>"]
},
"timeout": "<string>",
"precomputable": True,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": { "responseText": "<string>" }
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": { "sampleRate": 123 },
"dataMessages": {
"pong": True,
"state": True,
"transcript": True,
"clientToolInvocation": True,
"dataConnectionToolInvocation": True,
"playbackClearBuffer": True,
"callStarted": True,
"debug": True,
"callEvent": True,
"toolUsed": True,
"userStartedSpeaking": True,
"userStoppedSpeaking": True,
"invokingTool": True
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": ["<string>"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
callTemplate: {
name: '<string>',
created: '2023-11-07T05:31:56Z',
updated: '2023-11-07T05:31:56Z',
medium: {
webRtc: {
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
invokingTool: true
}
},
twilio: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
serverWebSocket: {
inputSampleRate: 123,
outputSampleRate: 123,
clientBufferSizeMs: 123,
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
invokingTool: true
},
mediaIdleTimeout: '<string>'
},
telnyx: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
plivo: {
outgoing: {to: '<string>', from: '<string>', additionalParams: {}},
dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}
},
exotel: {dtmfHandling: {ignore: true, userTextMessage: {text: '<string>'}}},
sip: {
incoming: {},
outgoing: {to: '<string>', from: '<string>', username: '<string>', password: '<string>'}
}
},
joinTimeout: '<string>',
maxDuration: '<string>',
vadSettings: {
turnEndpointDelay: '<string>',
minimumTurnDuration: '<string>',
minimumInterruptionDuration: '<string>',
frameActivationThreshold: 123
},
recordingEnabled: true,
firstSpeakerSettings: {
user: {fallback: {delay: '<string>', text: '<string>', prompt: '<string>'}},
agent: {uninterruptible: true, text: '<string>', prompt: '<string>', delay: '<string>'}
},
systemPrompt: '<string>',
temperature: 123,
model: '<string>',
voice: '<string>',
externalVoice: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
voiceOverrides: {
elevenLabs: {
voiceId: '<string>',
model: '<string>',
speed: 123,
useSpeakerBoost: true,
style: 123,
similarityBoost: 123,
stability: 123,
pronunciationDictionaries: [{dictionaryId: '<string>', versionId: '<string>'}],
optimizeStreamingLatency: 123,
maxSampleRate: 123,
enableSsmlParsing: true
},
cartesia: {
voiceId: '<string>',
model: '<string>',
speed: 123,
emotion: '<string>',
emotions: ['<string>'],
generationConfig: {volume: 123, speed: 123, emotion: '<string>', pronunciationDictId: '<string>'}
},
lmnt: {voiceId: '<string>', model: '<string>', speed: 123, conversational: true},
google: {voiceId: '<string>', speakingRate: 123},
inworld: {
voiceId: '<string>',
modelId: '<string>',
speakingRate: 123,
temperature: 123,
applyTextNormalization: true
},
respeecher: {
voiceId: '<string>',
model: '<string>',
seed: 123,
temperature: 123,
topK: 123,
topP: 123,
minP: 123,
presencePenalty: 123,
repetitionPenalty: 123,
frequencyPenalty: 123
},
generic: {
url: '<string>',
headers: {},
body: JSON.stringify({}),
responseSampleRate: 123,
responseWordsPerMinute: 123,
responseMimeType: '<string>',
jsonAudioFieldPath: '<string>'
}
},
languageHint: '<string>',
timeExceededMessage: '<string>',
inactivityMessages: [{duration: '<string>', message: '<string>'}],
selectedTools: [
{
toolId: '<string>',
toolName: '<string>',
temporaryTool: {
modelToolName: '<string>',
description: '<string>',
dynamicParameters: [{name: '<string>', schema: {}, required: true}],
staticParameters: [{name: '<string>', value: '<unknown>'}],
automaticParameters: [{name: '<string>'}],
requirements: {
httpSecurityOptions: {
options: [{requirements: {}, ultravoxCallTokenRequirement: {scopes: ['<string>']}}]
},
requiredParameterOverrides: ['<string>']
},
timeout: '<string>',
precomputable: true,
http: {baseUrlPattern: '<string>', httpMethod: '<string>'},
client: {},
dataConnection: {},
staticResponse: {responseText: '<string>'}
},
nameOverride: '<string>',
descriptionOverride: '<string>',
authTokens: {},
parameterOverrides: {},
transitionId: '<string>'
}
],
dataConnection: {
websocketUrl: '<string>',
audioConfig: {sampleRate: 123},
dataMessages: {
pong: true,
state: true,
transcript: true,
clientToolInvocation: true,
dataConnectionToolInvocation: true,
playbackClearBuffer: true,
callStarted: true,
debug: true,
callEvent: true,
toolUsed: true,
userStartedSpeaking: true,
userStoppedSpeaking: true,
invokingTool: true
},
headers: {}
},
contextSchema: {},
sharedSecrets: ['<string>']
}
})
};
fetch('https://api.ultravox.ai/api/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ultravox.ai/api/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'callTemplate' => [
'name' => '<string>',
'created' => '2023-11-07T05:31:56Z',
'updated' => '2023-11-07T05:31:56Z',
'medium' => [
'webRtc' => [
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'invokingTool' => true
]
],
'twilio' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'serverWebSocket' => [
'inputSampleRate' => 123,
'outputSampleRate' => 123,
'clientBufferSizeMs' => 123,
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'invokingTool' => true
],
'mediaIdleTimeout' => '<string>'
],
'telnyx' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'plivo' => [
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'additionalParams' => [
]
],
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'exotel' => [
'dtmfHandling' => [
'ignore' => true,
'userTextMessage' => [
'text' => '<string>'
]
]
],
'sip' => [
'incoming' => [
],
'outgoing' => [
'to' => '<string>',
'from' => '<string>',
'username' => '<string>',
'password' => '<string>'
]
]
],
'joinTimeout' => '<string>',
'maxDuration' => '<string>',
'vadSettings' => [
'turnEndpointDelay' => '<string>',
'minimumTurnDuration' => '<string>',
'minimumInterruptionDuration' => '<string>',
'frameActivationThreshold' => 123
],
'recordingEnabled' => true,
'firstSpeakerSettings' => [
'user' => [
'fallback' => [
'delay' => '<string>',
'text' => '<string>',
'prompt' => '<string>'
]
],
'agent' => [
'uninterruptible' => true,
'text' => '<string>',
'prompt' => '<string>',
'delay' => '<string>'
]
],
'systemPrompt' => '<string>',
'temperature' => 123,
'model' => '<string>',
'voice' => '<string>',
'externalVoice' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'voiceOverrides' => [
'elevenLabs' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'useSpeakerBoost' => true,
'style' => 123,
'similarityBoost' => 123,
'stability' => 123,
'pronunciationDictionaries' => [
[
'dictionaryId' => '<string>',
'versionId' => '<string>'
]
],
'optimizeStreamingLatency' => 123,
'maxSampleRate' => 123,
'enableSsmlParsing' => true
],
'cartesia' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'emotion' => '<string>',
'emotions' => [
'<string>'
],
'generationConfig' => [
'volume' => 123,
'speed' => 123,
'emotion' => '<string>',
'pronunciationDictId' => '<string>'
]
],
'lmnt' => [
'voiceId' => '<string>',
'model' => '<string>',
'speed' => 123,
'conversational' => true
],
'google' => [
'voiceId' => '<string>',
'speakingRate' => 123
],
'inworld' => [
'voiceId' => '<string>',
'modelId' => '<string>',
'speakingRate' => 123,
'temperature' => 123,
'applyTextNormalization' => true
],
'respeecher' => [
'voiceId' => '<string>',
'model' => '<string>',
'seed' => 123,
'temperature' => 123,
'topK' => 123,
'topP' => 123,
'minP' => 123,
'presencePenalty' => 123,
'repetitionPenalty' => 123,
'frequencyPenalty' => 123
],
'generic' => [
'url' => '<string>',
'headers' => [
],
'body' => [
],
'responseSampleRate' => 123,
'responseWordsPerMinute' => 123,
'responseMimeType' => '<string>',
'jsonAudioFieldPath' => '<string>'
]
],
'languageHint' => '<string>',
'timeExceededMessage' => '<string>',
'inactivityMessages' => [
[
'duration' => '<string>',
'message' => '<string>'
]
],
'selectedTools' => [
[
'toolId' => '<string>',
'toolName' => '<string>',
'temporaryTool' => [
'modelToolName' => '<string>',
'description' => '<string>',
'dynamicParameters' => [
[
'name' => '<string>',
'schema' => [
],
'required' => true
]
],
'staticParameters' => [
[
'name' => '<string>',
'value' => '<unknown>'
]
],
'automaticParameters' => [
[
'name' => '<string>'
]
],
'requirements' => [
'httpSecurityOptions' => [
'options' => [
[
'requirements' => [
],
'ultravoxCallTokenRequirement' => [
'scopes' => [
'<string>'
]
]
]
]
],
'requiredParameterOverrides' => [
'<string>'
]
],
'timeout' => '<string>',
'precomputable' => true,
'http' => [
'baseUrlPattern' => '<string>',
'httpMethod' => '<string>'
],
'client' => [
],
'dataConnection' => [
],
'staticResponse' => [
'responseText' => '<string>'
]
],
'nameOverride' => '<string>',
'descriptionOverride' => '<string>',
'authTokens' => [
],
'parameterOverrides' => [
],
'transitionId' => '<string>'
]
],
'dataConnection' => [
'websocketUrl' => '<string>',
'audioConfig' => [
'sampleRate' => 123
],
'dataMessages' => [
'pong' => true,
'state' => true,
'transcript' => true,
'clientToolInvocation' => true,
'dataConnectionToolInvocation' => true,
'playbackClearBuffer' => true,
'callStarted' => true,
'debug' => true,
'callEvent' => true,
'toolUsed' => true,
'userStartedSpeaking' => true,
'userStoppedSpeaking' => true,
'invokingTool' => true
],
'headers' => [
]
],
'contextSchema' => [
],
'sharedSecrets' => [
'<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://api.ultravox.ai/api/agents/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.ultravox.ai/api/agents/{agent_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ultravox.ai/api/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"callTemplate\": {\n \"name\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\",\n \"updated\": \"2023-11-07T05:31:56Z\",\n \"medium\": {\n \"webRtc\": {\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n }\n },\n \"twilio\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"serverWebSocket\": {\n \"inputSampleRate\": 123,\n \"outputSampleRate\": 123,\n \"clientBufferSizeMs\": 123,\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"mediaIdleTimeout\": \"<string>\"\n },\n \"telnyx\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"plivo\": {\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"additionalParams\": {}\n },\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"exotel\": {\n \"dtmfHandling\": {\n \"ignore\": true,\n \"userTextMessage\": {\n \"text\": \"<string>\"\n }\n }\n },\n \"sip\": {\n \"incoming\": {},\n \"outgoing\": {\n \"to\": \"<string>\",\n \"from\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\"\n }\n }\n },\n \"joinTimeout\": \"<string>\",\n \"maxDuration\": \"<string>\",\n \"vadSettings\": {\n \"turnEndpointDelay\": \"<string>\",\n \"minimumTurnDuration\": \"<string>\",\n \"minimumInterruptionDuration\": \"<string>\",\n \"frameActivationThreshold\": 123\n },\n \"recordingEnabled\": true,\n \"firstSpeakerSettings\": {\n \"user\": {\n \"fallback\": {\n \"delay\": \"<string>\",\n \"text\": \"<string>\",\n \"prompt\": \"<string>\"\n }\n },\n \"agent\": {\n \"uninterruptible\": true,\n \"text\": \"<string>\",\n \"prompt\": \"<string>\",\n \"delay\": \"<string>\"\n }\n },\n \"systemPrompt\": \"<string>\",\n \"temperature\": 123,\n \"model\": \"<string>\",\n \"voice\": \"<string>\",\n \"externalVoice\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"voiceOverrides\": {\n \"elevenLabs\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"useSpeakerBoost\": true,\n \"style\": 123,\n \"similarityBoost\": 123,\n \"stability\": 123,\n \"pronunciationDictionaries\": [\n {\n \"dictionaryId\": \"<string>\",\n \"versionId\": \"<string>\"\n }\n ],\n \"optimizeStreamingLatency\": 123,\n \"maxSampleRate\": 123,\n \"enableSsmlParsing\": true\n },\n \"cartesia\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"emotions\": [\n \"<string>\"\n ],\n \"generationConfig\": {\n \"volume\": 123,\n \"speed\": 123,\n \"emotion\": \"<string>\",\n \"pronunciationDictId\": \"<string>\"\n }\n },\n \"lmnt\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"conversational\": true\n },\n \"google\": {\n \"voiceId\": \"<string>\",\n \"speakingRate\": 123\n },\n \"inworld\": {\n \"voiceId\": \"<string>\",\n \"modelId\": \"<string>\",\n \"speakingRate\": 123,\n \"temperature\": 123,\n \"applyTextNormalization\": true\n },\n \"respeecher\": {\n \"voiceId\": \"<string>\",\n \"model\": \"<string>\",\n \"seed\": 123,\n \"temperature\": 123,\n \"topK\": 123,\n \"topP\": 123,\n \"minP\": 123,\n \"presencePenalty\": 123,\n \"repetitionPenalty\": 123,\n \"frequencyPenalty\": 123\n },\n \"generic\": {\n \"url\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"responseSampleRate\": 123,\n \"responseWordsPerMinute\": 123,\n \"responseMimeType\": \"<string>\",\n \"jsonAudioFieldPath\": \"<string>\"\n }\n },\n \"languageHint\": \"<string>\",\n \"timeExceededMessage\": \"<string>\",\n \"inactivityMessages\": [\n {\n \"duration\": \"<string>\",\n \"message\": \"<string>\"\n }\n ],\n \"selectedTools\": [\n {\n \"toolId\": \"<string>\",\n \"toolName\": \"<string>\",\n \"temporaryTool\": {\n \"modelToolName\": \"<string>\",\n \"description\": \"<string>\",\n \"dynamicParameters\": [\n {\n \"name\": \"<string>\",\n \"schema\": {},\n \"required\": true\n }\n ],\n \"staticParameters\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automaticParameters\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"requirements\": {\n \"httpSecurityOptions\": {\n \"options\": [\n {\n \"requirements\": {},\n \"ultravoxCallTokenRequirement\": {\n \"scopes\": [\n \"<string>\"\n ]\n }\n }\n ]\n },\n \"requiredParameterOverrides\": [\n \"<string>\"\n ]\n },\n \"timeout\": \"<string>\",\n \"precomputable\": true,\n \"http\": {\n \"baseUrlPattern\": \"<string>\",\n \"httpMethod\": \"<string>\"\n },\n \"client\": {},\n \"dataConnection\": {},\n \"staticResponse\": {\n \"responseText\": \"<string>\"\n }\n },\n \"nameOverride\": \"<string>\",\n \"descriptionOverride\": \"<string>\",\n \"authTokens\": {},\n \"parameterOverrides\": {},\n \"transitionId\": \"<string>\"\n }\n ],\n \"dataConnection\": {\n \"websocketUrl\": \"<string>\",\n \"audioConfig\": {\n \"sampleRate\": 123\n },\n \"dataMessages\": {\n \"pong\": true,\n \"state\": true,\n \"transcript\": true,\n \"clientToolInvocation\": true,\n \"dataConnectionToolInvocation\": true,\n \"playbackClearBuffer\": true,\n \"callStarted\": true,\n \"debug\": true,\n \"callEvent\": true,\n \"toolUsed\": true,\n \"userStartedSpeaking\": true,\n \"userStoppedSpeaking\": true,\n \"invokingTool\": true\n },\n \"headers\": {}\n },\n \"contextSchema\": {},\n \"sharedSecrets\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"statistics": {
"calls": 0
},
"name": "<string>",
"callTemplate": {
"name": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"medium": {
"webRtc": {
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
}
},
"twilio": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"serverWebSocket": {
"inputSampleRate": 123,
"outputSampleRate": 123,
"clientBufferSizeMs": 123,
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"mediaIdleTimeout": "<string>"
},
"telnyx": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"plivo": {
"outgoing": {
"to": "<string>",
"from": "<string>",
"additionalParams": {}
},
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"exotel": {
"dtmfHandling": {
"ignore": true,
"userTextMessage": {
"text": "<string>"
}
}
},
"sip": {
"incoming": {},
"outgoing": {
"to": "<string>",
"from": "<string>",
"username": "<string>",
"password": "<string>"
}
}
},
"joinTimeout": "<string>",
"maxDuration": "<string>",
"vadSettings": {
"turnEndpointDelay": "<string>",
"minimumTurnDuration": "<string>",
"minimumInterruptionDuration": "<string>",
"frameActivationThreshold": 123
},
"recordingEnabled": true,
"firstSpeakerSettings": {
"user": {
"fallback": {
"delay": "<string>",
"text": "<string>",
"prompt": "<string>"
}
},
"agent": {
"uninterruptible": true,
"text": "<string>",
"prompt": "<string>",
"delay": "<string>"
}
},
"systemPrompt": "<string>",
"temperature": 123,
"model": "<string>",
"voice": "<string>",
"externalVoice": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"voiceOverrides": {
"elevenLabs": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"useSpeakerBoost": true,
"style": 123,
"similarityBoost": 123,
"stability": 123,
"pronunciationDictionaries": [
{
"dictionaryId": "<string>",
"versionId": "<string>"
}
],
"optimizeStreamingLatency": 123,
"maxSampleRate": 123,
"enableSsmlParsing": true
},
"cartesia": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"emotion": "<string>",
"emotions": [
"<string>"
],
"generationConfig": {
"volume": 123,
"speed": 123,
"emotion": "<string>",
"pronunciationDictId": "<string>"
}
},
"lmnt": {
"voiceId": "<string>",
"model": "<string>",
"speed": 123,
"conversational": true
},
"google": {
"voiceId": "<string>",
"speakingRate": 123
},
"inworld": {
"voiceId": "<string>",
"modelId": "<string>",
"speakingRate": 123,
"temperature": 123,
"applyTextNormalization": true
},
"respeecher": {
"voiceId": "<string>",
"model": "<string>",
"seed": 123,
"temperature": 123,
"topK": 123,
"topP": 123,
"minP": 123,
"presencePenalty": 123,
"repetitionPenalty": 123,
"frequencyPenalty": 123
},
"generic": {
"url": "<string>",
"headers": {},
"body": {},
"responseSampleRate": 123,
"responseWordsPerMinute": 123,
"responseMimeType": "<string>",
"jsonAudioFieldPath": "<string>"
}
},
"languageHint": "<string>",
"timeExceededMessage": "<string>",
"inactivityMessages": [
{
"duration": "<string>",
"message": "<string>"
}
],
"selectedTools": [
{
"toolId": "<string>",
"toolName": "<string>",
"temporaryTool": {
"modelToolName": "<string>",
"description": "<string>",
"dynamicParameters": [
{
"name": "<string>",
"schema": {},
"required": true
}
],
"staticParameters": [
{
"name": "<string>",
"value": "<unknown>"
}
],
"automaticParameters": [
{
"name": "<string>"
}
],
"requirements": {
"httpSecurityOptions": {
"options": [
{
"requirements": {},
"ultravoxCallTokenRequirement": {
"scopes": [
"<string>"
]
}
}
]
},
"requiredParameterOverrides": [
"<string>"
]
},
"timeout": "<string>",
"precomputable": true,
"http": {
"baseUrlPattern": "<string>",
"httpMethod": "<string>"
},
"client": {},
"dataConnection": {},
"staticResponse": {
"responseText": "<string>"
}
},
"nameOverride": "<string>",
"descriptionOverride": "<string>",
"authTokens": {},
"parameterOverrides": {},
"transitionId": "<string>"
}
],
"dataConnection": {
"websocketUrl": "<string>",
"audioConfig": {
"sampleRate": 123
},
"dataMessages": {
"pong": true,
"state": true,
"transcript": true,
"clientToolInvocation": true,
"dataConnectionToolInvocation": true,
"playbackClearBuffer": true,
"callStarted": true,
"debug": true,
"callEvent": true,
"toolUsed": true,
"userStartedSpeaking": true,
"userStoppedSpeaking": true,
"invokingTool": true
},
"headers": {}
},
"contextSchema": {},
"sharedSecrets": [
"<string>"
]
}
}