Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
update-agent
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/update-agent \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "550e8400-e29b-41d4-a716-446655440000",
    "greeting": "Hi there! Thanks for calling Acme Dental. How can I help you?",
    "voice_speed": 1.1
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Sarah - Receptionist",
  "greeting": "Hi there! Thanks for calling Acme Dental. How can I help you?",
  "voice_speed": 1.1,
  "updated_at": "2024-01-16T09:15:00Z"
}
Update any configuration fields for an existing AI agent. Only include fields you want to change.

Request Body

agent_id
string
required
The unique identifier of the agent to update.
name
string
Agent display name (max 100 characters).
greeting
string
Message spoken when answering calls (max 500 characters).
system_prompt
string
Instructions defining the agent’s behavior (max 10,000 characters).
voice_id
string
Voice identifier for text-to-speech.
voice_provider
string
TTS provider: openai or elevenlabs.
voice_speed
number
Speech speed multiplier (0.5 to 2.0).
language
string
Language code (e.g., en-US, es-ES).
max_call_duration
integer
Maximum call duration in seconds (60 to 3600).
end_call_phrases
array
Phrases that trigger call termination.
transfer_number
string
Phone number for call transfers.
is_active
boolean
Enable or disable the agent.

Response

Returns the updated agent object.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/update-agent \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "550e8400-e29b-41d4-a716-446655440000",
    "greeting": "Hi there! Thanks for calling Acme Dental. How can I help you?",
    "voice_speed": 1.1
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Sarah - Receptionist",
  "greeting": "Hi there! Thanks for calling Acme Dental. How can I help you?",
  "voice_speed": 1.1,
  "updated_at": "2024-01-16T09:15:00Z"
}