Connect Twilio to send SMS, make voice calls, and automate communications with AI agents
Twilio is a cloud communications platform that provides APIs for SMS, voice calls, video, and other messaging channels. With the Twilio integration in Relevance AI, your agents can send text messages, make and manage phone calls, look up phone numbers, handle media, and run SMS verification flows.
This integration is built by Relevance AI. For integration-specific support, contact Relevance AI support. For Twilio platform issues, visit Twilio Support.
You authenticate with your Twilio Account SID and Auth Token. Both are available in the Account Info panel on your Twilio Console dashboard.
1
Navigate to Integrations
Go to the Integrations & API Keys page in your Relevance AI dashboard.
2
Select Twilio
Find and click on Twilio from the list of available integrations.
3
Add integration
Click the Add Integration button to begin the connection process.
4
Enter your Account SID
Paste your Twilio Account SID. In the Twilio Console, this is shown under Account Info on the main dashboard (format: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx).
5
Enter your Auth Token
Paste your Twilio Auth Token. This is shown directly below the Account SID in the Account Info panel. Click the eye icon in the Twilio Console to reveal it.
6
Confirm connection
Click Connect. Once authenticated, your Twilio account will appear as connected in your integrations list.
If you manage multiple Twilio projects, you can connect each project separately using its own Account SID and Auth Token. Each connection appears as a distinct entry in your integrations list.
Twilio does not currently support event-based triggers in Relevance AI. To react to inbound SMS or calls, set up a webhook trigger on your agent and configure your Twilio phone number’s webhook URL to point to it.
Send an SMS message from a Twilio phone number to any destination number. Specify the from number (must be a Twilio number on your account), the to number, and the message body. Supports plain text up to 1,600 characters; longer messages are split automatically.
Send MMS
Send an MMS message with one or more media attachments. Provide the from and to numbers, an optional text body, and one or more publicly accessible media URLs. Supported formats include JPEG, PNG, GIF, and MP4.
Schedule SMS
Schedule an SMS to be sent at a future date and time. Specify the message content, the send time in ISO 8601 format, and the messaging service SID to use. Scheduling requires a Twilio Messaging Service with scheduling enabled.
Cancel scheduled message
Cancel a previously scheduled SMS before it is sent. Provide the message SID of the scheduled message. The message must still be in scheduled status — messages already sent cannot be recalled.
Initiate an outbound phone call from a Twilio number. Provide the from and to numbers and a TwiML URL or TwiML string that defines how the call behaves (e.g., playing a message, collecting input, or connecting to another number).
Make TTS call
Make a voice call and read out a text message using Twilio’s text-to-speech engine. Specify the from and to numbers, the text to speak, and optionally the language and voice. No TwiML knowledge required — the integration handles the TwiML generation.
Hang up call
End an in-progress call by updating its status to completed. Provide the call SID. Useful for programmatically terminating calls from within an agent workflow.
Retrieve a list of calls from your Twilio account. Filter by from number, to number, status, or date range. Returns call metadata including SID, direction, duration, status, and timestamps.
Get call
Fetch details about a specific call using its call SID. Returns the call’s status, direction, duration, from/to numbers, price, and any associated recordings.
List messages
Retrieve a list of messages from your Twilio account. Filter by from number, to number, date sent, or message status. Returns message metadata including SID, body, direction, status, and timestamps.
Get message
Fetch details about a specific message using its message SID. Returns the full message body, status, direction, error codes (if any), and pricing information.
Look up carrier and line-type information for any phone number. Returns whether the number is mobile, landline, or VoIP, along with the carrier name and country. Useful for validating numbers before sending SMS or making calls. This operation uses Twilio Lookup and may incur additional Twilio charges.
Fetch available numbers
Search for available Twilio phone numbers to purchase in a given country or area code. Filter by capabilities (SMS, voice, MMS), area code, or locality. Returns a list of available numbers with their capabilities and monthly costs.
Submit a Twilio call recording for transcription. Provide the recording SID. Twilio processes the audio and returns the transcription text once complete. Transcription is an asynchronous operation — poll the Get Transcription step or use a webhook to retrieve the result.
Get transcription
Retrieve the text and metadata for a completed transcription using its transcription SID. Returns the transcription body, status, duration, and the associated recording SID.
Send a one-time passcode (OTP) to a phone number via SMS or voice call using Twilio Verify. Provide the destination number and the channel (sms or call). Requires a Twilio Verify Service SID configured in your Twilio account.
Check verification code
Verify a code entered by the user against the OTP sent by Twilio Verify. Provide the phone number, the code, and the Verify Service SID. Returns approved if the code matches and is still within its validity window.
List all media attachments associated with a specific MMS message. Provide the message SID. Returns media SIDs, content types, and URLs for each attachment.
Delete media
Delete a media attachment from your Twilio account using its media SID and parent message SID. Deleted media is no longer accessible via its Twilio URL. This action is permanent.
Send automated SMS reminders to customers before scheduled appointments. Reduce no-shows by triggering reminder messages 24 hours and 1 hour before the appointment time.
Two-factor authentication
Add SMS-based two-factor authentication to your workflows using Twilio Verify. Send a one-time code and verify it before granting access or confirming high-value actions.
Customer support automation
Automatically respond to inbound SMS inquiries using an AI agent. Route complex issues to human agents while resolving common questions instantly.
Call center automation
Trigger outbound voice calls for order confirmations, collections follow-ups, or survey outreach. Use text-to-speech to deliver dynamic messages without pre-recording audio.
Lead qualification by SMS
Qualify inbound leads via SMS conversation. An agent can ask qualifying questions, score responses, and pass qualified leads to your CRM automatically.
Delivery and logistics alerts
Send real-time SMS notifications for shipment status updates, delivery confirmations, or exception alerts — triggered automatically as order status changes in your systems.
Both are displayed in the Account Info panel on your Twilio Console dashboard at console.twilio.com. Click the eye icon next to the Auth Token to reveal it. Keep your Auth Token secret — anyone with it can make API calls on your behalf.
Do I need a Twilio phone number to use this integration?
For sending SMS or making outbound calls, yes — you need at least one Twilio phone number on your account. You can purchase numbers in the Twilio Console under Phone Numbers > Manage > Buy a number. For Twilio Verify (SMS verification), you need a Verify Service instead of a regular phone number.
Can I connect multiple Twilio accounts?
Yes. Each Twilio project has its own Account SID and Auth Token. Add a separate integration for each project, and each will appear as a distinct connected account in your integrations list.
Why is my SMS not being delivered?
Common causes include: the destination number is a landline (not SMS-capable), the from number does not have SMS capability enabled, your Twilio account balance is insufficient, or the message was filtered as spam. Check the message status and error code using the Get Message tool step, then refer to the Twilio error code reference for resolution steps.
Are there rate limits on Twilio API calls?
Twilio enforces rate limits per account and per phone number. The limits vary by Twilio account type and the specific API. If your workflow sends a high volume of messages, consider using a Twilio Messaging Service to distribute load across multiple numbers. Consult Twilio’s rate limit documentation for specifics.
Can I receive inbound SMS or calls?
Inbound messages and calls are handled via webhooks. Configure your Twilio phone number’s inbound webhook URL to point to a webhook trigger on your Relevance AI agent. Your agent will then be activated each time a message or call arrives.
How do I use Twilio Verify for SMS verification?
First, create a Verify Service in your Twilio Console under Verify > Services. Note the Service SID. Then use the Send verification code tool step with your Verify Service SID to send an OTP, and the Check verification code tool step to validate what the user enters.
Need help?
Contact our support team for assistance with the Twilio integration.
Explore more integrations
Discover other integrations to enhance your workflows.