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: <x-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": {}
}'
{
  "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

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Path Parameters

agentId
string
required
The unique identifier of the agent to update.

Request Body

name
string
New name for the agent.
llmModel
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.
ttsModel
object
Text-to-Speech configuration updates.
smartCallback
boolean
default:"false"
Enable smart callback functionality for the agent.
maxAttemptsForSmartCallback
number
default:"5"
Maximum number of callback attempts when smart callback is enabled.
gapBetweenEachAttemptForSmartCallback
array
Array of time intervals between each callback attempt. Each item contains days and hours.
phoneNumberIds
array
Array of phone number IDs to associate with the agent.
settings
object
Additional settings for the agent.
variables
object
Custom variables to store for the agent.

Response Fields

_id
string
The unique identifier of the agent.
workspaceId
string
The workspace identifier to which the agent belongs.
userId
string
The user identifier associated with the agent, if applicable.
name
string
The name assigned to the agent.
ttsModel
object
The configuration of the text-to-speech model used by the agent.
provider
string
The provider of the TTS service.
voiceId
string
The specific voice ID used in the TTS model.
name
string
The name of the TTS model configuration.
language
string
The language set for the TTS model.
elevenLabsApiKey
string
Encrypted ElevenLabs API key (only present if provider is “11labs_byo”).
llmModel
string
The large language model used by the agent.
smartCallback
boolean
Whether smart callback functionality is enabled.
phoneNumberIds
array
Array of phone number IDs associated with the agent.
activeSessions
array
A list of active sessions associated with the agent.
roomName
string
The name of the room for the session.
participantId
string
The participant identifier in the session.
startTime
date
The start time of the session.
status
string
The status of the session.
settings
object
Any custom settings configured for the agent.
status
string
The current status of the agent, such as “pending”, “ready”, or “error”.
currentNode
string
The current node or state within the agent’s flow or logic.
variables
object
Custom variables stored for the agent.
createdAt
string
Timestamp when the agent was created.
updatedAt
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
  }
}