curl https://api.ringyo.ai/v1/agents/agent_abc123?include=stats \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.ringyo.ai/v1/agents/agent_abc123?include=stats',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
}
);
const agent = await response.json();
import requests
response = requests.get(
'https://api.ringyo.ai/v1/agents/agent_abc123',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'include': 'stats'}
)
agent = response.json()
{
"id": "agent_abc123",
"name": "Sales Assistant",
"system_prompt": "You are Sarah, a friendly sales assistant for Acme Corp...",
"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": ["goodbye", "that's all"],
"status": "active",
"stats": {
"total_calls": 1250,
"total_duration_minutes": 4580,
"avg_call_duration_seconds": 220,
"success_rate": 0.85
},
"metadata": {},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-18T14:22:00Z"
}
{
"error": {
"code": "agent_not_found",
"message": "The specified agent does not exist"
}
}
Agents
Get Agent
Retrieve details of a specific agent
GET
/
v1
/
agents
/
{agent_id}
curl https://api.ringyo.ai/v1/agents/agent_abc123?include=stats \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.ringyo.ai/v1/agents/agent_abc123?include=stats',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
}
);
const agent = await response.json();
import requests
response = requests.get(
'https://api.ringyo.ai/v1/agents/agent_abc123',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'include': 'stats'}
)
agent = response.json()
{
"id": "agent_abc123",
"name": "Sales Assistant",
"system_prompt": "You are Sarah, a friendly sales assistant for Acme Corp...",
"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": ["goodbye", "that's all"],
"status": "active",
"stats": {
"total_calls": 1250,
"total_duration_minutes": 4580,
"avg_call_duration_seconds": 220,
"success_rate": 0.85
},
"metadata": {},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-18T14:22:00Z"
}
{
"error": {
"code": "agent_not_found",
"message": "The specified agent does not exist"
}
}
Request
Retrieve detailed information about a specific AI voice agent.Headers
string
required
Bearer token for authentication. Format:
Bearer YOUR_API_KEYPath Parameters
string
required
The unique identifier of the agent (e.g.,
agent_abc123)Query Parameters
string
Comma-separated list of additional data:
stats, recent_callsResponse
string
Unique identifier for the agent
string
The agent’s display name
string
The agent’s instruction prompt
string
The voice ID used by the agent
string
The agent’s greeting message
string
Primary language code
string
The LLM powering the agent
string
Agent status:
active or inactiveobject
Usage statistics (when
include=stats)string
ISO 8601 creation timestamp
string
ISO 8601 last update timestamp
curl https://api.ringyo.ai/v1/agents/agent_abc123?include=stats \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.ringyo.ai/v1/agents/agent_abc123?include=stats',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
}
);
const agent = await response.json();
import requests
response = requests.get(
'https://api.ringyo.ai/v1/agents/agent_abc123',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'include': 'stats'}
)
agent = response.json()
{
"id": "agent_abc123",
"name": "Sales Assistant",
"system_prompt": "You are Sarah, a friendly sales assistant for Acme Corp...",
"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": ["goodbye", "that's all"],
"status": "active",
"stats": {
"total_calls": 1250,
"total_duration_minutes": 4580,
"avg_call_duration_seconds": 220,
"success_rate": 0.85
},
"metadata": {},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-18T14:22:00Z"
}
{
"error": {
"code": "agent_not_found",
"message": "The specified agent does not exist"
}
}
Error Codes
| Code | Description |
|---|---|
agent_not_found | The specified agent_id does not exist |
unauthorized | You don’t have access to this agent |