Voice AI API
Access call logs, transcripts, and manage active call transfers through the Voice AI system.
GET
/v1/voice/callsReturns a paginated list of voice calls handled by the AI agent.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| date_from | string | Optional | Start date (YYYY-MM-DD) |
| date_to | string | Optional | End date (YYYY-MM-DD) |
| status | string | Optional | Filter by status: completed, missed, transferred, in_progress |
| page | integer | Optional | Page number (default: 1) |
| limit | integer | Optional | Results per page (default: 20, max: 100) |
Example Request
curl -X GET "https://api.relaya.one/v1/voice/calls?date_from=2026-07-20&status=completed" \
-H "Authorization: Bearer rlya_live_abc123"Example Response
{
"data": [
{
"id": "call_7vm2k9",
"caller_phone": "+919876543210",
"patient_id": "pat_4jn7h2",
"direction": "inbound",
"status": "completed",
"duration_seconds": 142,
"intent": "appointment_booking",
"outcome": "appointment_created",
"started_at": "2026-07-22T09:15:00Z",
"ended_at": "2026-07-22T09:17:22Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 34,
"has_more": true
}
}GET
/v1/voice/calls/:idRetrieve a single call with full transcript and metadata.
Example Response
{
"data": {
"id": "call_7vm2k9",
"caller_phone": "+919876543210",
"patient_id": "pat_4jn7h2",
"direction": "inbound",
"status": "completed",
"duration_seconds": 142,
"intent": "appointment_booking",
"outcome": "appointment_created",
"started_at": "2026-07-22T09:15:00Z",
"ended_at": "2026-07-22T09:17:22Z",
"transcript": [
{
"speaker": "ai",
"text": "Thank you for calling Smile Dental. How can I help you today?",
"timestamp": "2026-07-22T09:15:02Z"
},
{
"speaker": "caller",
"text": "I would like to book an appointment for a cleaning.",
"timestamp": "2026-07-22T09:15:08Z"
},
{
"speaker": "ai",
"text": "I can help with that. Let me check available slots for you.",
"timestamp": "2026-07-22T09:15:14Z"
}
],
"recording_url": "https://api.relaya.one/v1/voice/calls/call_7vm2k9/recording"
}
}POST
/v1/voice/calls/:id/transferTransfer an active call to a human staff member. Only works on calls with status in_progress.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| target_phone | string | Required | Phone number to transfer to (E.164) |
| reason | string | Optional | Reason for transfer |
Example Request
curl -X POST "https://api.relaya.one/v1/voice/calls/call_7vm2k9/transfer" \
-H "Authorization: Bearer rlya_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"target_phone": "+919812345678",
"reason": "Patient requested to speak with doctor"
}'Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | bad_request | Invalid parameters |
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Call not found |
| 409 | conflict | Call is not in transferable state |
| 429 | rate_limited | Too many requests |