Skip to navigation

Create job agent

View as Markdown

Creates a new job agent. Required: name, type (hr_pre_screening | hr_mock_interview | hr_interview). Optional: template fields (agent_role, introduction, about_job, about_company, closing_message, questions), output_fields, output_instructions, generate_from_jd_text (JD text to generate template content), out_did. Returns full job agent details including in_did and out_did.

Authentication

X-API-Keystring

API key for authentication. Example: raya_ABCD1234567890abcdef

Request

This endpoint expects an object.
namestringRequired

Job agent name (required)

typeenumRequired
Job agent template type
Allowed values:
agent_rolestringOptional

Agent role: how the voice agent should behave (e.g. prescreening interviewer). Not the job/position title.

introductionstringOptional
Introduction text
about_jobstringOptional
About the job
about_companystringOptional
About the company
extra_instructionsstringOptional
Extra instructions
closing_messagestringOptional
Closing message
questionslist of stringsOptional
Interview questions
output_fieldslist of objectsOptional

Array of key-description pairs. Each item has key and description only (no extra properties).

output_instructionsstringOptional

Instructions for how to populate output_fields after a call.

generate_from_jd_textstringOptional

Optional job description (JD) text. When provided, the API generates template content (agent_role, introduction, about_job, etc.) and merges with any fields you supplied.

webhook_urlstring or nullOptionalformat: "uri"
required_silence_after_speechdouble or nullOptional>=0
allowed_silence_before_nudgeinteger or nullOptional>=0
allowed_speech_before_nudgeinteger or nullOptional>=0
out_diddouble or nullOptional
Outbound DID. If omitted, first DID from customer is used.
allow_call_transferbooleanOptional
India only. When true, live call transfer to a human is allowed.
transfer_destination_phonestring or nullOptionalformat: "^[0-9]{10}$"

India mobile (10 digits, no +91). Null or omit if not using transfer.

Response

Job agent created successfully
uuidstringOptionalformat: "uuid"
Unique identifier of the agent
namestringOptional
Name of the agent
agent_rolestringOptional

Agent role: how the voice agent should behave (e.g. prescreening interviewer). Distinct from job role (the position being hired for).

introductionstringOptional
Introduction
about_jobstringOptional
About job
about_companystringOptional
About company
extra_instructionsstringOptional
Extra instructions
output_instructionsstringOptional

Instructions for how to populate output_fields after a call.

closing_messagestringOptional
Closing message
questionslist of stringsOptional
Questions
output_fieldslist of objectsOptional

Array of key-description pairs. Each item has key and description only (no extra properties).

agent_argsmap from strings to anyOptional

Agent arguments as a JSON object (e.g. {“contact_name”: “John”, “order_id”: “123”}). Not an array.

required_silence_after_speechdouble or nullOptional
Required silence after speech in seconds
allowed_silence_before_nudgedouble or nullOptional
Allowed silence before nudge in seconds
allowed_speech_before_nudgedouble or nullOptional
Allowed speech before nudge in seconds
out_diddouble or nullOptional
Outbound DID number
in_diddouble or nullOptional

Inbound DID number (read-only; for reference)

webhook_urlstring or nullOptional

Webhook URL for callbacks (sent on call completed or call failure). See Webhooks for payload format.

allow_call_transferbooleanOptional
India only. When true, live call transfer to a human is allowed.
transfer_destination_phonestring or nullOptionalformat: "^[0-9]{10}$"

India mobile (10 digits, no +91). Null if unused.

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error
502
Bad Gateway Error