# Write and send an SMS

Source: https://kirora.io/docs/guides/messaging/sms/send-sms

Write an SMS that fits in fewer segments, add your brand and opt-out text, test it, and send it from a campaign, a journey or your app.

The SMS composer is the same in a campaign and a journey step: choose who it's from, write the message in the phone, and watch the count as you type. Your provider bills by the segment, so the composer keeps a running count for your draft.

## Write the message

1. Under **From**, choose a sender or a [sender group](https://kirora.io/docs/guides/messaging/sms/sender-groups). With only one sender or group to choose from, it's chosen for you.
2. Write the message in the phone. Choose **Insert** to add a merge tag, such as the contact's first name, or in a journey a property of the event that started it.
3. Check the opt-out text under the message. See [Opt-out text](#opt-out-text).
4. Turn on **Preview** and pick a contact to read the message exactly as they'll get it. Kirora flags any merge tag that's empty for that contact.

A message can be up to 1,600 characters once its merge tags are filled. Kirora never cuts a long message short: one that runs over fails as *Too long to send*.

## Characters, encoding and segments

Under the phone, the composer counts your draft, brand name and opt-out text included: its characters, its encoding and its segments, such as *142 · GSM-7 · 1 segment*. Personalisation and shortened links can change the final count for each recipient. Your provider bills each segment as one SMS.

| Encoding | Used when | One segment | Each segment of a longer message |
| --- | --- | --- | --- |
| **GSM-7** | Every character is in the standard SMS alphabet | 160 characters | 153 characters |
| **Unicode** | Any character isn't: an emoji, most non-Latin scripts | 70 characters | 67 characters |

A few GSM-7 characters count as two: `^ { } \ [ ~ ] | €`. In Unicode, most emoji count as two, and combined emoji can count as more. One emoji switches the whole message to Unicode and roughly halves what each segment holds, so the composer says which characters did it: *Unicode because of …*. Swap or remove them if the message doesn't need them.

### Smart encoding

**Smart encoding** swaps curly quotes, long dashes and ellipses for their plain equivalents before a message is counted, previewed and sent, so one stray curly apostrophe doesn't double your bill. When it changes something, the composer says *Curly quotes and dashes go as plain ones.*

It's on by default. Owners and admins can turn it off on the **Sending hours** tab of **Settings › Messaging › SMS**.

## Brand name

Carriers expect a marketing SMS to say who it's from. When it goes from a number, Kirora starts it with your brand's name and a colon, such as *Juniper Kitchen:*, taken from your brand kit, or your workspace's name without one. Turn off **Start with "…:"** above the phone if your message names you already.

A sender ID already shows your brand, so it gets no prefix. Transactional SMS never does.

## Opt-out text

Every marketing SMS ends with an **Opt-out text**, editable under the message and counted in its length. Kirora fills it in for the sender you choose:

- **Reply STOP to opt out**, when every sender it can go from acts on a STOP reply.
- **Opt out: `{{ sms_opt_out_url }}`**, when one can't take replies: sender IDs, every Termii sender, and an Infobip number whose replies haven't reached Kirora yet.

The link becomes a short link to a page where the contact confirms they want to stop. Opening it changes nothing, so link previews can't opt anyone out. Links work for six months.

Edit the wording to suit your country, but keep a recognised opt-out keyword such as STOP, and keep the link when the sender can't take replies. Without it, the composer warns *This sender can't take replies, so it needs the opt-out link.* Choose **Add it** to put the link back. A message missing it can't be saved complete.

Transactional SMS has no opt-out text and can't carry the opt-out link. See [Consent and unsubscribes](https://kirora.io/docs/guides/contacts/consent-and-unsubscribes#sms-consent-and-opt-outs) for what STOP and the link do.

## Links

When your workspace tracks clicks, links in a marketing SMS go out shortened and each click is counted; the composer says *Links are shortened and their clicks tracked.* Contacts in the EEA and the UK get your links as written. Transactional SMS is always sent as written. SMS has no opens.

## Send a test

Owners and admins can choose **Send a test** under the phone. In **Send a test SMS**, pick a **Contact** with a phone number, and for a sender group the sender to **Send from**, then choose **Send test**. The test goes to that contact's phone through your provider, which bills it like any other SMS. It goes out as the real message would, with its brand name and opt-out text, and a transactional message goes as transactional.

- Tests go only to contacts' phones, never to a typed number, and never to a number that opted out or can't take SMS.
- The workspace can send 20 tests an hour.
- The opt-out link in a test opens the page but changes nothing.

## Send from a campaign

1. In the campaign's **Details**, under **Channels**, choose **SMS**, on its own or with email and push. It goes *to the phones of contacts with SMS consent*.
2. Choose the audience.
3. In the **SMS** step, write the message. Under **Sends**, choose whether it waits for each contact's [sending hours](https://kirora.io/docs/guides/messaging/sms/sending-hours).
4. On **Review and send**, **Who receives it** shows how many people SMS reaches and who's left out: no consent, no phone number, or *opted out or unsendable*. It also shows the message's segments, your provider balance and how many contacts will wait for their sending hours.
5. Choose **Save and send…** or **Save and schedule…** and confirm.

SMS can't be chosen until a provider is connected and one of its senders can send: its card says *Needs an SMS provider.* or *Needs an SMS sender.* Owners, admins and developers get a **Set up SMS** link. Kirora shows segments, not a price: your provider sets the rate.

## Send from a journey

Add a **Send message** step and choose **SMS** under **Channel**, then write the message. See [Set up a send step](https://kirora.io/docs/guides/journeys/build-a-journey#set-up-a-send-step).

- **Transactional SMS**: tick it for a code or alert the contact needs, not a promotion. It goes without SMS consent, sending hours or opt-out text, though a number that opted out still gets nothing.
- **If they can't receive this, go to**: a path for contacts with no phone, no SMS consent or an opt-out. Point it at an email step to send *SMS, else email*.
- **If it can't be sent, go to**: a path for when the message can't be queued, such as when your plan's SMS allowance is used up or the provider balance is empty.

SMS has no topics. A journey with an SMS step can't be turned on until a sender exists.

## Send from your app

Sign-in codes, delivery alerts and booking reminders go out from your server through the API, one person at a time, with no opt-out text or brand name added. Transactional SMS isn't held for sending hours, and it jumps ahead of campaign texts on the same provider account, so a code isn't stuck behind a promotion. It can fall back to email or push when the SMS can't be sent. Point your developer to [transactional messages](https://kirora.io/docs/api/transactional).

## Next steps

- [Sending hours](https://kirora.io/docs/guides/messaging/sms/sending-hours)
- [Send each country from its own sender](https://kirora.io/docs/guides/messaging/sms/sender-groups)
- [Troubleshoot SMS](https://kirora.io/docs/guides/messaging/sms/troubleshoot-sms)