Choosing a Twilio Messaging Product Based on Throughput, Region, and Compliance
Decision guide for selecting Twilio Long Code, Toll-Free, or Short Code based on required MPS, target region, and A2P 10DLC regulations, with Messaging Service pooling example.
08 Jul 2025, 00:05 UTC

Decision: Selecting a Twilio Sender Type
When designing an SMS‑based feature, the key constraints are the required messages‑per‑second (MPS), the geographic destination of recipients, and any regulatory obligations such as A2P 10DLC in the United States. Choosing the wrong sender type can lead to carrier filtering, throttling, or unnecessary cost.
Comparison of Sender Options
| Feature | Long Code (10DLC) | Toll‑Free Number | Short Code |
|---|---|---|---|
| Typical Use Case | Conversational, low‑volume alerts | Customer support, medium‑volume notifications | High‑volume marketing, OTP,‑wide‑area broadcasts |
| Throughput (MPS) | Low to medium (carrier‑dependent, often 1‑10) | Medium fixed (≈10‑30) | Very high (up to 100+ per carrier) |
| Approval Time | Days to weeks (A2P 10DLC registration) | Days (verification) | Weeks to months (carrier vetting) |
| Monthly Cost | Low (≈$1‑$2 per number) | Low (≈$2‑$3 per number) | High (≈$500‑$1500 per short code) |
| Global Reach | High, but varies per country | Primarily North America | Country‑specific, requires local provisioning |
Trade‑offs and Constraints
Long Codes (10DLC): In the US you must register a Brand and Campaign. Without registration carriers apply heavy filtering, resulting in silent drops. They are best for personalized, two‑way traffic where volume stays modest.
Toll‑Free Numbers: Provide a middle ground with higher throughput than an unregistered long code and a professional appearance. They still need verification to avoid being marked as spam.
Short Codes: Deliver the highest priority and throughput but involve a lengthy approval process and significant monthly lease fees. They are justified only when you need to send thousands of messages per second or require guaranteed delivery for time‑sensitive OTPs.
Implementation: Using a Messaging Service for Sender Pooling
Instead of hard‑coding a single From number, create a Messaging Service that contains all eligible sender types. Twilio’s Copilot logic will automatically pick the best number for each destination (e.g., a local long code for a US user, a short code for a high‑volume alert).
Configuration Steps
- In the Twilio Console, navigate to Messaging Services and click Create Service.
- Give the service a friendly name (e.g.,
alerts‑pool) and add your purchased Long Codes, Toll‑Free numbers, and/or Short Codes to the Sender Pool. - Under Sender Settings, enable Geographic Match and, if needed, Alphanumeric Sender ID for countries that support it.
- Save the service and note the Service SID (starts with
MG).
Sending a Message via the Service SID
Run this code from your application server. Replace the placeholders with your actual Account SID, Auth Token, and Messaging Service SID. Ensure the Twilio helper library is installed.
# Example using Twilio Python Helper Library
from twilio.rest import Client
# Required Permissions: Account SID and Auth Token with API access
client = Client('ACxxxxxxxxxxxxxxxxxxxxxxxx', 'your_auth_token')
message = client.messages.create(
body='Your verification code is 123456',
messaging_service_sid='MGxxxxxxxxxxxxxxxxxxxxxxxx',
to='+15558675309'
)
print(f'Message SID: {message.sid}')
Validating Delivery with Webhooks
Because the API call only confirms acceptance by Twilio, you must configure a Status Callback to receive delivery receipts (DLRs) and inbound messages.
- Set up a publicly reachable HTTPS endpoint (use ngrok for local testing) and enter its URL in the Messaging Service’s Status Callback field.
- Your endpoint should expect a POST with parameters including
MessageStatus. A value ofdeliveredindicates successful hand‑off to the carrier. - Risk: If the endpoint returns a non‑2xx response or is slow, Twilio will retry and may eventually drop the callback, causing loss of visibility.
Limitations and Practical Verification
Throughput limits are applied per‑carrier, not globally. A Short Code that can send 100 MPS to one operator may be throttled by another. To verify your actual performance:
- In the Twilio Console go to Messaging > Monitor > Logs.
- Filter by Error Code
30007(Carrier Filtering) to see if messages are being blocked. - Check the Messaging Service Copilot tab for recommendations such as adding more numbers to the pool to increase aggregate throughput.
- Monitor the
MessageStatuswebhook logs for delayed or failed deliveries.
Rollback Procedure
If you observe a sudden increase in filtering after switching to a Messaging Service, revert your API calls to use a specific, verified From number (e.g., a known good Long Code) while you investigate the pool configuration. This restores the previous known‑good state without deleting the service.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.