Skip to main content
SMS

Deliver at scale with proven APIs for SMS

Send and receive text messages with just a few lines of code on MessagingX, the trusted platform for cross-channel messaging.

Illustration of customer receiving sms message with just a few lines of code

APIs

Scale from concept to global
solution with flexible SMS APIs

Illustration of programmable messaging api connecting to customers through preferred channel

Programmable Messaging API

Send transactional SMS, MMS, and WhatsApp messages with a single API.

  • Reach 180+ countries reliably with localized senders, compliance tools, and global guidelines.
  • Manage compliance, deliverability, replies, and more with Twilio’s programmable software.
  • Monitor and troubleshoot message delivery and engagement with real-time analytics.
Illustration of Conversations api connecting with multiparty  through various channels

Conversations API

Drive two-way engagement over SMS and other preferred channels with a single API.

  • Power commerce and support on SMS, MMS, chat, Facebook Messenger, Google’s Business Messages, and WhatsApp.
  • Manage participants, archive messages, and orchestrate workflows without additional code.
  • Get to market faster with quick-starts, sample apps, and SDKs.

Use cases

Start and scale
customer relationships

Notifications

Send personalized alerts, reminders, and notifications for appointments, deliveries, and more with the Programmable Messaging API.

Verifications

Deliver one-time passwords for fast onboarding that reduces support costs and fraud at once.

Promotions

Distribute marketing messages and offers with the Programmable Messaging API to drive leads, sales, and loyalty.

Conversational care and commerce

Support the full customer journey with two-way, SMS for support, sales, and lead generation with the Conversations API.

Developer resources

Create a message
  • Node.js
  • C#
  • PHP
  • Ruby
  • Python
  • Java
  • curl
  • twilio-cli
//Downloadthehelperlibraryfromhttps://www.twilio.com/docs/node/install//FindyourAccountSIDandAuthTokenattwilio.com/console//andsettheenvironmentvariables.Seehttp://twil.io/secureconstaccountSid=process.env.TWILIO_ACCOUNT_SID;constauthToken=process.env.TWILIO_AUTH_TOKEN;constclient=require('twilio')(accountSid,authToken);client.messages.create({from:'+15017122661',body:'Hi there',to:'+15558675310'}).then(message=>console.log(message.sid));
// Install the C# / .NET helper library from twilio.com/docs/csharp/installusingSystem;usingTwilio;usingTwilio.Rest.Api.V2010.Account;classProgram{staticvoidMain(string[]args){// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/securestringaccountSid=Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");stringauthToken=Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");TwilioClient.Init(accountSid,authToken);varmessage=MessageResource.Create(from:newTwilio.Types.PhoneNumber("+15017122661"),body:"Hi there",to:newTwilio.Types.PhoneNumber("+15558675310"));Console.WriteLine(message.Sid);}}
<?php// Update the path below to your autoload.php,// see https://getcomposer.org/doc/01-basic-usage.mdrequire_once'/path/to/vendor/autoload.php';useTwilio\Rest\Client;// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/secure$sid=getenv("TWILIO_ACCOUNT_SID");$token=getenv("TWILIO_AUTH_TOKEN");$twilio=newClient($sid,$token);$message=$twilio->messages->create("+15558675310",// to["from"=>"+15017122661","body"=>"Hi there"]);print($message->sid);
# Download the helper library from https://www.twilio.com/docs/ruby/installrequire'rubygems'require'twilio-ruby'# Find your Account SID and Auth Token at twilio.com/console# and set the environment variables. See http://twil.io/secureaccount_sid=ENV['TWILIO_ACCOUNT_SID']auth_token=ENV['TWILIO_AUTH_TOKEN']@client=Twilio::REST::Client.new(account_sid,auth_token)message=@client.messages.create(from:'+15017122661',body:'Hi there',to:'+15558675310')putsmessage.sid
# Download the helper library from https://www.twilio.com/docs/python/installimportosfromtwilio.restimportClient# Find your Account SID and Auth Token at twilio.com/console# and set the environment variables. See http://twil.io/secureaccount_sid=os.environ['TWILIO_ACCOUNT_SID']auth_token=os.environ['TWILIO_AUTH_TOKEN']client=Client(account_sid,auth_token)message=client.messages.create(from_='+15017122661',body='Hi there',to='+15558675310')print(message.sid)
// Install the Java helper library from twilio.com/docs/java/installimportcom.twilio.Twilio;importcom.twilio.rest.api.v2010.account.Message;importcom.twilio.type.PhoneNumber;publicclassExample{// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/securepublicstaticfinalStringACCOUNT_SID=System.getenv("TWILIO_ACCOUNT_SID");publicstaticfinalStringAUTH_TOKEN=System.getenv("TWILIO_AUTH_TOKEN");publicstaticvoidmain(String[]args){Twilio.init(ACCOUNT_SID,AUTH_TOKEN);Messagemessage=Message.creator(newcom.twilio.type.PhoneNumber("+15558675310"),newcom.twilio.type.PhoneNumber("+15017122661"),"Hi there").create();System.out.println(message.getSid());}}
curl -X POST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json \--data-urlencode "From=+15017122661"\--data-urlencode "Body=Hi there"\--data-urlencode "To=+15558675310"\-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
# Install the twilio-cli from https://twil.io/cli twilio api:core:messages:create \ --from +15017122661 \ --body "Hi there" \ --to +15558675310

Read the Docs

Explore quick-start guides, code snippets, SDKs, and more in our comprehensive resource library to kickstart your SMS solution with MessagingX.

Pricing

SMS made easy
with MessagingX

Send and receive text messages at scale with two developer-friendly APIs in one trusted platform, MessagingX. Pay as you go and enjoy scaling discounts for high-volume and long-term use.