Update Call Agent
curl --request PUT \
--url https://api.trillet.ai/v1/api/agents/{agentId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"name": "<string>",
"llmModel": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": true,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [
{}
],
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
'import requests
url = "https://api.trillet.ai/v1/api/agents/{agentId}"
payload = {
"name": "<string>",
"llmModel": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": True,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [{}],
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
llmModel: '<string>',
ttsModel: {
provider: '<string>',
voiceId: '<string>',
language: '<string>',
elevenLabsApiKey: '<string>'
},
smartCallback: true,
maxAttemptsForSmartCallback: 123,
gapBetweenEachAttemptForSmartCallback: [{days: 123, hours: 123}],
phoneNumberIds: [{}],
settings: {speed: 123, volume: 123, temperature: 123},
variables: {}
})
};
fetch('https://api.trillet.ai/v1/api/agents/{agentId}', 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.trillet.ai/v1/api/agents/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'llmModel' => '<string>',
'ttsModel' => [
'provider' => '<string>',
'voiceId' => '<string>',
'language' => '<string>',
'elevenLabsApiKey' => '<string>'
],
'smartCallback' => true,
'maxAttemptsForSmartCallback' => 123,
'gapBetweenEachAttemptForSmartCallback' => [
[
'days' => 123,
'hours' => 123
]
],
'phoneNumberIds' => [
[
]
],
'settings' => [
'speed' => 123,
'volume' => 123,
'temperature' => 123
],
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.trillet.ai/v1/api/agents/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"llmModel\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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.put("https://api.trillet.ai/v1/api/agents/{agentId}")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"llmModel\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"llmModel\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "Updated Customer Support Agent",
"llmModel": "claude-3-5-sonnet-latest",
"ttsModel": {
"provider": "11labs_byo",
"voiceId": "21m00Tcm4TlvDq8ikWAM",
"name": "Premium Voice",
"language": "en",
"elevenLabsApiKey": "your-new-elevenlabs-api-key"
},
"smartCallback": true,
"maxAttemptsForSmartCallback": 5,
"gapBetweenEachAttemptForSmartCallback": [
{ "days": 1, "hours": 0 },
{ "days": 1, "hours": 12 },
{ "days": 2, "hours": 0 },
{ "days": 3, "hours": 0 },
{ "days": 7, "hours": 0 }
],
"settings": {
"speed": 0.9,
"volume": 0.8,
"temperature": 0.6
}
}
Call Agents
Update Call Agent
Update an existing agent
PUT
/
v1
/
api
/
agents
/
{agentId}
Update Call Agent
curl --request PUT \
--url https://api.trillet.ai/v1/api/agents/{agentId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"name": "<string>",
"llmModel": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": true,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [
{}
],
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
'import requests
url = "https://api.trillet.ai/v1/api/agents/{agentId}"
payload = {
"name": "<string>",
"llmModel": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": True,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [{}],
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
llmModel: '<string>',
ttsModel: {
provider: '<string>',
voiceId: '<string>',
language: '<string>',
elevenLabsApiKey: '<string>'
},
smartCallback: true,
maxAttemptsForSmartCallback: 123,
gapBetweenEachAttemptForSmartCallback: [{days: 123, hours: 123}],
phoneNumberIds: [{}],
settings: {speed: 123, volume: 123, temperature: 123},
variables: {}
})
};
fetch('https://api.trillet.ai/v1/api/agents/{agentId}', 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.trillet.ai/v1/api/agents/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'llmModel' => '<string>',
'ttsModel' => [
'provider' => '<string>',
'voiceId' => '<string>',
'language' => '<string>',
'elevenLabsApiKey' => '<string>'
],
'smartCallback' => true,
'maxAttemptsForSmartCallback' => 123,
'gapBetweenEachAttemptForSmartCallback' => [
[
'days' => 123,
'hours' => 123
]
],
'phoneNumberIds' => [
[
]
],
'settings' => [
'speed' => 123,
'volume' => 123,
'temperature' => 123
],
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.trillet.ai/v1/api/agents/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"llmModel\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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.put("https://api.trillet.ai/v1/api/agents/{agentId}")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"llmModel\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"llmModel\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "Updated Customer Support Agent",
"llmModel": "claude-3-5-sonnet-latest",
"ttsModel": {
"provider": "11labs_byo",
"voiceId": "21m00Tcm4TlvDq8ikWAM",
"name": "Premium Voice",
"language": "en",
"elevenLabsApiKey": "your-new-elevenlabs-api-key"
},
"smartCallback": true,
"maxAttemptsForSmartCallback": 5,
"gapBetweenEachAttemptForSmartCallback": [
{ "days": 1, "hours": 0 },
{ "days": 1, "hours": 12 },
{ "days": 2, "hours": 0 },
{ "days": 3, "hours": 0 },
{ "days": 7, "hours": 0 }
],
"settings": {
"speed": 0.9,
"volume": 0.8,
"temperature": 0.6
}
}
Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Path Parameters
string
required
The unique identifier of the agent to update.
Request Body
string
New name for the agent.
string
default:"gpt-4o-mini"
required
New language model to be used by the agent to generate responses. Must be one of: gpt-4o-mini, gpt-4o-enterprise, gpt-4.1, gpt-4.1-mini, gemini-2.5-flash-preview-native-audio-dialog, gemini-2.5-flash, gemini-live-2.5-flash-preview, geminiaudiopipeline:gemini-2.5-flash-preview-native-audio-dialog, gemini-2.0-flash-live-001, gpt-5.
object
Text-to-Speech configuration updates.
Show Voice Settings
Show Voice Settings
string
required
The text-to-speech provider. Must be one of: openai, rime, elevenlabs, 11labs_byo, google.
string
The voice ID used for generating speech. e.g for Trillet Voices,
“mistv2_Wildflower” - Alt Female, Smart
“mistv2_Brook” - Male, Friendly
“mistv2_Violet” - Female, Professional
string
Language code (e.g., en, fr).
string
ElevenLabs API key (required only when provider is “11labs_byo”). Will be encrypted and stored securely. Set to null to remove existing key.
boolean
default:"false"
Enable smart callback functionality for the agent.
number
default:"5"
Maximum number of callback attempts when smart callback is enabled.
array
array
Array of phone number IDs to associate with the agent.
object
object
Custom variables to store for the agent.
Response Fields
string
The unique identifier of the agent.
string
The workspace identifier to which the agent belongs.
string
The user identifier associated with the agent, if applicable.
string
The name assigned to the agent.
object
The configuration of the text-to-speech model used by the agent.
string
The provider of the TTS service.
string
The specific voice ID used in the TTS model.
string
The name of the TTS model configuration.
string
The language set for the TTS model.
string
Encrypted ElevenLabs API key (only present if provider is “11labs_byo”).
string
The large language model used by the agent.
boolean
Whether smart callback functionality is enabled.
array
Array of phone number IDs associated with the agent.
array
object
Any custom settings configured for the agent.
string
The current status of the agent, such as “pending”, “ready”, or “error”.
string
The current node or state within the agent’s flow or logic.
object
Custom variables stored for the agent.
string
Timestamp when the agent was created.
string
Timestamp when the agent was last updated.
{
"name": "Updated Customer Support Agent",
"llmModel": "claude-3-5-sonnet-latest",
"ttsModel": {
"provider": "11labs_byo",
"voiceId": "21m00Tcm4TlvDq8ikWAM",
"name": "Premium Voice",
"language": "en",
"elevenLabsApiKey": "your-new-elevenlabs-api-key"
},
"smartCallback": true,
"maxAttemptsForSmartCallback": 5,
"gapBetweenEachAttemptForSmartCallback": [
{ "days": 1, "hours": 0 },
{ "days": 1, "hours": 12 },
{ "days": 2, "hours": 0 },
{ "days": 3, "hours": 0 },
{ "days": 7, "hours": 0 }
],
"settings": {
"speed": 0.9,
"volume": 0.8,
"temperature": 0.6
}
}
⌘I
