Update any configuration fields for an existing AI agent. Only include fields you want to change.
Request Body
The unique identifier of the agent to update.
Agent display name (max 100 characters).
Message spoken when answering calls (max 500 characters).
Instructions defining the agent’s behavior (max 10,000 characters).
Voice identifier for text-to-speech.
TTS provider: openai or elevenlabs.
Speech speed multiplier (0.5 to 2.0).
Language code (e.g., en-US, es-ES).
Maximum call duration in seconds (60 to 3600).
Phrases that trigger call termination.
Phone number for call transfers.
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"
}