Raya Voice AI core concepts
Understanding the key concepts will help you effectively use the Raya Voice AI platform.
Agents
Agents are AI-powered voice assistants that can make calls and conduct conversations. Each agent has:
- Instructions: How the agent should behave and what to say
- Output fields (
output_fields): Array of key–description pairs. Each item haskey(field name, e.g.customer_name) anddescription(what to extract). - Output instructions (
output_instructions): String. Instructions for how to populateoutput_fieldsafter a call. - Configuration: Settings like silence detection, nudge timing, interruption, call duration, and telephony (see Voice and runtime settings below)
- Webhook URL: Optional callback URL for call events
- Call transfer (
allow_call_transfer,transfer_destination_phone): Optional India-only live transfer to a human. Ifallow_call_transferis true,transfer_destination_phoneis required (10 digits, no country code, e.g.9876543210). You cannot enable transfer with a blank number. - Inbound DID uniqueness: Each
in_didmay only be assigned to one agent per team. Settingin_didon an agent clears that inbound DID on any other agent; the API response includes amessagesarray describing what changed.
Voice and runtime settings (API)
When you create or update a regular agent via the API (POST /api/agent, PATCH /api/agent/{id}), you can optionally configure voice and call behavior. All of these fields are optional — omit any key you do not want to change.
Supported language and voice options: Language and voice choices are configured per team. The API accepts UUIDs (language_id, voice_id) only if they are enabled for your account. See Language Options and Voice Options. Your team may only allow a subset — confirm with your administrator.
Language model: Configured automatically when an agent is created. You cannot set or change it through the Agents API.
PATCH behavior: Send only the fields you want to change. Omitted keys stay as-is. For the new voice/runtime fields, do not send null — omit the key instead. To clear voicemail_msg or call_duration_exceed_message, send an empty string "".
Regular Agents
General-purpose agents for various use cases like customer support, surveys, notifications, etc.
Job Agents
Specialized agents designed for recruitment workflows with:
- Template fields: Agent role (
agent_role), introduction, about job/company, closing message, and interview questions. - Agent role vs job role: Agent role (
agent_role) is how the voice agent should behave (e.g. “prescreening interviewer”). It is distinct from job role, which is the position being hired for (e.g. “Senior Python Developer”). - Output fields (
output_fields) and output instructions (output_instructions): Same as regular agents —output_fieldsis an array of key–description pairs (key,description);output_instructionsis a string. - Generate from JD (
generate_from_jd_text): Optional job description (JD) text. When provided, the API generates template content (agent_role, introduction, about_job, etc.) and merges it with any fields you already supplied. Fields you provide are used as context (e.g. your custom introduction or agent_role). - Job agent type:
hr_pre_screening,hr_mock_interview, orhr_interview - Call transfer (
allow_call_transfer,transfer_destination_phone): Same as regular agents — India-only; 10-digit mobile without country code when a transfer destination is set.
Updating agents
Agents and job agents can be updated via PATCH /api/agent/{id} and PATCH /api/job-agent/{id} respectively.
- PATCH body shape:
- Agents:
PATCH /api/agent/{id}accepts the same optional fields as create (name,instructions,output_fields,output_instructions, voice/runtime settings,webhook_url, silence/nudge config,out_did,in_did,allow_call_transfer,transfer_destination_phone). Provided fields update the agent configuration. - Job agents:
PATCH /api/job-agent/{id}accepts the same fields as create (name,agent_role, introduction/about job/company, extra/closing messages, questions,output_fields,output_instructions, webhook and config,allow_call_transfer,transfer_destination_phone). It does not supportgenerate_from_jd_texton update. Provided fields replace the corresponding template and output configuration.
- Agents:
Caution — PATCH replaces fields you send. GET the agent first, merge your changes, then PATCH so you do not lose data.
Deleting agents
Agents can be deleted via DELETE /api/agent/{id}.
Warning — deletion is permanent: Deleting an agent removes the agent and all associated data. The following will be permanently deleted and cannot be recovered:
- All calls and call history for this agent
- All batches and contacts for this agent
- All other related data (e.g. webhook logs, settings) tied to this agent
This action cannot be undone.
Before deleting: Stop any active batch for that agent. If the agent has a batch with status “Active”, the API returns 400 with a message like: Stop your batch (batch_id) before deleting. Stop that batch first, then delete the agent.
Calls
Individual phone call instances with:
- Status tracking: Pending → Completed/Failure
- Transcripts: Full conversation transcripts
- Recordings: Audio recordings of calls
- Call metadata: Duration, timestamps, phone numbers
- Extracted data: Structured data from conversations
- Outcomes: Success/failure status
Call Statuses
- Pending: Call is dialing or in progress
- Completed: Call was answered and completed
- Failure: Call was not picked up or unable to dial
Initiating a call (POST /api/call)
When you initiate a call, you may pass agent_args to send extra context to the agent (e.g. contact name, order ID). agent_args must be a JSON object {}, not an array. Example: {"contact_name": "John", "order_id": "123"}.
Batches
Collections of contacts for batch calling campaigns with:
- Scheduling: Time zones, business hours, days of week
- Retry logic: Max retries, retry intervals
- Concurrency control: Simultaneous calls
- Progress tracking: Completed, unanswered, total contacts
- Status management: Pending, Running, Stopped
Batch Configuration
- Schedule: When to make calls (timezone, hours, days)
- Max retries: How many times to retry failed calls
- Retry after hours: Wait time between retries
- Concurrency: Maximum simultaneous calls
Contacts
Contact information stored in batches:
- Contact name: Name of the person to call
- Contact phone: Phone number (10 digits for India)
- Country code: Optional country code
- Agent args: Additional data passed to the agent during the call. Must be a JSON object
{}, not an array (e.g.{"contact_name": "John", "order_id": "123"}). - Status: Pending, Completed, Unanswered, Invalid
- Call history: All calls made to this contact
User Interaction
Nudging
Send messages to users during active calls to guide conversations:
- Real-time intervention
- Dynamic conversation management
- Context-aware messaging
Rate Limits
- Call initiation: Per-key limit (default 1 per 20 seconds, configurable in key settings)
- Other endpoints: 1 request per second per API key
When rate limited, you’ll receive a 429 status code with retry information.
Concurrency Limits
Your account has a maximum number of concurrent calls. The system will return a 429 error if you exceed this limit.
Webhooks
Optional callback URLs for receiving call events. Your webhook is invoked in two cases:
- Call completed — when the call was answered and finished
- Call failed — when the call was not picked up, could not be dialed, or otherwise failed
Your webhook receives a POST request with a JSON body. You can expect the following data:
Webhook payload
All timestamp fields (call_start_time, call_end_time, created_at) are in UTC (ISO 8601 with Z suffix).
- Event-driven integrations: Use the payload to update your CRM, sheets, or other systems. Check
outcometo handle completed vs failed calls.
Timezones
All scheduling and time-based operations use IANA timezone identifiers:
Asia/Kolkata- India Standard TimeAmerica/New_York- Eastern TimeEurope/London- GMT/BSTUTC- Coordinated Universal Time
Phone Numbers
- Format: 10 digits for India (e.g., “1234567890”)
- Country code: Optional, defaults to “91” for India
- DID: Direct Inward Dialing number for outbound calls
Data Extraction
Agents can extract structured data from conversations:
- Custom output fields
- JSON format responses
- Integration with external systems

