SMS Messaging
Send text messages and multimedia content through your AI assistants using Twilio or Telnyx
Overview
The messaging system allows your AI assistants to send SMS and MMS messages to customers and users. The platform supports both Twilio and Telnyx as telephony providers, automatically selecting the appropriate provider based on your assistant configuration.Key Features
Multi-Provider Support
Seamlessly switch between Twilio and Telnyx providers per assistant
MMS Support
Send images, documents, and other media files alongside text messages
Assistant-Based Routing
Messages are automatically routed through the correct provider based on the sending assistant
E.164 Validation
Automatic phone number format validation ensures reliable delivery
How It Works
The messaging system follows a simple but powerful flow:- Assistant Lookup: The system identifies which assistant owns the
from_phone_number
- Provider Selection: Automatically determines whether to use Twilio or Telnyx based on the assistant’s configuration
- Message Delivery: Sends the message through the appropriate provider’s API
- Response: Returns confirmation with message ID and provider information
Provider Configuration
Per-Assistant Providers
Each assistant can be configured with different telephony providers:Provider Priority
When an assistant has both Telnyx and Twilio configured:- Telnyx is used by default (typically lower cost)
- Twilio is used as fallback if Telnyx is unavailable
- You can override this behavior per assistant
Supported Message Types
SMS (Text Messages)
Send plain text messages up to 1600 characters:MMS (Multimedia Messages)
Send images, documents, and other media files:Use Cases
Customer Service
Follow-up Messages
Follow-up Messages
Send follow-up messages after customer service calls with links to resources, ticket numbers, or additional information.
Appointment Reminders
Appointment Reminders
Automated appointment reminders with confirmation options and rescheduling links.
Order Updates
Order Updates
Shipping notifications, delivery confirmations, and order status updates.
Support Documentation
Support Documentation
Share troubleshooting guides, user manuals, and how-to videos via MMS.
Sales & Marketing
Lead Follow-up
Lead Follow-up
Personalized follow-up messages after sales calls with proposals and pricing information.
Event Invitations
Event Invitations
Send event invitations, webinar links, and calendar attachments.
Product Updates
Product Updates
Share product announcements, feature updates, and release notes.
Promotional Content
Promotional Content
Special offers, discount codes, and promotional materials (with proper consent).
Healthcare
Appointment Confirmations
Appointment Confirmations
HIPAA-compliant appointment confirmations and pre-visit instructions.
Medication Reminders
Medication Reminders
Automated medication reminders and refill notifications.
Test Results
Test Results
Secure delivery of test results and lab reports via encrypted links.
Health Tips
Health Tips
Personalized health tips and wellness recommendations.
Integration Patterns
Post-Call Follow-up
Automatically send follow-up messages after calls end:Scheduled Messaging
Set up scheduled messaging workflows:Interactive Workflows
Create two-way messaging workflows:Best Practices
Compliance & Regulations
Regulatory Compliance: Always ensure compliance with local regulations like TCPA (US), GDPR (EU), and CASL (Canada) when sending SMS messages.
- Opt-in Required: Only send messages to users who have explicitly opted in
- Opt-out Mechanism: Always provide a way for users to unsubscribe (e.g., “Reply STOP to opt out”)
- Business Hours: Respect time zones and send messages during appropriate hours
- Content Guidelines: Follow carrier guidelines for message content and frequency
Message Optimization
- Keep It Concise: SMS works best with short, clear messages
- Include CTAs: Provide clear next steps or calls to action
- Personalization: Use customer names and relevant context
- Timing: Send messages at appropriate times based on user preferences
Error Handling
Always implement proper error handling:Rate Limiting
Be mindful of rate limits:- Twilio: Up to 1 message per second by default (varies by account)
- Telnyx: Varies by account configuration
- Best Practice: Implement queuing for high-volume scenarios
Getting Started
1
Configure Your Assistant
Set up your assistant with Twilio or Telnyx credentials in the dashboard.
2
Assign Phone Numbers
Assign phone numbers to your assistants that will be used as sender numbers.
3
Send Your First SMS
Use the
/sms/send
endpoint to send your first message.4
Handle Responses
Implement proper error handling and response processing in your application.