Customize opt-in and opt-out flows with Advanced Opt-Out

August 21, 2019
Written by
Matan Gal

Advanced Opt-Out

At SIGNAL, the Twilio Customer and Developer conference, we shared a new milestone: at peak volume, more than 13,000 SMS are sent every second over the Twilio platform. 

Whether you’re sending one message or a million messages, there are important regulatory considerations to consider. In the U.S., that includes the Telephone Consumer Privacy Act (TCPA) and the newly updated guidelines from the CTIA (the wireless industry trade association). Compliance becomes even more complex when you consider the global regulations that impact the messages our six million developers send every day. 

Which laws and regulations apply will depend on the particulars of your text messaging campaign. This includes where the texts originate, where recipients of your texts are located, where your company is located, the industry you are in, and the content of your text messages. We always recommend consulting with a lawyer to ensure that you’re in compliance with all regulations – and delivering the best possible experience for your users. 

To help customers address some of these compliance hurdles Twilio handles universal keywords for English on long codes and maintains block lists for your messaging services, by default. 

But why stop there? Customers have shared with us a need to implement custom welcome messages and custom opt-in, opt-out and help keywords based on country or language – and to be able to track conversions without developing a custom solution. 

Starting today, every developer has the ability to do just that with the new Advanced Opt-Out Messaging Service features.

What’s Advanced Opt-Out?

Advanced Opt-Out gives you granular control over the end-to-end compliance experience for your customers and users. Now, you can customize opt-in, opt-out, and help keywords and confirmation messages on a global basis and add per-country or per-language overrides. 

With the ability to customize the compliance journey, it becomes easier to deliver a better customer experience for global customers, extend your brand voice to every interaction, and ensure you remain in compliance of region-specific regulations. 

As a feature of Twilio’s Messaging Services, you can configure a custom compliance flow across your Messaging Service inside the Console, including opt-in, opt-out, help, and overrides. You also gain a new level of visibility into the health of your campaigns with improved tracking. 

Here’s a look into how it all works:


Opt-in is a users’ consent to receive messages from a business. While there are a number of ways users can opt-in to messaging, one common method is via a users’ handset; they might text a number with a keyword to subscribe to updates, a promotional campaign, or continue a support conversation over SMS. 

When a user sends an opt-in keyword, we remove the block list entry for your user’s number – if one exists – and notify them via a confirmation message. With custom opt-in, you have control over the global keywords (up to 20 custom keywords) and the welcome message or confirmation. 

Using this new functionality, you can add campaign-specific keywords that personalize the experience, match your brand, and make it easier for consumers to understand what they’re opting into. 

Sushi Opt In Mockup


Just as critical as an opt-in is the ability for a user to easily revoke permission by any reasonable means. Often, this is as simple as replying STOP, UNSUBSCRIBE, or CANCEL. 

We often find that developers want to customize the opt-out confirmation messages their users receive to reflect their brand tone, campaigns, and users. Much like new opt-in keywords, you can customize up to 20 custom opt-out keywords (in addition to ‘STOP’) and define a custom opt-out message to leave a lasting, positive impression. 

Simply, Advanced Opt-Out gives you complete control over your compliance flows, from the beginning to the end of your messaging relationship. 

Opt-Out Keywords Configuration


Sometimes users need a hand or have questions; with help keywords, you can let your users know who owns the phone number and let them know what actions are available. You can specify these messages and keywords just as you would an opt-in or opt-out configuration. This can be particularly useful if you’re running multiple campaigns or programs from the same number.


Some customers want to provide a different experience in different countries they operate in – and often that includes a need to regionalize compliance language. Sometimes the brand name is different, sometimes there are multiple languages that need to be recognized, and in other cases, local regulation requires a different experience. 

You’re now able to define global overrides for certain languages and for certain countries. Using Advanced Opt-Out, you can reply to a non-English request in the local language, or define specific responses to your users’ messages based on regional requirements. Both country and language overrides allow you to set a different configuration that overrides global defaults. The result: an experience built for global messaging. 


Lastly, we’ve implemented a new tracking parameter to help you better understand how campaigns are performing and how your users are engaging with your Messaging Service. While Twilio maintains a block list for your Messaging Service, we’ve also heard that it’s useful to log these records in your internal system of record, allowing for easy querying and analysis. With this new feature, you can keep track of the most up-to-date information about your users' opt-in and opt-out preferences based on incoming messages. 

When a user sends a message that triggers an opt-out keyword, we’ll include an OptOutType property to the configured webhook URL for your Messaging Service. If there is a match with your Messaging Service Advanced Opt-Out configuration, the property value will be STOP, START, or HELP to indicate how Twilio interpreted the message. Since the incoming webhook request already provides you with the message SID and originating number, you can easily update your subscriber list. 

Getting started with Advanced Opt-Out

The Advanced Opt-Out feature for Messaging Services makes it easy to deliver a positive customer interaction and ensure your use case stays compliant. We’re excited to see how you use this new Messaging Services feature to build more robust and engaging workflows. 

Interested in trying it out? Check out our quick start