# Sending an SMS with a template

A free-text SMS asks you to make three decisions: what the message says, how it's classified, and which sender is valid for the country you're sending to. Bird ships a catalog of ready-to-send SMS templates that settle all three for you. In this video we browse the catalog in the dashboard, open a verification-code template to read the variables it wants, and send it from the terminal in one command, with no sender in the request at all.

Video: https://www.youtube.com/watch?v=EDA1480GdlE (3:20)

## What we cover

- Creating a reusable SMS template
- Adding variables for personalization
- Sending a message from a template via the API

## Transcript

_Auto-generated from the video._

Hey. Welcome to another video. Today, we're going to be sending a SMS with a pre-approved Bird template. Some of you might be wondering uh why templates are needed. So, I just want to give you a quick rundown. So, usually when you're sending a plain text SMS, you need to decide on everything. You need to decide uh the content, the sender, write the copy, need to pick out all of the variables, and pick up the category. Um the good thing about templates is that we actually take care of all of that, specifically the sender, cuz that's something that is uh quite tedious for some destinations.

Now, destination-specific rules apply. Uh for the Netherlands, for example, it's quite lenient, but when sending a message to the United States, you need to do a full registration process. Now, in the event that you just need to send a few verification messages there, instead of having to go through the entire verification process for yourself, you can use one of our pre-approved templates instead.

Uh templates can be found in the dashboard when we navigate to SMS and templates. And here you can see a wide range of different types of uh messages that you uh can send right on the go. So, they're split up into multiple categories. So, we've got marketing, transactional, authentication, and service messages. Let's go to a transactional message.

Let's uh let's say an order confirmation. As you can see, um the format of the message is pretty straightforward. So, you've got the order, and then we've got variables in place to allow you to still customize the message towards the specific use case.

Um the exact template is also pretty straightforward. Now, as you can see, uh it's a simple uh post request. You need to do the authentication, and then instead of writing out everything, all that we actually submit is the template. We give it the template name, and then we include all of the parameters that we actually want to fill in. So, in this case, the order reference, the amount, and the currency. Um and then all of this would actually just be sent indirectly to the user.

Now, let's have a quick look at another one. Let's go to a authentication one. And here you can see the setup is exactly the same. Everything is already pre-registered in terms of the type. Um it's a system message. We've got that name. And then here again, we can see that full um flow in terms of sending a template.

All right. Now, we can just send one quite quickly. So, let's take the uh password authentication. And I'm going to copy the information. I'm going to head over to a terminal session. All right. So, I've opened up a fresh terminal session, and I've just pasted in uh the exact same snippet. I've just filled out my um API key and uh phone number.

I'm just going to trigger this, and we're going to exactly see the response. So, we've got a good response. We can actually see that the text is redacted because it's an OTP message. And immediately, we can see the message coming from the pre-approved uh sender, Authifly.

And it's as simple as that. Happy sending.

## More SMS guides

- [Sending your first SMS](/en-ch/learn/sms/sms-first-send) — 2:17
- [Registering your SMS sender ID](/en-ch/learn/sms/sms-sender-id) — 4:39
- [Control where your account can send](/en-ch/learn/sms/sms-destinations) — 2:31
- [SMS segments: why one emoji doubles the cost](/en-ch/learn/sms/sms-segments) — 4:33
- [SMS pumping explained](/en-ch/learn/sms/sms-pumping) — 2:11

## Resources

- [Documentation](/en-ch/docs)
- [Learn more about SMS](/en-ch/products/sms)
