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

# Send Sms

> Documentation for the Send Sms action for Twilio

![images/twilio.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/twilio.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=0ddbfae33d1230db539e576099bfbc9d)

## Getting Started

With the Twilio SMS integration, send SMS messages to your customers through workflows. To send messages to US phone numbers, we need to register your brand and campaigns with [US A2P 10DLC](https://help.twilio.com/articles/1260800720410-What-is-A2P-10DLC-) (Application-to-Person 10-Digit Long Code) requirements.

Before you can send SMS messages to US numbers through Morf, we need to complete brand and campaign registration with US A2P 10DLC. This process helps ensure message deliverability and compliance with carrier requirements.

If you have an existing Twilio account you'd prefer to use instead of a Morf-provisioned one, see the [Using your own Twilio account](#using-your-own-twilio-account) section.

## Brand Registration Requirements

To register your brand, please provide us with the following information:

* **Legal business name** - The official registered name of your business
* **Business type** - Your business entity type (Corporation, LLC, Partnership, Sole Proprietorship, etc.)
* **EIN (Employer Identification Number)** - Your federal tax identification number

## Campaign Registration Requirements

For each SMS campaign you want to run, we need the following details:

### Campaign Details

* **Use case description** - The primary purpose of your SMS campaign (Marketing, Customer Care, Account Notifications, etc.)
* **Campaign description** - A detailed explanation of what this specific campaign will accomplish

### Message Information

* **Sample messages** - At least 2 examples of messages you plan to send through this campaign
* **Content details** - Whether your messages will include:
  * Phone numbers
  * Embedded links or URLs
* **An estimate of daily volume** - How many messages you expect to send per day

### Consent and Opt-in Process

* **Consent description** - How users agree to receive messages from your campaign (website signup, in-person consent, etc.)
* **Opt-in keywords** (if applicable) - Keywords customers can text to subscribe to your campaign
* **Auto-reply message** (if applicable) - The automatic response sent when customers subscribe via text (must include supported unsubscribe keywords)

## Next Steps

Once you provide this information:

1. Our team will submit your brand and campaign registrations to the carriers
2. We'll notify you when the registration process is complete
3. You can then configure your Twilio SMS integration in Morf workflows

**Note:** The A2P 10DLC registration process typically takes **2-3 weeks** to complete. We recommend submitting your information as early as possible to avoid delays in your campaign launch.

## Using Your Own Twilio Account

1. Retrieve your Twilio Account SID and Auth Token from the [Twilio Console](https://console.twilio.com/) under **Account Info**.
2. In the Twilio Console, go to **Messaging > Services** and copy the **Service SID** of the desired Messaging Service.
3. In the Morf dashboard, navigate to **Integrations**, select **Twilio (External Account)**, and enter the required information.

Morf will now use your Twilio account to send SMS messages.

# Parameters

**Action** `Parameters`

**parameters**

**To** `string` *required*

`PII`
This field maps to the destination API `to` field.

**Body** *required*

`HI` `ID` `PII`
This field maps to the destination API `body` field.

**Subscription Topic** `string (Subscription Topic)` *required*

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "date_created": "2025-01-17T10:57:05Z",
    "date_sent": "2025-01-17T10:57:05Z"
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "date_created": "When the message resource was created",
    "date_sent": "When the message was sent"
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**MessageSent** `Fetch Action Response Object`

**fields**

**date\_created** `timing.v1.Timestamp`

When the message resource was created

```json CEL theme={null}
$result_object_key.date_created
```

```json Example theme={null}
"2025-01-17T10:57:05Z"
```

**date\_sent** `timing.v1.Timestamp`

When the message was sent

```json CEL theme={null}
$result_object_key.date_sent
```

```json Example theme={null}
"2025-01-17T10:57:05Z"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.