> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dmly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect SMS

> Connect Twilio, Plivo or a custom HTTP gateway so you can text contacts, take replies in your Inbox, and send SMS broadcasts with no messaging window.

SMS reaches people who don't use a messaging app, and it reaches them at any time — there is
no 24-hour window and no template approval. You bring your own gateway account: DMLY sends
through Twilio, Plivo or a custom HTTP gateway, and you pay that provider for the messages.

SMS is a secondary channel. [WhatsApp](/channels/whatsapp) stays the one to set up first —
it's cheaper, it carries images and buttons, and it's what the rest of DMLY is built around.
Add SMS for the customers WhatsApp can't reach.

## What SMS can't do

Worth knowing before you connect, because these catch people out:

* **No [growth tools](/growth/overview).** Growth tools build a chat link or QR code, and SMS
  has no equivalent. The Growth section stays in the sidebar but is greyed out when SMS is your
  active channel. Clicking it explains why — *"Growth tools need a channel reachable by a chat
  link — not available on SMS, TikTok or Live Chat."* — and offers a **Switch profile** button
  to jump to a channel that supports them.
* **Text only.** No images, no files, no tappable buttons. If a flow step tries to send media
  on SMS, only the caption and the link go out as plain text.
* **No message templates**, because SMS doesn't need them — you can always send freely.
* **No read receipts.** SMS tells you a message was sent, delivered or failed. Nothing tells
  you it was read.

## Before you start

Pick a provider and open an account with them. Three are supported, and only three:

<Columns cols={2}>
  <Card title="Twilio" icon="tower-cell">
    *Send & receive SMS worldwide via Twilio.* Two-way — replies and delivery reports both
    come back.
  </Card>

  <Card title="Plivo" icon="tower-cell">
    *Send & receive SMS via Plivo.* Two-way — replies and delivery reports both come back.
  </Card>

  <Card title="Custom HTTP gateway" icon="code">
    *Connect any SMS provider via a custom HTTP send URL.* Sending only — see the warning
    below.
  </Card>
</Columns>

You also need a number to send from: a Twilio number or Messaging Service, or a Plivo sender
number.

<Warning>
  **The custom HTTP gateway is outbound-only.** It sends your messages, but replies never
  reach your Inbox and delivery reports never update a message's status. If you need two-way
  SMS, use Twilio or Plivo.
</Warning>

## Connect a gateway

SMS doesn't connect from the Channels list — that's the path for social accounts you log in
to. SMS lives in the **SMS** category on the Integrations page.

<Steps>
  <Step title="Open the SMS category">
    Go to **Integrations** and find the **SMS** category. Pick **Twilio**, **Plivo** or
    **Custom HTTP gateway**.
  </Step>

  <Step title="Paste your credentials">
    For **Twilio**: **Account SID** (starts `AC…`), **Auth token**, and **From number /
    Messaging Service SID** — either a Twilio number like `+1500…` or a Messaging Service SID
    starting `MG…`. DMLY works out which one you gave it.

    For **Plivo**: **Auth ID**, **Auth token**, and **Sender number**.

    For a **Custom HTTP gateway**: your send URL with the tokens `{to}`, `{text}` and `{from}`
    where the values belong, the **HTTP method** your gateway expects, an **Authorization
    header value** if it needs one, and a **Sender ID**.
  </Step>

  <Step title="Connect">
    For **Twilio** and **Plivo**, DMLY calls the provider's API to check the credentials —
    wrong ones fail here with the provider's own error rather than failing quietly later. The
    custom HTTP gateway is only checked for a non-empty send URL, so a wrong URL, method or
    Authorization header connects successfully and only shows up on the first send. Watch
    [Logs](/troubleshooting/logs) after connecting one.

    Connecting creates one workspace-wide SMS channel: *"Connecting provisions a
    workspace-wide SMS channel for broadcasts, the inbox and the "Send SMS" flow step."*
  </Step>

  <Step title="Set the webhook (Twilio and Plivo)">
    DMLY shows an **Inbound & delivery webhook** URL after you connect. Copy it and paste it
    into your provider's dashboard as both the inbound-message URL and the delivery-status
    URL. Nothing does this for you, and until it's set, replies won't arrive.

    In **Twilio**, it's on the number under **Phone Numbers → Active numbers**. In **Plivo**,
    it's under **Phone Numbers → Manage numbers**.
  </Step>
</Steps>

The webhook URL is specific to this gateway connection — don't reuse one from another
workspace or another provider.

<Note>
  The credentials are stored encrypted and never sent back to your browser. Disconnecting the
  gateway wipes them and removes the SMS channel. To change them, reconnect with the new
  values.
</Note>

Connecting an SMS gateway uses one channel against your plan, the same as any other channel.
Reconnecting the same gateway later doesn't use another.

## What you get

<Columns cols={2}>
  <Card title="Unified Inbox" icon="inbox" href="/inbox/overview">
    Replies land in the same Inbox as WhatsApp, with assignment and statuses. DMLY creates or
    matches a [Contact](/contacts/overview) by phone number.
  </Card>

  <Card title="Broadcasts" icon="bullhorn" href="/broadcasts/overview">
    Supported, with no window and no template queue.
  </Card>

  <Card title="Flows" icon="diagram-project" href="/automation/flow-builder">
    Inbound texts start and continue flows, with keyword matching like any other channel.
  </Card>

  <Card title="Send SMS from any flow" icon="paper-plane" href="/automation/flow-builder">
    The **Send SMS** step texts a contact's phone from a WhatsApp, Messenger or Instagram flow
    too — not just an SMS one.
  </Card>
</Columns>

SMS has no comments surface, so comment automations don't apply here.

## No messaging window

This is SMS's real advantage over Meta channels. There is no 24-hour window on SMS: you can
text a contact at any time, whether or not they have ever texted you, with no template and no
approval queue. Compare that with [WhatsApp's rules](/channels/whatsapp-limits), where an
automated message outside the window needs an approved template.

The trade-off is cost and reach — every SMS costs you money at your provider, and you only
get plain text.

## Broadcasts

SMS [broadcasts](/broadcasts/create-campaign) work like any other, minus the window filter and
the template step: you write the message, DMLY personalizes it per recipient, and it sends.
DMLY's own note on the step: *"Sent as a plain SMS via your connected gateway. Keep it concise
— long messages split into multiple segments."*

<Warning>
  **DMLY does not count segments, cap message length, or track what a broadcast costs you.**
  Long messages are passed to your gateway whole, and your provider bills you for however many
  segments that turns into. Watch spend in your Twilio or Plivo dashboard, not in DMLY.
</Warning>

Opted-out contacts are protected either way: a contact who has sent STOP is refused at send
time even if they're still in the audience. The audience-level filter that excludes them up
front only applies if you turn on the reachable-only audience option — so a broadcast to a
large segment will still show individual failures for people who opted out. That's expected.

## STOP and START are automatic

SMS opt-out is handled for you, and it runs before anything else — before flows, before
automations, before your bot ever sees the message.

A text whose whole body is one of these opts the contact out: `stop`, `stopall`, `stop all`,
`unsubscribe`, `cancel`, `quit`, `end`, `opt out`, `optout`. Case doesn't matter. When it
happens, DMLY marks the contact opted out, tags them **Unsubscribe**, cancels their active
flow runs and sequences, and writes a note in the conversation: *"🚫 Contact opted out (STOP)
— automated messages suppressed. Agents can still reply manually."*

`start`, `unstop`, `subscribe`, `opt in` or `optin` reverses it.

<Warning>
  **Don't ask people to reply CANCEL or END in an SMS flow.** Those are opt-out keywords — the
  reply unsubscribes the contact and kills the flow instead of doing what you meant. The match
  is on the whole message, so *"cancel my appointment"* is safe, but a bare *"cancel"* is not.
  Ask for a different word.
</Warning>

## Flows on SMS

Flows run on SMS with a smaller palette, because the channel is text-only. With SMS as the
flow's channel, the Messaging steps are limited to the plain text message and the question
step — the image, video, audio and file steps aren't offered. Everything in the Actions group
still works: tagging, assigning, handing over to a person, webhooks, and the rest.

So the SMS flows that make sense are the text-shaped ones:

* **Keyword auto-replies** — someone texts `HOURS`, you text back your opening times.
* **Ask a question and branch** — collect an answer, tag the contact, route the conversation.
* **Hand over to a person** — catch the reply and put it in front of an agent.
* **Notify and record** — tag, assign, or push to a webhook off the back of an inbound text.

Anything built around a picture, a menu of buttons, or a carousel belongs on WhatsApp.

<Tip>
  **Send SMS** works from any flow, on any channel. A WhatsApp flow can text an appointment
  reminder to someone who hasn't opened WhatsApp in days. It defaults to the contact's phone
  number, and it's deliberately forgiving: if there's no phone number or the gateway errors,
  the flow carries on to the next step and records the problem in
  [Logs](/troubleshooting/logs) rather than stopping the conversation. Check Logs if a text
  you expected never arrived.
</Tip>

<Note>
  You can't pick the gateway on a **Send SMS** step. If you have more than one connected, the
  step uses whichever one DMLY finds first — so connect only the gateway you want your flows to
  send through.
</Note>

## Limits

* **600 messages per minute** per SMS channel. Sends past that are throttled. Your provider
  has its own limits on top of this one.
* **Your provider's rules still apply** — sender registration, country restrictions, and
  per-message pricing are between you and Twilio or Plivo. DMLY doesn't check them for you.

## When replies don't arrive

Almost always the webhook. Work through this order:

1. **Is the webhook URL set in your provider's dashboard?** It isn't automatic. Reopen the
   gateway in **Integrations → SMS**, copy the **Inbound & delivery webhook** URL, and check
   it's set as both the inbound-message and status URL on your number.
2. **Is it the custom HTTP gateway?** Then inbound replies are never supported. Switch to
   Twilio or Plivo.
3. **Did the contact text STOP?** Opted-out contacts still reach your Inbox, but automated
   messages to them are suppressed. Look for the opt-out note in the conversation.
4. **Still nothing?** See [No inbound messages](/channels/no-inbound-messages) and
   [Logs](/troubleshooting/logs).

<Tip>
  Test from a phone that isn't the sending number. Text your DMLY number and watch the
  conversation appear in the Inbox, then reply from the Inbox and check it lands.
</Tip>
