Twilio is the developer-first communications platform that lets your application send SMS messages, make voice calls, run WhatsApp conversations, send email through SendGrid, run video meetings, and handle two-factor authentication codes — all through a unified REST API.
It is the company that made it normal to expect "build the SMS feature in an afternoon" rather than "contract a telecom carrier and wait six months."
The API surface is broad and consistent
Sending an SMS is one HTTPS POST to /Messages with a From number, To number, and Body. Making a voice call is one POST to /Calls.
Running a WhatsApp template message is the same pattern with a different From channel identifier. The TwiML markup language describes call flows declaratively without you running any telephony infrastructure.
Five high-value use cases
Two-factor authentication via SMS or Twilio Verify. Verify is purpose-built for OTP delivery with carrier optimizations and fraud detection.
Notifications and alerts — appointment reminders, shipping updates, fraud alerts. Anything time-sensitive that beats email.
Customer service — IVR phone trees, callback queuing, voicemail transcription, post-call surveys.
Marketing — A2P 10DLC compliant SMS campaigns with opt-in tracking and STOP keyword handling built in.
Bridge phone numbers for marketplace privacy — Uber, Airbnb, and Doordash all use Twilio to mask real phone numbers between buyer and seller.
Where to think twice
SMS pricing varies wildly by destination country. Sending to the US is cheap (~$0.0079 per message). Sending to Brazil or Russia can be 5-10x more expensive.
If your audience is global and high-volume, model the per-country cost before committing.
WhatsApp Business pricing is a category of its own. Meta charges per conversation (24-hour window), not per message, and conversation rates differ by category (utility, marketing, authentication) and by country.
For high-volume cold marketing, in-app push notifications are nearly free compared to SMS. Use SMS for the highest-value moments only.
Getting started in fifteen minutes
Sign up at twilio.com — you get a $15 trial credit, no credit card required initially. Buy a phone number from the Console (US local numbers are $1.15/month).
Grab your Account SID and Auth Token, install the SDK (pip install twilio, npm install twilio), and your first message is roughly five lines of code.
Trial accounts have a sandbox restriction — you can only send messages to phone numbers you have verified, which prevents spam abuse but trips up developers expecting full functionality before paying.
Pricing breakdown
- SMS in the US: $0.0079 per outbound message, $0.0075 per inbound
- Voice calls: $0.014 per minute outbound to US numbers, $0.0085 inbound
- WhatsApp: $0.005-0.085 per conversation depending on category and destination
- Verify (2FA): $0.05 per successful verification
- Phone numbers: $1.15/month for US local, $1.00/month for toll-free
Volume discounts kick in around 100,000 messages per month. Talk to Twilio Sales for committed-use pricing on enterprise tiers.
Real cost example
For a SaaS product sending 50,000 OTP SMS per month: 50,000 × $0.0079 = $395/month plus phone number rental.
Verify service is often cheaper at scale because it includes carrier-level fraud detection and SIM swap prevention which a raw SMS message does not. Run the math both ways before picking.
Alternatives worth knowing
- MessageBird — often cheaper internationally, strong European presence
- Vonage (formerly Nexmo) — comparable feature set to Twilio with similar pricing
- Plivo — lower cost but smaller carrier network, fine for high-volume single-region apps
- Sinch — strong in APAC and conversational messaging
- Resend — modern email-only alternative with better DX than SendGrid
- Postmark — transactional email only, very high deliverability
- Amazon SES — cheapest at scale if you handle deliverability monitoring yourself
For pure 2FA without infrastructure, Auth0 and Clerk include OTP delivery in their authentication packages so you may not need a separate Twilio account.
Production details that matter
A2P 10DLC registration is mandatory for application-to-person SMS to US numbers. Without it, US carriers throttle or block your messages.
The registration takes 1-2 weeks and costs around $50 plus per-campaign fees. Plan for it before launch, not after.
STOP keywords (STOP, UNSUBSCRIBE, CANCEL, END, QUIT) must be honored by US law. Twilio handles this automatically but you should track opt-outs in your own database to avoid resending after a user opts out.
Phone number geographic restrictions matter. A US number cannot reliably receive messages from many international carriers. For global products, buy local numbers per region.
Webhook reliability for inbound
Webhook reliability is critical for inbound calls and messages. Twilio retries failed webhooks with exponential backoff, but if your endpoint returns 4xx or 5xx repeatedly, Twilio gives up.
For high-volume inbound, use the TaskRouter or Studio Flow services which run logic on Twilio's infrastructure rather than your own.
The official documentation at twilio.com/docs is comprehensive with quickstarts in multiple languages. The status page at status.twilio.com is worth subscribing to — carrier-level outages happen and Twilio is generally fast to communicate them.
Pricing reference: twilio.com/pricing has the public schedule. The Twilio CLI lets you check your current usage from the terminal without opening the Console.