# Transactional SMS

## Before You Start:

{% hint style="info" %}
Please ensure your country is currently supported for SMS by [checking the list here](https://airtable.com/shrWbnXTFYOzp9yX8). If your country is not yet supported, you can make a request by filling out [this form](https://airtable.com/shrG8t9gZHJOibBIA). Country support is typically added within 48 hours after the request is submitted.
{% endhint %}

{% hint style="info" %}
All text messages are sent with an opt out message appended in order to comply with SMS regulations and best practices. This message reads "Reply STOP to opt out."&#x20;
{% endhint %}

{% hint style="info" %}
Please **do not** send your users links of any kind at this time. This is read as spam by many carriers.  Your message may be blocked and your sending reputation will be negatively affected. Support for links in text messages is coming soon!
{% endhint %}

{% hint style="info" %}
Please be sure to add an opt-in check box somewhere in your app to maintain compliance with anti-spam laws. Your app may be rejected from the app stores if you do not include this. Please see this example.
{% endhint %}

![Example SMS/Text Message Opt-In upon user signup.](/files/-MUyAS2nyBikhGWUndN3)

## Video Tutorial

Updated video tutorial is coming soon!

## Walkthrough

**1.** Login to [Adastacks.com](https://adastacks.com) and navigate to your dashboard (we'll need this for your API Key in a minute)

**2.** Open a new tab in your browser and open up your Adalo app in the Adalo editor

**3.** Once open, place a test button on a screen of your choosing

**4.** Under the "Click Actions" for the button, select **Custom Action**

**5.** Give your action a name, such as "Send Login Code via Text"

**6.** Select the **Create** option from the dropdown below the Title field, then click **Next**

**7.** Copy the following URL and paste it into the Base URL field of the Custom Action

```
https://adastacks.app.n8n.cloud/webhook/send-sms?to_phone=TOPHONE&body=TEXTBODY
```

**8.** Set the "Method" dropdown to **POST**

**9.** Add a query parameter called **Content-Type** with the value **application/json**

![](/files/-MaZ7zEwCloG89ck9zcf)

**10.** Add another query parameter called **api\_key** with your Adastacks API Key as the value

![](/files/-MaZwnVzXtyllh_lmNuA)

**11.** Add **Inputs** to hold your data for the new Custom Action (*You can name these whatever you like, but below are some suggestions*)

| Suggested Input Name  | Input Type | Suggested Input Test Data                        |
| --------------------- | ---------- | ------------------------------------------------ |
| **To Phone Number**   | Number     | *You can use your own phone number to test with* |
| **Text Message Body** | Text       | This is a test verification code: 1234           |

{% hint style="info" %}
The `TO PHONE` must be formatted **with the country code** and **without symbols**.\
For example, to send a message to a US number, the number you send would be **18445551234**\
If you are unsure of the country code, you can visit [this page](https://countrycode.org/).
{% endhint %}

**12.** Replace the **capitalized text** in the URL with the **Inputs** you just made using the **Magic Text** button in the top right of the URL field.

![](/files/-MaZyQJb4bIxgiRZ0oCv)

**13.** Run the test request. (See the success screenshot below)

{% hint style="info" %}
Even test actions that fail return a "Test Successful" message so be sure to click **Show Full Response** to ensure the action succeeded. This is by design so that you can still save the action and return to continue setting it up later if you wish.
{% endhint %}

![](/files/-MTMkD9LLB-EUU14Pgnx)

**14.** Save the Custom Action and add it where you need it throughout your app.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adastacks.com/stacks/send-a-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
