Build the future of communications
Engage customers like never before on Voice, SMS, Video, and WhatsApp.
Get a free API keyQuestions? Talk to an expert.
Build the future of communications
Questions? Talk to an expert.
You’ve got mail.
SendGrid is now part of Twilio, bringing email to one seamless customer engagement platform.
Build the future of communications
Questions? Talk to an expert.
Build a better customer experience
Questions? Talk to an expert.
Build the future of communications
Questions? Talk to an expert.
Build the future of communications
Questions? Talk to an expert.
Build a better customer experience
Questions? Talk to an expert.
To generate a new keyword, please refresh this page.
Let's write your first Twilio code.
Use your mobile phone to send an SMS with the phrase "lorem ipsum" to (555) 555-5555. You should receive a reply which says "Ahoy, world!"
Awesome! Now let’s learn how to reply to messages.
Next: Introduction to TwiML
The code to the leftbelow is TwiML, the Twilio Markup Language. You use TwiML to tell Twilio how to respond to incoming text messages and phone calls.
The <Message> TwiML element replies to incoming text messages. Let’s edit this TwiML to personalize the message, like "Hi [your name]!" Spice the message up with an emoji. "Greetings human 🤖".
Send any message to your phone number and you’ll see your new reply.
Next: TwiML templating
When your app gets a text, Twilio asks your app how to respond and includes data about the incoming message like the message’s contents and the phone number it was sent from.
Try accessing that data in your TwiML. Use double curly braces to include the variable in your response. Here are a few you can try: “{{ Body }}”, “{{ From }}”, “{{ FromCountry }}”.
When you build your Twilio app, you’ll use these fields with your own code to power personalized conversations with your users.
Next: Beyond TwiML
Congrats! You now know the basics of using TwiML.
TwiML is just one way to send text messages with Twilio. You can send outbound messages anytime you want using our HTTP API or our SDK for your programming language.
Sign up for your free Twilio account and you’ll have your own Twilio number. Next, play through TwilioQuest to unlock the secrets of Twilio’s advanced features.
We can't wait to see what you build.
Twilio was made for creators like you. We build our APIs to be simple to use, powerful in production, and endlessly scalable.
We're built in the cloud. Our API is always available, continuously upgraded, and auto-scales to meet your needs.
Start running straight from deploy. Enable your Twilio-powered app to do everything from text to speech, Natural Language Understanding, and more. The API is your oyster.
Every text and call on Twilio helps fine tune the Super Network, our web of carrier connections all over the globe. This data is yours to use via a powerful web API that helps you optimize the quality and cost of your communications.
API success rate is the true indicator of your app experience. We won’t settle for errors that take down your app.
The largest enterprises trust Twilio with their data. We’re ISO 27001 and GDPR Privacy Shield compliant.
Using Twilio, you only pay for what you use. As you scale, we work with you to design volume discounts and committed use discounts that serve your needs.
Not ready yet? Talk to an expert.
Our experts love to answer questions.
Fill out the form below.