curl -X POST https://api.avoca.ai/v1/inbound/email/webhook \ -H "X-Webhook-Secret: YOUR_WEBHOOK_SECRET" \ -H "Content-Type: application/json" \ -d '{ "from": "[email protected]", "to": ["[email protected]"], "subject": "AC not working - Need urgent help", "text": "Hi, my AC stopped working last night and it is very hot. Can someone come today? My address is 123 Main St.", "message_id": "<[email protected]>", "date": "2024-01-20T08:30:00Z", "spam_score": 0.1 }'
This webhook endpoint receives and processes incoming emails sent to your Avoca-powered email addresses. Emails are automatically parsed, categorized, and can trigger AI responses or create tickets.
curl -X POST https://api.avoca.ai/v1/inbound/email/webhook \ -H "X-Webhook-Secret: YOUR_WEBHOOK_SECRET" \ -H "Content-Type: application/json" \ -d '{ "from": "[email protected]", "to": ["[email protected]"], "subject": "AC not working - Need urgent help", "text": "Hi, my AC stopped working last night and it is very hot. Can someone come today? My address is 123 Main St.", "message_id": "<[email protected]>", "date": "2024-01-20T08:30:00Z", "spam_score": 0.1 }'
Configure automatic responses based on email categorization:
Copy
Ask AI
{ "urgent_acknowledgment": { "subject": "Re: {original_subject} - We've Received Your Urgent Request", "body": "We understand this is urgent. Ticket #{ticket_number} has been created. A technician will call you within {estimated_response}." }, "appointment_acknowledgment": { "subject": "Re: {original_subject} - Appointment Request Received", "body": "Thank you for your appointment request. We'll contact you within 2 hours to schedule your service." }, "general_inquiry": { "subject": "Re: {original_subject} - Thank You for Contacting Us", "body": "We've received your message and will respond within 24 hours." }}
curl -X POST https://api.avoca.ai/v1/inbound/email/webhook \ -H "X-Webhook-Secret: YOUR_WEBHOOK_SECRET" \ -H "Content-Type: application/json" \ -d '{ "from": "[email protected]", "to": ["[email protected]"], "subject": "AC not working - Need urgent help", "text": "Hi, my AC stopped working last night and it is very hot. Can someone come today? My address is 123 Main St.", "message_id": "<[email protected]>", "date": "2024-01-20T08:30:00Z", "spam_score": 0.1 }'