curl -X POST https://api.teli.ai/v1/agents \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_type": "voice", "agent_name": "Sales Agent", "starting_message": "Hi {{first_name}}, this is Sarah calling about your inquiry.", "prompt": "You are a friendly sales agent. Ask about their needs and budget.", "organization_id": "1762896364768x389173798861431550", "user_id": "1762896366429x599348279945132448", "voice_id": "11labs-Adrian", "language": "en-US" }'
Create a reusable Voice conversation agent with advanced tuning options
POST
/
v1
/
agents
Copy
Ask AI
curl -X POST https://api.teli.ai/v1/agents \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_type": "voice", "agent_name": "Sales Agent", "starting_message": "Hi {{first_name}}, this is Sarah calling about your inquiry.", "prompt": "You are a friendly sales agent. Ask about their needs and budget.", "organization_id": "1762896364768x389173798861431550", "user_id": "1762896366429x599348279945132448", "voice_id": "11labs-Adrian", "language": "en-US" }'
First message spoken when call connects. Supports variables: {{first_name}}, {{last_name}}Example: "Hi {{first_name}}, this is Sarah calling about your inquiry. Do you have a moment to chat?"
AI behavior instructions. Define personality, goals, and conversation flow.Example:
Copy
Ask AI
You are a friendly sales agent for Acme Corp.## Your Goals- Qualify leads by asking about their needs- Collect their budget and timeline- Schedule a follow-up call if interested## Guidelines- Be conversational and friendly- Don't be pushy- If they're not interested, thank them and end politely
Message to leave on voicemail. If empty, call hangs up when voicemail is detected.Example: "Hi {{first_name}}, this is Sarah from Acme Corp. Please call us back at 555-1234."
Automatically extract custom data from call transcripts after each call ends. Results are stored in the call history and available via extraction endpoints.
List of field names to extract from conversations. Simple string array that auto-generates extraction instructions.Example: ["credit_score", "loan_amount", "annual_income", "interested", "timeline"]How it works:
During calls, AI collects information naturally through conversation
After call ends, AI extracts specified fields from transcript
Advanced: Define custom fields with specific types and validation. Use extraction_fields for simpler configuration.Supports four data types:String Type - Extract free-form text:
Copy
Ask AI
{ "type": "string", "name": "customer_name", "description": "The full name of the customer", "examples": ["John Doe", "Jane Smith"]}
Enum Type - Extract from predefined choices:
Copy
Ask AI
{ "type": "enum", "name": "interest_level", "description": "How interested is the customer", "choices": ["very_interested", "somewhat_interested", "not_interested"]}
Boolean Type - Extract true/false values:
Copy
Ask AI
{ "type": "boolean", "name": "scheduled_callback", "description": "Whether the customer agreed to a callback"}
If both extraction_fields and post_call_analysis_data are provided, post_call_analysis_data takes precedence.
Copy
Ask AI
curl -X POST https://api.teli.ai/v1/agents \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_type": "voice", "agent_name": "Sales Agent", "starting_message": "Hi {{first_name}}, this is Sarah calling about your inquiry.", "prompt": "You are a friendly sales agent. Ask about their needs and budget.", "organization_id": "1762896364768x389173798861431550", "user_id": "1762896366429x599348279945132448", "voice_id": "11labs-Adrian", "language": "en-US" }'
{ "voice_speed": 1.1, "voice_temperature": 0.5, "responsiveness": 1, "max_call_duration_ms": 300000, "voicemail_message": "Hi {{first_name}}, this is a reminder about your appointment."}