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

# SMS Channel

> Send text message alerts and OTP codes

The `SMS` channel transmits text messages to mobile devices.

## Mock Gateway (Development)

By default, the SMS channel runs in a **Mock Simulator** mode during local development. When a notification is dispatched with `channel: "SMS"`, the worker logs the message text and records a successful delivery attempt immediately. This prevents unnecessary carrier fees while testing integration flows.

***

## Twilio Gateway (Production)

In production, you can select the Twilio provider to deliver text messages over real carriers.

### What the interface looks like

Under **Providers** in the dashboard, configure the following keys:

* **Account SID:** Set as your provider username.
* **Auth Token:** Configured as the secure API key.
* **From Number:** The Twilio phone number (+1...) authorized to send SMS.

***

## SMS Payload requirements

* **Recipient Format:** The recipient field must contain a valid phone number in international E.164 format (e.g. `+15555555555`).
* **Content Limits:** Avoid exceeding **160 characters** in your message body to prevent carriers from splitting your text into multiple billable segments.

***

## Developer Implementation

To send text messages or OTP passcodes, trigger a notification with `channel: "SMS"`. Recipient addresses must be formatted in E.164 notation.

```typescript theme={null}
const response = await fetch("https://notifyflow-api.onrender.com/api/v1/notify", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.NOTIFYFLOW_API_KEY
  },
  body: JSON.stringify({
    channel: "SMS",
    recipient: "+15555555555", // International format
    rawBody: "Your Shopwave login verification code is 482910. Expires in 10 minutes.",
    priority: "HIGH"
  })
});

const data = await response.json();
console.log("Ingested SMS ID:", data.notificationId);
```
