Skip to main content
POST
/
messaging
/
email
/
send
curl -X POST https://api.avoca.ai/v1/messaging/email/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Workspace-ID: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "appointment_confirmation",
    "to": ["[email protected]"],
    "cc": ["[email protected]"],
    "data": {
      "customer_name": "John Smith",
      "appointment_date": "Monday, January 22, 2024",
      "arrival_window": "9:00 AM - 11:00 AM",
      "technician": "Mike Johnson",
      "service_type": "Water Heater Repair",
      "job_id": "12345",
      "special_instructions": "Gate code: 1234. Dog in backyard - friendly.",
      "dispatch_fee": "$89"
    },
    "tracking": {
      "customer_id": "cust_456"
    }
  }'
{
  "data": {
    "message_id": "email_xyz789",
    "status": "sent",
    "recipients": {
      "accepted": ["[email protected]", "[email protected]"],
      "rejected": []
    },
    "scheduled_time": "2024-01-20T15:30:00Z"
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-20T15:30:00Z"
  }
}
Send branded transactional emails for appointment confirmations, follow-ups, and customer communications. Emails are automatically tracked and associated with customer records.

Request

template
string
required
Email template to use:
  • appointment_confirmation - Booking confirmation
  • appointment_reminder - Upcoming appointment reminder
  • service_complete - Post-service summary
  • estimate_follow_up - Quote follow-up
  • custom - Custom email content
to
array
required
Recipient email addresses (max 5)
cc
array
CC recipients (max 3)
bcc
array
BCC recipients (max 3)
subject
string
Email subject (required for custom template)
data
object
required
Template variables for personalization
attachments
array
File attachments
custom_content
object
For custom template only
tracking
object
Email tracking settings

Response

message_id
string
Unique email message ID
status
string
Delivery status:
  • sent - Successfully sent
  • queued - In send queue
  • failed - Failed to send
recipients
object
Recipient details
scheduled_time
string
When the email was/will be sent
curl -X POST https://api.avoca.ai/v1/messaging/email/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Workspace-ID: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "appointment_confirmation",
    "to": ["[email protected]"],
    "cc": ["[email protected]"],
    "data": {
      "customer_name": "John Smith",
      "appointment_date": "Monday, January 22, 2024",
      "arrival_window": "9:00 AM - 11:00 AM",
      "technician": "Mike Johnson",
      "service_type": "Water Heater Repair",
      "job_id": "12345",
      "special_instructions": "Gate code: 1234. Dog in backyard - friendly.",
      "dispatch_fee": "$89"
    },
    "tracking": {
      "customer_id": "cust_456"
    }
  }'
{
  "data": {
    "message_id": "email_xyz789",
    "status": "sent",
    "recipients": {
      "accepted": ["[email protected]", "[email protected]"],
      "rejected": []
    },
    "scheduled_time": "2024-01-20T15:30:00Z"
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-20T15:30:00Z"
  }
}

Email Templates

Appointment Confirmation

Includes appointment details, technician info, and what to expect

Appointment Reminder

Sent 24 hours before appointment with confirmation/reschedule options

Service Complete

Post-service summary with work performed and invoice

Estimate Follow Up

Follow up on pending estimates with approval link

Custom

Fully customizable email with your own HTML/text content