Skip to contentSkip to navigationSkip to topbar
On this page

SMS Foundations


Welcome to "SMS Foundations," the first milestone in the Programmable Messaging API Onboarding Guide. This milestone is designed for anyone that would like to understand the fundamentals of how Twilio messaging works and what to expect during the onboarding process.

By the end of this milestone, you'll be able to:

  • Understand the most important concepts pertaining to how messaging works.
  • Learn about the basics of starting and maintaining your Twilio account.
  • Identify your SMS use case so that you can make decisions that best suit your program needs.
  • Review the steps in the process of building your SMS application.

Step 1: Understand how Twilio Messaging works

step-1-understand-how-twilio-messaging-works page anchor

Business messaging, or application-to-person (A2P) messaging is different from person-to-person text messaging - like the kind that you might send to a friend. While both involve a phone number provisioned from a carrier, and transmission over carrier infrastructure, the regulations, sending mechanisms, and capabilities differ. All messages sent using Twilio are considered A2P messages and this guide will help ensure your messaging application is built for the maximum deliverability of every message.

Using Twilio's messaging capabilities, you will be able to:

Twilio also solves common complexities that arise for business scale messaging programmatically.

  • Messaging Services: A Messaging Service is a container allowing companies to group global senders (long codes, short codes, toll-free, alpha senders, and WhatsApp) and enable intelligent sending. A Messaging Service has settings that can automate sender selection, define integrations between the application and Twilio, configure content & conversion logic, and handle compliance regulations. A default Messaging Service is automatically generated for your Account upon creation.
  • Inbound Webhooks: When your team begins to send messages at scale, the inbound webhook feature allows you to handle responses to those messages programmatically. Check out Twilio Studio, Conversations, and TwiML to see how you can support replies, logic menus, and multiparty conversations, at scale.
  • Link shortening: Whereas free or public link shorteners can cause deliverability and filtering challenges, Twilio's link shortening feature supports certificate management for custom domains and automatically shortens long links for deliverability and conversion tracking.
  • Basic or Advanced Opt-Out: All Twilio senders support basic opt-out service. Advanced Opt-Out supports country and language specific keywords, responses, and allows you to offer compliant experiences wherever your users are located.

Above is not an exhaustive list of features and capabilities that you may need to leverage as you build your messaging application, but they are important foundational components to understand from the start.


Step 2: Review Twilio account fundamentals

step-2-review-twilio-account-fundamentals page anchor

More than 130 billion messages are sent and received by the Twilio Customer Engagement Platform every year - from appointment reminders, to marketing offers, and sales conversations - with millions of developers turning to Twilio for critical communications. If you're new to the platform, read through these basic aspects of maintaining your Twilio account.

Signing up, upgrading, and funding your account

signing-up-upgrading-and-funding-your-account page anchor

To start, you'll need to sign up for a free trial account(link takes you to an external page). While you'll be able to see everything we have to offer in the Twilio Console, some trial limitations will apply until you upgrade your account. Upgrading your account (follow our step-by-step guide(link takes you to an external page)) requires you to add a payment method and deposit a minimum balance. You can enable auto recharge so that your messages will always be sent, or access your current balance and add additional funds through the billing overview(link takes you to an external page) page.

Understanding message costs before you start sending

understanding-message-costs-before-you-start-sending page anchor

There are a few important costs to consider. We offer transparent pay-as-you-go pricing with automatic volume discounts to make sending messages as straightforward as possible.

The typical cost for sending messages includes the cost to provision a phone number or sender (typically a once monthly fee), plus the price of each message segment (this primer on segments is a great starting point) and any applicable carrier fees.

For more information on carrier fees and SMS and MMS pricing outside North America, head over to twilio.com/pricing(link takes you to an external page).

Compliance and regulatory considerations

compliance-and-regulatory-considerations page anchor

The messaging ecosystem is highly regulated to ensure every message is both wanted and compliant - preserving the value of the channel for businesses and consumers alike. In the US, text messages are regulated under the Telephone Consumer Protection Act (TCPA) and must also follow the CTIA Messaging Principles & Best Practices (an organization representing the U.S. wireless communications industry). Messages sent through Twilio must also be in compliance with the Messaging Policy(link takes you to an external page) and Acceptable Use Policy(link takes you to an external page). It's a lot to keep track of, and sending a message to the wrong person at the wrong time may not only impact the customer's view of your brand, but could put a business at risk of legal action. However, a welcomed and meaningful message sent to the right person at the right time can lead to a significant positive impact to your business. We break down the complexity in this guide to U.S. SMS Compliance(link takes you to an external page).

Note that messages deemed unwanted by consumers may be filtered. When we know that a message has been filtered at a stage between your application and a consumer device, you will see your messages with the "Undelivered" status and Error 30007(link takes you to an external page). Following the Messaging Policy, Regional Guidelines, and relevant local requirements will help reduce message filtering.

Senders

As you review this onboarding documentation, you'll see the term "sender'' consistently. A sender in this context refers to the actual number or alphanumeric ID by which message recipients receive the message. Examples of senders are 10 digit long codes, short codes, toll free numbers, and alphanumeric sender IDs (more common outside of the U.S.).

Throughput

Throughput is the number of message segments you can send per second (MPS) from one number or sender resource. This concept is important when you determine the kind of senders you will use because some offer higher throughput than others(link takes you to an external page).

Filtering

Message filtering(link takes you to an external page) occurs when a phone carrier or Twilio intervenes during the delivery of a message due to a suspicion that the message is in violation of our messaging policy, acceptable use policy (see compliance and regulatory considerations above), or has received end user complaints. There are proactive steps like registering or verifying senders, ensuring opt-in and opt-out, and complying with best practices to take to reduce the likelihood of your messages being filtered, and we will address them in this guide.


Step 3: Identify your SMS Use Cases

step-3-identify-your-sms-use-cases page anchor

Understanding your SMS use case(s) can help you make smart decisions as you build your messaging application. Your use cases will indicate your need for one-way or two-way interactions, and they dictate how many separate Messaging Services you may need to create.

Please note for any one-time password verifications, Twilio Verify is purpose-built for this messaging use case, and includes support of multiple channels like email, push, voice, WhatsApp, and more, and cost-saving features like SMS Fraud Detection.

Messaging Use Cases.

Step 4: Review the Onboarding Process

step-4-review-the-onboarding-process page anchor

We have compiled four milestones, including this one, to help you through the Twilio Programmable Messaging API onboarding process. The process is not strictly linear, and your knowledge and/or previous development work may allow you to skip around.

See the table below for an overview of the onboarding process through which this guide will walk you.

Milestone: SMS Foundations (you are here)

Description:

  • Review foundational Twilio messaging concepts
  • Select at least one messaging use case
  • Prepare for the onboarding process

Milestone: Prepare your sender strategy

Description:

  • Create and configure your account
  • Choose at least one sender type
  • Provision senders and complete related applications, registrations, and verifications
  • Port numbers if applicable

Milestone: Build your account

Description:

  • Review a template account architecture
  • Create Subaccounts, API keys, and Messaging Services
  • Complete data configurations such as webhooks, and status callback URLs

Milestone: Monitor your application

Description:

  • Review Messaging Insights capabilities
  • Review common issues and troubleshooting strategies
  • Configure Alarms
  • Explore deliverability best practices

Next, Prepare your Sender Strategy

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.