Create agent
Creates a new agent. Required: name only. Optional: instructions, output_fields, output_instructions, language, voice, tools, interruption, call messages, DIDs, webhook, and call transfer. Returns full agent details.
Authentication
API key for authentication. Example: raya_ABCD1234567890abcdef
Request
Agent name (required)
Array of key-description pairs. Each item has key and description only (no extra properties).
Instructions for how to populate output_fields after a call.
Required silence after speech in seconds. Optional; defaults to 0.4 if omitted.
Allowed silence before nudge in seconds. Optional; defaults to 20 if omitted.
Allowed speech before nudge in seconds. Optional; defaults to 30 if omitted.
When true, transfer_destination_phone is required (10-digit India mobile). Defaults to false unless a transfer phone is provided.
Call language UUID. Use Auto detect (88296485-1c49-4931-919e-7333986e16da) for an agent that speaks several languages. See Language options.
Voice UUID. See /documentation/agent-voice-options.
Languages the agent speaks, as ISO 639-1 codes (hi, en, mr, te, kn, bn, as, gu, ml, ne, ta, pa). The first is the starting language. Two or more need language_id set to Auto detect (88296485-1c49-4931-919e-7333986e16da) and a multilingual voice_id that speaks all of them; otherwise the request gets a 400. More than 4 is allowed, but the response then has a note in messages: detection gets less reliable as the list grows (we recommend 3 or fewer). See Language options.
How the caller’s language is detected. auto: detect every turn. lock: lock to the first detected language, code-mix on (the caller can still mix in other languages). handoff: lock to the detected language, code-mix off. On the portal: Detect every turn / Lock to detected language (code-mix on or off).
Starting voice when voice_id is a composite voice (a mix of one voice per language that our team prepares on request): one of that composite’s member voices. null clears it. Any other voice gets a 400.
Function tools: { llm_tools: […] }. Each tool needs type function, function (name, description, parameters), and api_details (method, url). See documentation/agents-llm-tools.
Minimum user speech (seconds) before interruption is allowed.
Response
Instructions for how to populate output_fields after a call.
Array of key-description pairs. Each item has key and description only (no extra properties).
Agent arguments as a JSON object (e.g. {“contact_name”: “John”, “order_id”: “123”}). Not an array.
Inbound DID number (read-only; for reference)
Webhook URL for callbacks (sent on call completed or call failure). See Webhooks for payload format.
When true, the voice agent may use live call transfer to a human (India only). Default true.
Call language UUID. See /documentation/agent-language-options.
Voice UUID. See /documentation/agent-voice-options.
Languages the agent speaks (ISO 639-1); the first is the starting language. Empty for a single-language agent.
How the caller’s language is detected: auto (every turn), lock (first detected language, code-mix on) or handoff (lock, code-mix off).
Starting voice of a composite voice_id, or null.
Function tools ({ "llm_tools": [...] }). Empty array when none configured.
Minimum user speech duration (seconds) before interruption is allowed.
Notes about the request, present only when there are any: an inbound number moved from another agent, or more than 4 languages. The change itself was applied.

