Aprende / Guías de SMS / Envía un SMS con una plantilla

Envía un SMS con una plantilla

3:20 min

Un SMS de texto libre te obliga a tomar tres decisiones: qué dice el mensaje, cómo se clasifica y qué remitente es válido para el país al que envías. Bird incluye un catálogo de plantillas SMS listas para enviar que resuelven las tres por ti. En este vídeo exploramos el catálogo en el panel, abrimos una plantilla de código de verificación para leer las variables que necesita, y la enviamos desde la terminal en un solo comando, sin remitente en la solicitud.

Qué cubrimos

  • Crear una plantilla de SMS reutilizable
  • Añadir variables para personalización
  • Enviar un mensaje desde una plantilla a través de la 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.

Empieza con un canal.
Añade los demás cuando estés listo.

Una clave API de prueba es tuya de inmediato. El acceso a producción se desbloquea cuando añades un método de pago y verificas un remitente.

¿Usas Claude Code, Cursor o Codex? Copia un prompt de configuración y tu agente instalará el Bird CLI y las habilidades por ti. Elige el tuyo:

Cursor