Agents
Create Agent
Creates an agent with its first draft version. Optionally include agent_functions and post_call_analysis in the body to set them at creation time.
Phone numbers are linked to the agent, not to a version. Once the agent has a published version, attach numbers with POST /v1/agents/{agentId}/phone-numbers.
post/v1/agents
Request
- Base URL: https://api.dialnexa.com
- URL: https://api.dialnexa.com/v1/agents
- Auth: HTTP bearer
Request body
Example request
{
"voicemail_detection": true,
"hangup_on_voicemail": true,
"voicemail_message": "Hi, please call us back at your convenience.",
"end_call_on_silence_sec": 20,
"end_call_on_hold_sec": 20,
"max_call_duration_sec": 900,
"ring_duration_sec": 30,
"reminder_message_interval": 10,
"folder_id": "f5k2m8x1q9w3zp",
"agent_type": "Single_Prompt_Agent",
"pipeline_type": "Cascaded",
"title": "Customer Support Agent",
"description": "This agent handles customer support inquiries",
"timezone": "Asia/Kolkata",
"llm_id": "llm_A1B2C3D4E5F6G7",
"language_id": "lang_en_in",
"voice_id": "voice_abc123",
"prompt_text": "Hello, how can I assist you today?",
"system_prompt_text": "You are a helpful customer support agent named Sarah.",
"welcome_message": "Welcome to our service!",
"knowledge_base_ids": [
"kb_abc123",
"kb_def456"
],
"kb_max_chunks": 5,
"kb_min_score": 0.5,
"default_dynamic_variables": {
"firstName": "John",
"lastName": "Doe",
"courseType": "Math"
},
"voice_model_id": "vm4k2p9x7q1z3r",
"voice_speed": 1,
"voice_temperature": 1,
"llm_temperature": 1,
"llm_fallback_delay_ms": 200,
"llm_fallback_model": "llm_A1B2C3D4E5F6G7",
"agent_identity": "You are a helpful customer support agent named Sarah.",
"agent_background": "You have 5 years of experience in customer support and specialize in helping customers with technical issues.",
"post_call_analysis_llm_id": "llm_A1B2C3D4E5F6G7",
"pronunciations": [
{
"original_word": "Nexa",
"pronunciation_format": "Nek-sa",
"phonetic_pronunciation": "Nek-sa"
}
]
}Response
Agent created successfully.
Example response
{
"statusCode": 201,
"message": "Success",
"data": {
"id": "agent_2g7Xy3tY53gRlp",
"current_version_number": "3",
"current_version": {
"version_number": "1",
"postcall_analysis": [
{
"llm_id": "llm_A1B2C3D4E5F6G7"
}
]
},
"versions": [
{
"version_number": "1",
"postcall_analysis": [
{
"llm_id": "llm_A1B2C3D4E5F6G7"
}
]
}
],
"organization_id": "o14XKPP84rt22g",
"inbound_phone_numbers": [
{
"id": "phn_abc123",
"phone_number": "9876543210",
"country_iso": "91"
}
],
"outbound_phone_numbers": [
{
"id": "phn_abc123",
"phone_number": "9876543210",
"country_iso": "91"
}
],
"running_batches": [
{
"id": "batch_2g7Xy3tY53gRlp"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.