Skip to main content
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.

Connect the integration

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.

Setting up triggers

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.

Tools & tool steps

The Twilio integration provides 17 operations across seven categories. To find them in the tool step search, type “Twilio” in the search bar.

SMS operations

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 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 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 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.

Voice call operations

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 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.
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.

Call & message management

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.
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.
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.
Fetch details about a specific message using its message SID. Returns the full message body, status, direction, error codes (if any), and pricing information.

Phone number lookup

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.
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.

Transcription services

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.
Retrieve the text and metadata for a completed transcription using its transcription SID. Returns the transcription body, status, duration, and the associated recording SID.

SMS verification

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.
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.

Media handling

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 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.

Use the integration’s API tool step (advanced)

For operations not covered by the pre-built tool steps, use the Twilio API Call tool step to make raw requests to any Twilio REST API endpoint.
1

Add the tool step

In your agent or tool builder, add the Twilio API Call tool step.
2

Select HTTP method

Choose the appropriate HTTP method — most Twilio write operations use POST, and reads use GET.
3

Enter the endpoint

Provide the API path relative to https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/, for example /Messages.json or /Calls/{CallSid}.json.
4

Add request parameters

Provide the request body as form-encoded key-value pairs (Twilio’s REST API uses application/x-www-form-urlencoded, not JSON).
5

Test the request

Run the tool step to confirm it returns the expected response before using it in a live workflow.

Example: sending an SMS via API tool step

{
  "method": "POST",
  "endpoint": "/Messages.json",
  "body": {
    "From": "+15551234567",
    "To": "+15559876543",
    "Body": "Your appointment is confirmed for tomorrow at 10am."
  }
}
For the full endpoint reference, see the Twilio REST API documentation.

Example use cases

Appointment reminders

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.

Frequently asked questions (FAQs)

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.
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.
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.
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.
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.
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.
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.