Skip to main content
PATCH
/
v1
/
agents
/
{agent_id}
Update Voice Agent
curl --request PATCH \
  --url https://api.example.com/v1/agents/{agent_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "agent_name": "<string>",
  "starting_message": "<string>",
  "prompt": "<string>",
  "voice_id": "<string>",
  "voice_temperature": 123,
  "voice_speed": 123,
  "volume": 123,
  "language": "<string>",
  "responsiveness": 123,
  "interruption_sensitivity": 123,
  "enable_backchannel": true,
  "backchannel_frequency": 123,
  "backchannel_words": [
    {}
  ],
  "ambient_sound": "<string>",
  "ambient_sound_volume": 123,
  "enable_voicemail_detection": true,
  "voicemail_message": "<string>",
  "voicemail_detection_timeout_ms": 123,
  "reminder_trigger_ms": 123,
  "reminder_max_count": 123,
  "end_call_after_silence_ms": 123,
  "max_call_duration_ms": 123,
  "begin_message_delay_ms": 123,
  "ring_duration_ms": 123,
  "stt_mode": "<string>",
  "vocab_specialization": "<string>",
  "boosted_keywords": [
    {}
  ],
  "normalize_for_speech": true,
  "allow_user_dtmf": true,
  "denoising_mode": "<string>",
  "knowledge_base_ids": [
    {}
  ],
  "kb_config": {},
  "extraction_fields": [
    {}
  ],
  "post_call_analysis_data": [
    {}
  ],
  "data_storage_setting": "<string>"
}
'
{
  "success": true,
  "agent_id": "agent_voice123",
  "message": "Agent updated successfully",
  "updated": {
    "voice_settings": true,
    "ai_behavior": true,
    "agent_info": true
  }
}

Overview

Update an existing Voice agent’s configuration including voice settings, conversation behavior, voicemail handling, and AI behavior. All parameters from Create Voice Agent can be updated.
This endpoint is for Voice agents only. For SMS agents, see Update SMS Agent.For updating tools (function calling, transfers, etc.), use Update Voice Agent Tools.

Authentication

X-API-Key
string
required
Your Teli API key

Path Parameters

agent_id
string
required
The unique identifier of the Voice agent to update

Request Body

All fields are optional. Only include the fields you want to update.

Basic Settings

agent_name
string
Display name for the agent
starting_message
string
First message spoken when call connects. Supports {{first_name}}, {{last_name}}
prompt
string
AI behavior instructions defining personality and conversation goals

Voice Configuration

voice_id
string
Voice ID for text-to-speech. See List Voices for options.
voice_temperature
number
default:"1"
Voice stability. Range: 0 (stable) to 2 (varied)
voice_speed
number
default:"1"
Speech rate. Range: 0.5 (slow) to 2 (fast)
volume
number
default:"1"
Agent volume. Range: 0 (quiet) to 2 (loud)

Language

language
string
default:"en-US"
Speech recognition language
Supported languages:
  • en-US (English - US)
  • en-GB (English - UK)
  • es-ES (Spanish - Spain)
  • es-419 (Spanish - Latin America)
  • fr-FR (French)
  • de-DE (German)
  • ja-JP (Japanese)
  • zh-CN (Chinese)
  • multi (Multilingual)

Conversation Behavior

responsiveness
number
default:"1"
How quickly agent responds. Range: 0 (slower) to 1 (faster)
interruption_sensitivity
number
default:"1"
How easily user can interrupt. Range: 0 (hard) to 1 (easy)
enable_backchannel
boolean
default:"false"
Enable conversational interjections (“yeah”, “uh-huh”)
backchannel_frequency
number
default:"0.8"
How often to interject. Range: 0 (rarely) to 1 (frequently)
backchannel_words
array
Custom backchannel words. Example: ["right", "I see", "got it"]

Ambient Sound

ambient_sound
string
Background audio for realism
Options:
  • null - No ambient sound
  • coffee-shop - Café atmosphere
  • convention-hall - Echo, crowd noise
  • summer-outdoor - Cicadas, nature
  • mountain-outdoor - Birds, wind
  • static-noise - Light static
  • call-center - Office background
ambient_sound_volume
number
default:"1"
Ambient sound level. Range: 0 to 2

Voicemail Detection

enable_voicemail_detection
boolean
default:"true"
Automatically detect voicemail
voicemail_message
string
Message to leave on voicemail. Empty string = hangup immediately
voicemail_detection_timeout_ms
number
default:"30000"
Detection timeout in milliseconds. Range: 5000 to 180000

Reminder & Silence Settings

reminder_trigger_ms
number
default:"10000"
Time (ms) to wait before reminding silent user
reminder_max_count
number
default:"1"
Maximum reminders before ending call. 0 = disabled
end_call_after_silence_ms
number
default:"90000"
End call after this much silence (ms). Minimum: 10000

Call Settings

max_call_duration_ms
number
default:"3600000"
Maximum call length in milliseconds. Range: 60000 to 7200000
begin_message_delay_ms
number
default:"0"
Delay before speaking (ms). Range: 0 to 5000
ring_duration_ms
number
default:"30000"
Ring timeout for outbound calls (ms). Range: 5000 to 90000

Speech Recognition

stt_mode
string
default:"fast"
Speech-to-text mode: fast or accurate
vocab_specialization
string
default:"general"
Vocabulary focus: general or medical
boosted_keywords
array
Words to boost recognition. Example: ["Acme", "TurboWidget"]
normalize_for_speech
boolean
default:"false"
Convert numbers/dates to spoken form
allow_user_dtmf
boolean
default:"true"
Allow keypad input (press 1, press 2, etc.)
denoising_mode
string
default:"noise-cancellation"
Audio cleanup: noise-cancellation or noise-and-background-speech-cancellation

Knowledge Base

knowledge_base_ids
array
Link knowledge bases for RAG retrieval. Example: ["kb_abc123"]
kb_config
object
Knowledge base retrieval settings
kb_config Example
{
  "top_k": 3,           // Chunks to retrieve (1-10)
  "filter_score": 0.6   // Similarity threshold (0-1)
}

Data Extraction (Post-Call Analysis)

Automatically extract custom data from call transcripts after each call ends.
extraction_fields
array
List of field names to extract from conversations. Simple string array.Example: ["credit_score", "loan_amount", "annual_income", "interested"]Extracted data is accessible via GET /v1/voice/calls//extractions.
post_call_analysis_data
array
Advanced: Define custom fields with specific types. Use extraction_fields for simpler configuration.String Type - Extract free-form text:
{ "type": "string", "name": "customer_name", "description": "Full name of customer" }
Enum Type - Extract from predefined choices:
{ "type": "enum", "name": "interest_level", "description": "Interest level", "choices": ["high", "medium", "low"] }
Boolean Type - Extract true/false:
{ "type": "boolean", "name": "scheduled_callback", "description": "Agreed to callback" }
Number Type - Extract numeric values:
{ "type": "number", "name": "budget", "description": "Stated budget amount" }

Privacy & Storage

data_storage_setting
string
default:"everything"
What data to store
Options:
  • everything - Full transcripts, recordings, logs
  • everything_except_pii - Scrub PII before storing
  • basic_attributes_only - No transcripts/recordings

Request Examples

Update Voice Settings

curl -X PATCH "https://api.teli.ai/v1/agents/agent_voice123" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "voice_speed": 0.9,
    "voice_temperature": 0.8,
    "responsiveness": 0.7,
    "interruption_sensitivity": 0.9
  }'

Update Conversation Behavior

curl -X PATCH "https://api.teli.ai/v1/agents/agent_voice123" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enable_backchannel": true,
    "backchannel_frequency": 0.6,
    "backchannel_words": ["right", "I see", "got it", "okay"],
    "ambient_sound": "call-center",
    "ambient_sound_volume": 0.5
  }'

Update Voicemail Settings

curl -X PATCH "https://api.teli.ai/v1/agents/agent_voice123" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enable_voicemail_detection": true,
    "voicemail_message": "Hi {{first_name}}, this is Sarah from Acme Corp. Please call us back at 555-1234.",
    "voicemail_detection_timeout_ms": 25000
  }'

Update AI Prompt & Knowledge Base

curl -X PATCH "https://api.teli.ai/v1/agents/agent_voice123" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "You are a helpful customer support agent. Be friendly and professional. Answer questions using the knowledge base when available.",
    "knowledge_base_ids": ["kb_abc123", "kb_def456"],
    "kb_config": {
      "top_k": 5,
      "filter_score": 0.7
    }
  }'

Update Post-Call Analysis

curl -X PATCH "https://api.teli.ai/v1/agents/agent_voice123" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "post_call_analysis_data": [
      {
        "type": "string",
        "name": "customer_name",
        "description": "The full name of the customer"
      },
      {
        "type": "enum",
        "name": "interest_level",
        "description": "How interested is the customer",
        "choices": ["very_interested", "somewhat_interested", "not_interested"]
      },
      {
        "type": "boolean",
        "name": "scheduled_callback",
        "description": "Whether the customer agreed to a callback"
      },
      {
        "type": "number",
        "name": "budget",
        "description": "The customer stated budget amount"
      }
    ],
    "post_call_analysis_model": "gpt-4.1-mini"
  }'

Comprehensive Update

{
  "agent_name": "Premium Support Agent",
  "starting_message": "Hello {{first_name}}, thank you for calling Acme Support. How can I help you today?",
  "prompt": "You are a senior support specialist...",
  "voice_speed": 0.95,
  "voice_temperature": 0.7,
  "responsiveness": 0.8,
  "interruption_sensitivity": 0.9,
  "enable_backchannel": true,
  "backchannel_frequency": 0.5,
  "ambient_sound": "call-center",
  "reminder_max_count": 2,
  "end_call_after_silence_ms": 120000,
  "max_call_duration_ms": 1800000,
  "voicemail_message": "Hi, please call us back.",
  "knowledge_base_ids": ["kb_products", "kb_faq"]
}

Response

Success Response

{
  "success": true,
  "agent_id": "agent_voice123",
  "message": "Agent updated successfully",
  "updated": {
    "voice_settings": true,
    "ai_behavior": true,
    "agent_info": true
  }
}
success
boolean
Indicates successful update
agent_id
string
The updated agent’s unique identifier
updated.voice_settings
boolean
Whether voice/call settings were updated
updated.ai_behavior
boolean
Whether AI prompt/tools/knowledge base was updated
updated.agent_info
boolean
Whether agent metadata was updated

Error Responses

{
  "success": false,
  "error": "Agent not found"
}

Use Case Presets

Cold Calling / Sales

{
  "voice_speed": 1,
  "voice_temperature": 1,
  "responsiveness": 0.8,
  "interruption_sensitivity": 0.7,
  "enable_backchannel": true,
  "voicemail_message": "Hi {{first_name}}, this is calling from [Company]. Please call us back."
}

Customer Support

{
  "voice_speed": 0.9,
  "voice_temperature": 0.8,
  "responsiveness": 0.6,
  "interruption_sensitivity": 0.9,
  "enable_backchannel": true,
  "backchannel_frequency": 0.7,
  "ambient_sound": "call-center",
  "reminder_max_count": 3
}

Appointment Reminders

{
  "voice_speed": 1.1,
  "voice_temperature": 0.5,
  "responsiveness": 1,
  "max_call_duration_ms": 300000,
  "voicemail_message": "Hi {{first_name}}, this is a reminder about your appointment."
}

Best Practices

Test changes: Test with a single call before updating production agents
Start conservative: Begin with default values and adjust gradually
Match voice to persona: Choose voice settings that match your agent’s personality
Enable backchannel for long calls: Makes conversations feel more natural
Set appropriate timeouts: Adjust silence and reminder settings for your use case

Notes

  • Updates take effect immediately for new calls
  • Active calls continue with previous settings
  • Some settings (like voice_id) may take a few seconds to propagate
  • Agent type cannot be changed from Voice to SMS