Request
Initiate an outbound call to a phone number using a specified agent.
Bearer token for authentication. Format: Bearer YOUR_API_KEY
Body Parameters
The destination phone number in E.164 format (e.g., +14155551234)
The ID of the agent to use for this call
The phone number to call from. Must be a number you own. Defaults to your primary number.
Custom key-value pairs to attach to the call for your reference
URL to receive real-time call events. Overrides account-level webhook settings.
Whether to record the call
Maximum call duration in seconds (1-3600)
Response
Unique identifier for the call
Current status: queued, ringing, in_progress, completed, failed
The destination phone number
The agent ID used for the call
ISO 8601 timestamp of when the call was created
curl -X POST https://api.ringyo.ai/v1/calls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+14155551234",
"agent_id": "agent_abc123",
"metadata": {
"customer_id": "cust_456",
"campaign": "follow_up"
}
}'
{
"id": "call_xyz789",
"status": "queued",
"phone_number": "+14155551234",
"from_number": "+18005551234",
"agent_id": "agent_abc123",
"metadata": {
"customer_id": "cust_456",
"campaign": "follow_up"
},
"record": true,
"created_at": "2024-01-15T10:30:00Z"
}
Error Codes
| Code | Description |
|---|
invalid_phone_number | Phone number is not in valid E.164 format |
agent_not_found | The specified agent_id does not exist |
insufficient_credits | Account doesn’t have enough credits |
rate_limit_exceeded | Too many concurrent calls |
invalid_from_number | The from_number is not owned by your account |