Mautic SMS with Twilio

Adding SMS to Mautic campaigns through the Twilio plugin, with the credentials, Messaging Service, webhook and frequency rule decisions that determine whether texts reach the right contacts.

On this page

How Mautic SMS with Twilio works in campaigns

If your team already runs self-hosted Mautic and wants text messages inside existing campaigns, Twilio is the place to start. It is the first and default SMS service Mautic implements. You turn on the Twilio plugin and enter your Twilio account SID and auth token, and from that point SMS becomes a channel campaigns can use alongside email. The question this page answers is how to set that up safely, because a text message reaches a phone directly and the mistakes are harder to reverse than a misfired email. The credentials are the first control: treat the account SID and auth token as production secrets, decide who can edit the plugin settings in Mautic, and confirm which Twilio account and subaccount the messages will be billed to before anything goes live.

The integration does not send from a single number chosen ad hoc. Mautic's Twilio setup creates a Twilio Messaging Service that uses your phone number as a sender, and it expects Send a Webhook to be selected under the integration settings so Twilio can report delivery status back to Mautic. Your team should verify that the webhook URL resolves to the public address of your Mautic instance, that the instance is reachable from Twilio's side, and that someone owns the Messaging Service configuration in the Twilio console. Read the Twilio plugin documentation before you configure this, because the setup steps and sender rules are defined there and may change between Mautic releases. Check the sender ID requirements too, particularly if you plan to use an alphanumeric sender ID, since country and carrier rules can restrict it.

Frequency rules apply to text messages as well as email. Mautic lets you set frequency rules globally for the email and SMS channels and override them for individual contacts, so a campaign that texts a contact more often than your policy allows will be throttled by the same mechanism that controls email volume. Decide the SMS frequency limits before you build the first campaign, confirm with your compliance or marketing lead how those limits map to the consent you hold for each contact, and test a campaign with a small internal segment to confirm that the limits and the contact-level overrides behave as you expect. The Mautic frequency rules documentation is the next read for the exact configuration options.

What a Twilio SMS integration needs before setup

Mautic SMS through Twilio depends on three things being in place before anyone opens the plugin: a supported Mautic host, a Twilio account that can legally send to your audience, and a public HTTPS address that Twilio can call back. Each card below is one item to settle first, because a gap in any of them shows up later as a failed send or a webhook that never fires.

Supported Mautic and PHP versions

Confirm which Mautic release line you will run before you plan the SMS work. Mautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5, and MySQL 5.7 or higher with InnoDB or MariaDB 10.2 or higher. Check the support windows for your chosen line, since the Twilio plugin is only as current as the release it runs on. Ask your Mautic administrator which version is in production and whether it is still receiving security support.

Mautic requirements

Dedicated or VPS hosting

Mautic should not run on shared hosting. The project recommends a VPS or dedicated server, and that matters for SMS because campaign sends, cron jobs and webhook handling all run on the same host. Shared plans often limit cron access, background processes and outbound connections, which can stop campaigns from triggering text messages. Confirm that you can schedule the cron jobs Mautic needs and that the host can make outbound HTTPS calls to Twilio's API.

Twilio account SID and auth token

The plugin needs your Twilio account SID and auth token. Create or select the account that will own the messaging traffic, and decide who holds the credentials. The auth token grants full API access to that account, so store it in your secrets manager rather than in a shared document, and plan a rotation procedure. Ask Twilio which account type you need for production sending, since trial accounts restrict recipients.

Sender identity allowed in each country

Pick the sender you will use, either a phone number attached to a Messaging Service or an alphanumeric sender ID, and confirm it is permitted for every destination country in your audience. Sender ID rules differ by country, and some markets require registration or a pre-approved sender before messages deliver. Review the alphanumeric sender ID requirements in Mautic's Twilio documentation, then confirm current registration rules directly with Twilio for each country you plan to message.

Mautic Twilio docs

Public HTTPS address for webhooks

Twilio delivers status callbacks to a webhook URL, and the Twilio setup in Mautic relies on that path. The address must be a public HTTPS endpoint on your Mautic domain with a valid certificate, reachable from the internet and not blocked by a VPN-only or IP-restricted firewall. Agree the hostname with your network team before setup, and confirm that your reverse proxy forwards the request to Mautic unchanged.

Configuring the Twilio plugin in Mautic

This sequence connects Mautic to a Twilio account so that text messages can leave a campaign, with each step closed by a check that confirms the connection works before any real contact receives a message.

  1. Confirm the Twilio account and credentials

    Before touching Mautic, the administrator confirms which Twilio account will send messages, who owns it, and where the account SID and auth token are stored. Those two values come from the Twilio console and authenticate every request Mautic makes. Store them in your secrets process rather than in a shared document, and confirm that the account has a sending number or sender ID that your country and carrier rules allow. The check here is a written note listing the account owner, the sending identity and the person who can rotate the auth token.

  2. Activate the Twilio plugin in Mautic

    A Mautic administrator opens the plugin area, activates the Twilio plugin, and confirms it appears among the enabled integrations. Twilio is the first and default SMS service Mautic implements, so this is the entry point for text messaging. The check is that the plugin shows as enabled and its configuration page loads without errors, which means the instance is ready to accept the credentials in the next step.

  3. Enter the account SID and auth token

    In the Twilio plugin settings, the administrator enters the account SID and auth token, then saves the integration. Mautic uses these values to call the Twilio API on behalf of the account. Entering the wrong account or an outdated token is a common cause of failed sends later, so confirm that the SID matches the account the team intended. The check is a saved configuration with no credential error message after saving, and a corresponding account visible in the Twilio console.

  4. Let Mautic create the Messaging Service

    Mautic creates a Twilio Messaging Service that uses the configured phone number as its sender. The administrator should not create the service by hand unless the team has a reason to, because a mismatch between the service and the sender number is harder to diagnose later. Open the Twilio console and find the Messaging Service that Mautic created, then confirm that it lists the expected phone number as a sender. Note the service name so that support and audit staff can match Mautic activity to Twilio records.

  5. Select Send a Webhook in integration settings

    Under the integration settings, the administrator selects Send a Webhook so that Twilio reports delivery status back to Mautic. Without this callback, Mautic may show a message as sent without ever learning whether it was delivered, failed or was rejected. Save the settings and confirm the webhook option is persisted after a page reload. Check that the callback address Mautic uses is reachable from Twilio, because a webhook that cannot be reached produces no status updates.

  6. Send a test text to an internal number

    The administrator sends one test text from Mautic to a phone number owned by the team, not to a contact in a live list. The test confirms that credentials, sender and outbound routing all work together. Use a number that someone on the team can answer and confirm receipt on the handset. Keep the test to a single message so that any configuration fault does not reach customers and the team can trace the outcome cleanly.

  7. Verify the delivery status in Mautic

    Back in Mautic, the administrator checks that the test message appears in the contact's activity with a delivery status that matches what Twilio reports. Compare the Mautic record with the message log in the Twilio console, looking for the same message identifier and final status. If the handset received the text but Mautic shows no status, return to the webhook step and check reachability. The sequence is complete when the test message, its status and the Twilio record all agree.

Choosing between phone numbers and alphanumeric sender IDs

Mautic's Twilio setup works with a phone number as the sender. The Twilio plugin creates a Messaging Service that uses the phone number as its sender, and Send a Webhook is selected under the integration settings so delivery status and inbound events can return to Mautic. This option keeps a two-way channel open, since recipients can reply to a number that belongs to your organization.

  • Replies: Recipients can answer the message, so you need a plan for who reads replies and how opt-out keywords are handled.
  • Delivery status: The webhook path is what lets Mautic receive status updates, so confirm it is reachable from Twilio before launch.
  • Sender pool: A Messaging Service can hold more than one number, which affects how volume is spread across senders.
  • Number type: Confirm with Twilio which number types are available and permitted for your destination countries.
  • Recognition: Recipients see a number, not a name, so the message content needs to identify your organization.

Confirm the number type, webhook reachability and reply ownership with your team before you select this option.

How frequency rules apply to text messages

Decide the global SMS cap before the first text campaign is built. Mautic lets you set frequency rules globally for the email and SMS channels, so the SMS limit applies across every campaign that reaches a contact by text, not only the one you are currently editing. Set it low enough that a contact in several campaigns cannot receive a burst of messages in a short period, and write down the reasoning so campaign owners know why the number exists. Confirm in your own instance how the rule counts messages and over what period, because that determines how many campaigns can overlap before a contact is held back. The cap is the default, so it should be the number you would defend to a customer who complains about texts.

Use per-contact overrides sparingly and for a named reason. An override can raise or lower the limit for an individual contact, which suits a small group such as customers in an active service incident who must receive operational texts, or a sensitive segment such as patients or account holders where you want fewer marketing messages than the global default. Every override is a hand-made exception that someone must review, so keep a short list of which segments may receive one, who approves it, and how it is removed. Overrides should be reviewed on a schedule, because a forgotten override quietly bypasses the control for that contact. Test one override in a non-production instance before relying on it for a live segment.

Frequency rules interact with campaign timing. Campaign triggers and segment updates run from cron jobs, and the Mautic documentation says those jobs should be staggered, so a batch of contacts may be evaluated for a campaign at the same time the cap is being checked. Map the send times of every SMS campaign against the cron schedule and ask your team to confirm how deferred or held messages are reflected in the campaign timeline. Frequency rules are a marketing control only. They do not replace consent records, so a contact who has not opted in to text messages must be excluded by consent and preference settings regardless of how few messages you send.

How a campaign text travels from Mautic to the handset

The journey starts when a campaign action in Mautic queues a text for a contact. Mautic hands the message to Twilio using the account SID and auth token held on the Mautic server, and Twilio's Messaging Service selects the sender and routes the message to the carrier network and then the handset. Delivery status comes back to the public webhook endpoint on your Mautic instance, so that endpoint must be reachable from Twilio. Check the webhook path, the sender configuration and the status updates on the contact record.

Message path from a Mautic campaign to the handset and back through the status webhook.

Mapping contact fields and channel settings to SMS

This table shows each Mautic and Twilio setting that decides whether a text reaches the right contact from the right sender. Read each row as a checkpoint: the mapping on the left controls the behavior described in the middle, and the confirmation column lists what your team should verify with Twilio or in your own instance before a campaign goes live.

SettingWhat it controlsWhat to confirm before launch
Contact phone fieldWhich contact field Mautic reads as the mobile number for SMS sendsWhich field stores the number, whether it is populated for the contacts you target, and whether imports write it in the format Twilio expects
Phone number formatWhether Twilio accepts the destination number when a campaign sendsThe international format your Twilio account requires and whether your import or form normalizes numbers to it
SMS consent or preferenceWhether a contact is eligible to receive text messages at allWhich field or channel preference records SMS consent, who sets it, and how opt-outs written in Twilio reach the Mautic contact record
Global SMS frequency ruleHow often any contact can receive SMS across all campaignsThe default limit set for the SMS channel and whether it matches the frequency your marketing and compliance teams agreed
Per-contact frequency overrideReplaces the global SMS limit for specific contactsWho may apply overrides, how overrides are recorded, and whether they can lift limits for contacts who have not consented
Twilio sender (phone number)The number that appears as the sender on messages sent through the Messaging ServiceThat the number is SMS-capable in your Twilio account and the country where you send
Alphanumeric sender IDA brand name shown instead of a number on supported destinationsWhether the destination countries accept alphanumeric IDs and the registration steps Twilio requires for each country
Messaging ServiceGroups senders and routes sends, and is where Mautic's setup attaches the sender and webhookThe Messaging Service SID in use, which senders it contains, and whether the status webhook points to the instance you operate

Protecting the Twilio credentials and webhook endpoint

The Twilio account SID and auth token give anyone who holds them the ability to send messages from your account, and the webhook is a public entry point back into Mautic. The controls below cover where the secrets live, who can see them, how they rotate, and how test traffic stays apart from production.

Keep the auth token out of shared documents

Store the Twilio auth token in a secrets manager or a restricted password vault, and enter it only into the Twilio plugin settings in Mautic. Do not paste it into tickets, runbooks, chat threads or configuration files committed to version control. Check whether your deployment puts the value in environment-driven configuration so it is not written in plain text in a shared location. Ask your team to confirm where the token is stored and who holds a copy.

Twilio plugin docs

Limit who can view plugin settings

Plugin configuration is visible to any Mautic user whose role allows access to the Plugins area, so review the role assignments that reach it. Give SMS administration to a small named group, keep campaign builders on roles that cannot open integration credentials, and remove accounts for people who have left. Confirm which permissions your Mautic version exposes for plugin configuration, because role names and permission sets change between releases.

Rotate credentials and update Mautic together

When a staff member with access leaves, or when a token may have been exposed, rotate the auth token in Twilio and then update the plugin settings in Mautic in the same change window. Sending will fail between the two steps, so schedule the change around active SMS campaigns. Record the rotation date and owner. Ask Twilio whether API keys or subaccount credentials can replace the primary auth token for Mautic, and confirm the options available on your account.

Restrict the webhook to HTTPS

Twilio delivery status callbacks reach Mautic at a public URL, so the Mautic host must be served over HTTPS with a valid certificate before the webhook is configured. Confirm the Send a Webhook setting points to the HTTPS address of your instance and not to a plain HTTP or temporary hostname. Restrict the endpoint at the proxy where your platform allows it, and check Mautic's logs for rejected or unexpected requests after go-live.

Separate test and production Twilio accounts

Use a separate Twilio account or subaccount for testing so that test messages, webhook callbacks and any misconfiguration never draw on production credits or reach real contacts. Keep the test credentials in a non-production Mautic instance or a clearly labelled test plugin configuration. Confirm with Twilio whether subaccounts suit your billing and access model and whether test sending is limited on your account type.

Why SMS campaigns fail after setup

This table lists the failures teams most often hit after connecting Mautic to Twilio, with the cause and fix for each. Read it as a checklist to run through when texts do not send, reach the wrong contacts, or fire late. Most failures trace back to credentials, network reachability, sender rules, contact data, frequency settings or the cron schedule.

FailureLikely causeFix
Plugin reports authentication errorsWrong Twilio account SID or auth token entered, or a token rotated in the Twilio console without updating MauticRe-enter the account SID and auth token in the Twilio plugin settings, then send a test text to confirm the connection
Delivery status never updatesTwilio cannot reach the webhook URL because a firewall, reverse proxy or domain setting blocks inbound requestsConfirm the instance is publicly reachable on the webhook path, check proxy forwarding and HTTPS settings, and review Twilio's request logs for failed callbacks
Messages rejected for certain countriesAlphanumeric sender ID is not permitted for the destination country, so the carrier or Twilio blocks the sendCheck the sender ID rules for each destination country before the campaign, and use a phone number sender where the country requires it
Texts sent to some contacts but not othersContact records have missing, empty or badly formatted phone numbers that cannot be sent toClean phone fields before import, store numbers in a consistent international format, and review segment filters for empty values
Contacts receive fewer texts than expectedGlobal or per-contact frequency rules for SMS suppress sends that fall inside the configured windowReview the global SMS frequency rule, check per-contact overrides, and confirm the intended cadence with the marketing owner
Campaign actions never runCron jobs for campaign updates and triggers are not running, or are scheduled at the same time and conflictConfirm the cron entries are installed for the web user, stagger the jobs as the Mautic documentation describes, and check job logs after each run
Segment membership looks staleSegment update cron job has stopped or runs too rarely for the campaign timingVerify the segment update job runs on schedule and align its frequency with the timing of the SMS campaign steps

Questions buyers ask before adding SMS to Mautic

What drives the cost of adding SMS to Mautic with Twilio?

The cost has two sides. Twilio bills you directly for message traffic and phone numbers, and those charges depend on how many texts you send, which countries they reach and which sender types you use. Mautic itself is free software, so the remaining cost is labor: the time your team or a partner spends on configuration, campaign design, consent logic and testing. Ask any quote to separate one-time work (plugin setup, webhook configuration, test campaigns) from recurring work (monitoring, template changes, plugin upgrades) and to state which Twilio charges are excluded. Confirm current Twilio rates on Twilio's own pricing pages, since DeployOpen does not publish a price list and Mautic's documentation does not give message prices.

How long does it take to set up SMS in Mautic?

Duration depends on scope more than on the plugin itself. A single sender number, one country and a few campaigns is a much smaller job than multiple countries, several Messaging Services, alphanumeric sender IDs and a consent model that must be reviewed by legal. The Twilio plugin activation and credential entry are short steps; the time goes into the sender design, the webhook endpoint, frequency rules and end-to-end testing with real devices. Your written scope should list the countries, sender types and campaigns in scope so the timeline can be tied to them.

What does our team need to provide before setup starts?

Four things are needed before work begins:

  • Twilio account access with permission to create or manage Messaging Services and phone numbers, and the account SID and auth token handled through an approved secret store
  • The phone numbers or sender IDs you intend to use, and confirmation of which countries they must reach
  • A written consent and opt-out policy that states which contacts may receive texts and how opt-outs are recorded
  • A public HTTPS endpoint for the Twilio webhook, reachable from Twilio and served by your Mautic instance

Missing any of these usually delays testing more than configuration does.

Can our own team set up Twilio SMS in Mautic without a partner?

Yes, if your team already runs Mautic in production and has someone who can manage Twilio accounts, DNS and HTTPS certificates. The Mautic documentation describes the Twilio plugin setup and the Messaging Service and webhook settings, so the steps are documented. What teams often underestimate is the rule design: frequency limits for text messages, how contacts who reply STOP are handled, and how campaigns avoid sending texts to people without recorded consent. A partner is most useful when those rules need to be designed and tested across several campaigns, or when the team has no spare capacity to test properly.

How do frequency rules apply to text messages in Mautic?

Mautic can set frequency rules globally for the email and SMS channels and override them for individual contacts. In practice, this means you decide a global ceiling for how often a contact may receive texts, then adjust it for specific contacts where needed. Set the rule before the first live campaign, because a campaign that sends several texts in a short window can breach what your consent policy promised. Test the rule with a sample contact that is enrolled in two campaigns at once, and document who may change overrides.

What does a DeployOpen engagement for Mautic SMS deliver?

DeployOpen plans, implements and documents the SMS setup inside your own infrastructure as a fixed-scope engagement. The written scope usually covers the Twilio plugin configuration, Messaging Service and sender design, webhook endpoint setup, frequency rules, test campaigns on real devices and a handover document for your operators. Deliverables and timelines are agreed in writing before work starts, and a quote follows from that scope. Ongoing support and upgrades are available as a retainer if you want them after handover.

Do alphanumeric sender IDs work everywhere in Mautic's Twilio setup?

Not necessarily. The Mautic Twilio documentation covers alphanumeric sender ID requirements, and those requirements vary by country, so you should not assume a name in the From field will be accepted in every market you target. Before you commit to a sender type, check the requirements in the Twilio documentation for each destination country and confirm them with Twilio. Also plan for what recipients see when they reply, because a sender ID that cannot receive replies changes how opt-outs must be handled.

Testing SMS before a live campaign

Before any Mautic SMS campaign reaches a real segment, the team should run a staged test plan that checks delivery, status callbacks, frequency behavior and the cron-driven trigger path in that order. Start by sending messages from a campaign to a short list of internal test numbers that belong to people on the team and who have agreed to receive them. Confirm that the message arrives, that the sender ID displays the way you expect, and that the Twilio account shows the message in its logs. If you rely on an alphanumeric sender ID in a country where it is supported, test that specific sender on each carrier you expect to reach, because a sender that works on one network can be rejected or replaced on another.

Next, confirm that delivery status updates come back through the webhook that the Twilio setup configures. Check that Mautic records the sent and delivered states against the test contact, and that failed or undelivered messages are logged with a reason you can act on. Then test frequency rules with a single test contact. Set a low limit for the SMS channel, send enough campaign steps to exceed it, and verify that the contact receives only the allowed number of texts and that a per-contact override behaves as the documentation describes. Record the exact settings you tested, because a global rule and a contact override can interact in ways that are easy to miss. Finally, run one small campaign through the cron-driven trigger path, not a manual send, and confirm that the scheduled jobs pick up contacts on time before you enable the campaign for a full segment.

Document every result in a test log with the date, the Mautic and plugin versions, the test numbers used, the outcome and any corrective action. Keep a rollback path ready: a documented way to unpublish the campaign, pause the Twilio integration, and stop cron-driven triggers from adding new contacts, with a named person who can do it quickly. Confirm with your own compliance and legal reviewers which consent records and opt-out wording you must keep before any live send, since those requirements sit outside the test plan.

How DeployOpen scopes and delivers Mautic SMS with Twilio

DeployOpen treats Mautic SMS with Twilio as a scoped piece of work inside your own Mautic instance, not a generic plugin install. We agree the Twilio account structure, sender approach, frequency rules and campaign use cases in writing first, then build, test and hand over the configuration so your team can run it.

How we scope

  • Confirm which Mautic release line and hosting your instance runs on before any Twilio settings are planned
  • Agree which campaigns will send text messages and which contact segments and consent records they depend on
  • Document the Twilio account, Messaging Service and sender ID approach, including whether alphanumeric sender IDs are in use
  • Define global SMS frequency rules and any per-contact overrides, written into the agreed scope

How we build

  • Activate and configure the Twilio plugin with the account SID and auth token stored under your secrets controls
  • Create the Messaging Service and sender configuration, then confirm the webhook settings reach your Mautic instance
  • Test sending, delivery status handling and frequency rule behavior with test contacts before any live campaign runs
  • Verify that campaign triggers and cron-driven updates run on the schedule the agreed design requires

How we hand over

  • Deliver written documentation of the Twilio configuration, sender setup, webhook endpoints and frequency rule settings
  • Walk your administrators through the campaign steps, credential rotation tasks and where sending activity is reviewed
  • Record open items, such as sender registration tasks you must complete with Twilio, as named owner actions
  • Provide a handover checklist so your team can repeat or audit the setup without DeployOpen

How we support

  • Offer ongoing support, upgrades and continuous testing for the Twilio integration as a retainer
  • Review the integration after each Mautic upgrade that affects campaigns, plugins or the cron schedule
  • Retest the SMS path and frequency rules after changes to Twilio credentials, sender IDs or webhook endpoints
  • Engagements are fixed-scope, so any additional SMS use cases are agreed in writing before work starts

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.