This guide discusses SMS filtering that can affect delivery of your Twilio Programmable SMS messages. This is done to enforce Twilio’s Messaging Policy or Acceptable Use Policy, or to comply with regulations and wireless carriers’ messaging policies.
Filtering of your outgoing Twilio Programmable SMS messages can vary somewhat between carriers and countries. We have compiled the following information to help you understand why a message might have been filtered.
- Why do message filtering systems exist?
- How does message filtering work?
- How do I know if my messages are being filtered?
- How do I prevent my messages from being filtered?
- Why am I charged for filtered messages?
- I think my messages are being filtered by mistake. What can I do?
- United States and Canada SMS filtering
Why do message filtering systems exist?
Message filtering systems exist for two reasons:
1. Protecting mobile subscribers from unwanted messaging such as spam, fraud, or abuse
Unwanted messaging is a huge issue in the messaging industry; unwanted messages can result in complaints, fines, or outright disconnection by carriers. Mobile users who receive lots of spam or other unwanted messages may decide to start opting out of or ignoring all messages from businesses, even legitimate ones who follow all rules and best practices.
For these reasons, it is in everyone’s interest – Twilio, wireless carriers, regulators, and most importantly our customers – to ensure that unwanted messaging is not allowed over Twilio’s carrier connections.
2. Enforcing rules or regulations about what types of messaging are allowed to that country or mobile network
Depending on the country, laws or regulations may put restrictions on certain types of messaging, or even forbid certain things altogether. Messages which violate these rules may be subject to filtering.
These rules and regulations may also change over time. In the U.S. and Canada, application-to-person (A2P) type messaging was historically not allowed to be sent using local 10-digit long code phone numbers. In 2021, however, Twilio and U.S. carriers are launching the A2P 10DLC solution which permits A2P messaging via long code to United States recipients.
For more information about U.S./Canada message filtering, see SMS Carrier Filtering in the United States and Canada. For information about the upcoming A2P 10DLC changes by U.S. carriers, see What is A2P 10DLC?
How does message filtering work?
Message filtering can range from a simple static list of prohibited terms, to advanced machine learning systems that constantly adapt based on the messages passing through them.
Twilio uses filtering to target messaging that is in violation of our Messaging Policy and Acceptable Use Policy (AUP). Twilio’s goal is to protect mobile users from fraud, spam, and other forms of unwanted messaging, as well as to comply with rules and regulations imposed by carriers and regulators.
In addition, carriers filter messages to enforce their rules, as well as to prevent spam and other forms of abuse.
How do I know if my messages are being filtered?
When we know that filtering has taken place, you will see your messages with the “Undelivered” status and Error 30007.
It is not always possible to know for certain when a message has been filtered by a carrier. In rare cases, carriers may falsely report filtered messages as “delivered” to prevent spammers from reverse engineering filtering systems.
If Twilio knows that a message has been filtered, we will pass this information to you in two ways:
- By updating the message status to Undelivered, and flagging error code 30007 in your Programmable SMS Logs.
- Sending a request to your status callback URL, if you provided one when you sent the message.
How do I prevent my messages from being filtered?
In short, follow the guidelines in Twilio’s AUP and Messaging Policy and avoid sending spam or fraudulent traffic. Keep your Twilio account credentials secure to avoid account takeovers by malicious actors. In addition, check Twilio’s SMS Guidelines for the country you are sending messages to. Twilio keeps these pages up to date with best practices for each country.
We have published detailed rules and best practices to avoid message filtering here:
How do I prevent my Twilio messages from being filtered (blocked)?
Why am I charged for filtered messages?
Messages are still billed when they are filtered, whether they are filtered by Twilio's internal spam filtering system or by a downstream carrier.
By proactively detecting and preventing messages that violate our policies and those of carriers, Twilio is able to ensure trusted communications and prevent disruptions to service as a result of carrier concerns. This ultimately allows us to offer better quality to our customers. Twilio also gains more insight into filtering causes, and can empower you with better information to improve your messaging and eliminate filtering.
However, running an effective filtering system also creates operational costs. For example, our Compliance team works with customers to address and eliminate causes of unwanted messaging.
In the case of messages filtered by carriers, Twilio has also incurred the cost of sending the message to the carrier prior to the message being filtered.
I think my messages are being filtered by mistake. What can I do?
Twilio works hard to ensure that customers do not see filtering on legitimate messaging that follows all applicable rules. However, no automatic system is perfect. If you have thoroughly reviewed our Messaging Policy and tips for avoiding filtering, and you believe your messages are compliant with Twilio and carrier policies, please collect 3 or more examples of Message SIDs that have the “undelivered” status with error 30007, and then contact our Support team. We can help review your messaging and determine if an error was made, and put you in touch with our Compliance team if needed.
United States and Canada SMS filtering
The landscape of wireless carrier filtering in the U.S. and Canada is changing rapidly. In order to better answer customers' questions, we have created a separate guide. For full details, please see SMS Carrier Filtering in the United States and Canada.
This overview should help to give you a better understanding of how wireless carrier filtering works for Twilio Programmable SMS messages. For more information, please see the following resources: