Skip to main content
PATCH
/
v1
/
agents
/
{agent_id}
curl -X PATCH https://api.ringyo.ai/v1/agents/agent_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Assistant v2",
    "temperature": 0.8,
    "first_message": "Hey there! Sarah from Acme here. Got a minute?"
  }'
{
  "id": "agent_abc123",
  "name": "Sales Assistant v2",
  "system_prompt": "You are Sarah, a friendly sales assistant...",
  "voice_id": "sarah-professional",
  "first_message": "Hey there! Sarah from Acme here. Got a minute?",
  "language": "en-US",
  "model": "gpt-4o",
  "temperature": 0.8,
  "max_tokens": 150,
  "interruption_threshold": 0.5,
  "end_call_phrases": [],
  "status": "active",
  "metadata": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T16:45:00Z"
}

Request

Update the configuration of an existing AI voice agent. Only include fields you want to change.

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer YOUR_API_KEY
Content-Type
string
required
Must be application/json

Path Parameters

agent_id
string
required
The unique identifier of the agent to update

Body Parameters

All fields are optional. Only include fields you want to update.
name
string
A friendly name for the agent
system_prompt
string
The instructions defining the agent’s personality and behavior
voice_id
string
The voice to use for the agent
first_message
string
The greeting message when calls connect
language
string
Primary language (e.g., en-US, es-ES)
model
string
The LLM to use: gpt-4o, gpt-4o-mini, claude-3-sonnet
temperature
number
Creativity level (0.0-1.0)
max_tokens
integer
Maximum tokens per response
interruption_threshold
number
How easily the user can interrupt (0.0-1.0)
end_call_phrases
array
Phrases that will end the call
status
string
Set to active or inactive
metadata
object
Custom key-value pairs

Response

Returns the updated agent object.
curl -X PATCH https://api.ringyo.ai/v1/agents/agent_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Assistant v2",
    "temperature": 0.8,
    "first_message": "Hey there! Sarah from Acme here. Got a minute?"
  }'
{
  "id": "agent_abc123",
  "name": "Sales Assistant v2",
  "system_prompt": "You are Sarah, a friendly sales assistant...",
  "voice_id": "sarah-professional",
  "first_message": "Hey there! Sarah from Acme here. Got a minute?",
  "language": "en-US",
  "model": "gpt-4o",
  "temperature": 0.8,
  "max_tokens": 150,
  "interruption_threshold": 0.5,
  "end_call_phrases": [],
  "status": "active",
  "metadata": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-20T16:45:00Z"
}

Error Codes

CodeDescription
agent_not_foundThe specified agent_id does not exist
invalid_voice_idThe specified voice does not exist
invalid_system_promptSystem prompt is too long or invalid
unauthorizedYou don’t have access to this agent