Skip to main content
POST
/
v1
/
agents
curl -X POST https://api.ringyo.ai/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Assistant",
    "system_prompt": "You are Sarah, a friendly sales assistant for Acme Corp. Your goal is to qualify leads and schedule demos. Be professional but warm. Ask about their current challenges and how Acme can help.",
    "voice_id": "sarah-professional",
    "first_message": "Hi! This is Sarah from Acme Corp. I'\''m reaching out to see if we can help with your business needs. Do you have a moment to chat?",
    "language": "en-US",
    "model": "gpt-4o"
  }'
{
  "id": "agent_abc123",
  "name": "Sales Assistant",
  "system_prompt": "You are Sarah, a friendly sales assistant...",
  "voice_id": "sarah-professional",
  "first_message": "Hi! This is Sarah from Acme Corp...",
  "language": "en-US",
  "model": "gpt-4o",
  "temperature": 0.7,
  "max_tokens": 150,
  "interruption_threshold": 0.5,
  "end_call_phrases": [],
  "status": "active",
  "metadata": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Request

Create a new AI voice agent with custom personality, voice, and behavior settings.

Headers

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

Body Parameters

name
string
required
A friendly name for the agent (e.g., “Sales Assistant”)
system_prompt
string
required
The instructions defining the agent’s personality, goals, and behavior
voice_id
string
required
The voice to use for the agent. See available voices.
first_message
string
The greeting message the agent says when the call connects
language
string
default:"en-US"
Primary language for the agent (e.g., en-US, es-ES, fr-FR)
model
string
default:"gpt-4o"
The LLM to use: gpt-4o, gpt-4o-mini, claude-3-sonnet
temperature
number
default:"0.7"
Creativity level (0.0-1.0). Lower = more focused, higher = more creative.
max_tokens
integer
default:"150"
Maximum tokens per response (affects verbosity)
interruption_threshold
number
default:"0.5"
How easily the user can interrupt (0.0-1.0). Higher = easier to interrupt.
end_call_phrases
array
Phrases that will end the call (e.g., ["goodbye", "that's all"])
metadata
object
Custom key-value pairs for your reference

Response

id
string
Unique identifier for the agent
name
string
The agent’s name
voice_id
string
The voice ID
status
string
Agent status: active, inactive
created_at
string
ISO 8601 timestamp
curl -X POST https://api.ringyo.ai/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Assistant",
    "system_prompt": "You are Sarah, a friendly sales assistant for Acme Corp. Your goal is to qualify leads and schedule demos. Be professional but warm. Ask about their current challenges and how Acme can help.",
    "voice_id": "sarah-professional",
    "first_message": "Hi! This is Sarah from Acme Corp. I'\''m reaching out to see if we can help with your business needs. Do you have a moment to chat?",
    "language": "en-US",
    "model": "gpt-4o"
  }'
{
  "id": "agent_abc123",
  "name": "Sales Assistant",
  "system_prompt": "You are Sarah, a friendly sales assistant...",
  "voice_id": "sarah-professional",
  "first_message": "Hi! This is Sarah from Acme Corp...",
  "language": "en-US",
  "model": "gpt-4o",
  "temperature": 0.7,
  "max_tokens": 150,
  "interruption_threshold": 0.5,
  "end_call_phrases": [],
  "status": "active",
  "metadata": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Error Codes

CodeDescription
invalid_voice_idThe specified voice does not exist
agent_limit_reachedYour plan’s agent limit has been reached
invalid_system_promptSystem prompt is too long or contains invalid content
invalid_languageThe specified language is not supported