curl -X POST https://api.avoca.ai/v1/assistants \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-ID: YOUR_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "Main Receptionist",
"type": "inbound",
"voice": {
"provider": "elevenlabs",
"voiceId": "emily",
"speed": 1.0
},
"language": "en-US",
"model": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.7,
"systemPrompt": "You are a friendly and professional receptionist for ABC Plumbing, a family-owned plumbing company serving Los Angeles for over 30 years. You should be warm, helpful, and focused on scheduling appointments. Always be empathetic to customers plumbing emergencies."
},
"firstMessage": "Thank you for calling ABC Plumbing. This is Emily. How can I help you today?",
"knowledge_base": {
"services": [
"Drain cleaning",
"Water heater repair and installation",
"Leak detection and repair",
"Emergency plumbing",
"Bathroom remodeling",
"Sewer line repair"
],
"service_area": ["Los Angeles", "Santa Monica", "Beverly Hills", "Culver City"],
"business_hours": "Monday through Friday 8am to 6pm, Saturday 9am to 4pm. We offer 24/7 emergency service.",
"pricing": {
"service_call": "$89",
"emergency_fee": "$150 additional for after-hours emergencies",
"estimates": {
"drain_cleaning": "$150-$300",
"water_heater_install": "$1,500-$3,000"
}
},
"faqs": [
{
"question": "Do you offer free estimates?",
"answer": "Yes, we offer free estimates for all non-emergency work."
},
{
"question": "Are you licensed and insured?",
"answer": "Yes, we are fully licensed, bonded, and insured. Our license number is 123456."
}
]
},
"transfer_rules": {
"emergency": {
"keywords": ["flooding", "burst pipe", "gas leak", "sewage backup"],
"action": "transfer_to_oncall",
"message": "This sounds like an emergency. Let me connect you with our on-call plumber right away."
},
"sales": {
"keywords": ["water heater quote", "remodel", "new construction"],
"action": "transfer_to_sales",
"message": "I will connect you with our sales team who can provide a detailed quote."
}
},
"tools": ["schedule_appointment", "check_availability", "create_ticket"],
"booking_enabled": true,
"servicetitan_integration": true,
"webhook_url": "https://your-domain.com/webhooks/avoca",
"advanced_settings": {
"endCallPhrases": ["goodbye", "bye", "have a good day"],
"interruptionThreshold": 0.6,
"silenceTimeout": 10,
"maxCallDuration": 900
}
}'