Send personalized SMS messages for appointment confirmations, updates, and customer communications. Messages are automatically tracked and associated with customer records.
Request
Recipient phone number in E.164 format or standard US format
Message content (max 1600 characters for concatenated messages)
URLs of images or media to include (MMS)
ServiceTitan customer ID for tracking
Type of message:
transactional - Appointment confirmations, updates
conversational - Two-way conversations
marketing - Promotional messages (requires opt-in)
alert - Urgent notifications
Existing conversation thread ID to continue
Schedule message for later delivery ISO 8601 timestamp for scheduled delivery
Timezone for scheduling (defaults to recipient’s timezone)
Use message templates with variables Template variables to replace
Additional message options Automatically shorten URLs for tracking
Add opt-out instructions (required for marketing)
Response
Unique message identifier
Message status: sent, scheduled, failed
Number of SMS segments used
When message will be sent (if scheduled)
curl -X POST https://api.avoca.ai/v1/outbound/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-ID: YOUR_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"to": "+13105551234",
"message": "Hi John! This is ABC Plumbing confirming your appointment tomorrow at 2-4 PM. Reply Y to confirm or call 555-0123 to reschedule.",
"customer_id": "cust_789",
"message_type": "transactional",
"options": {
"shorten_urls": true
}
}'
{
"data" : {
"message_id" : "msg_sms_456" ,
"status" : "sent" ,
"conversation_id" : "conv_789" ,
"segments" : 1 ,
"scheduled_time" : null ,
"cost" : 1.0
},
"meta" : {
"request_id" : "req_xyz123" ,
"timestamp" : "2024-01-20T10:15:00Z"
}
}
Message Status Webhook
{
"event" : "sms.delivered" ,
"message_id" : "msg_sms_456" ,
"timestamp" : "2024-01-20T10:15:05Z" ,
"data" : {
"status" : "delivered" ,
"delivered_at" : "2024-01-20T10:15:05Z" ,
"segments_sent" : 1 ,
"carrier" : "Verizon" ,
"device_type" : "mobile"
}
}
Message Templates
Pre-approved templates for common scenarios:
{
"appointment_confirmation" : {
"id" : "tmpl_appt_confirm" ,
"message" : "Hi {first_name}! Confirming your {service_type} appointment on {date} at {time}. Reply Y to confirm."
},
"on_the_way" : {
"id" : "tmpl_otw" ,
"message" : "{technician_name} is heading your way! ETA: {eta} minutes. Track: {tracking_link}"
},
"service_complete" : {
"id" : "tmpl_complete" ,
"message" : "Service complete! Total: ${amount}. Pay online: {payment_link}. How was your experience? {survey_link}"
}
}