> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://poly-ai.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://poly-ai.ferndocs.com/_mcp/server.

# Send SMS

> Trigger an SMS directly from Managed Topic actions

Add an SMS action to a Managed Topic so your agent can send text messages to callers during a conversation – for example, sending a link, confirmation, or reference number.

> **Note**
>
> You must complete the [SMS setup](/agent-studio/voice/message-templates) (connect Twilio, create templates) before you can add SMS actions to topics.

## How SMS actions work

When a topic with an SMS action is matched, the agent follows your prompt to determine *when* to send the message. Typically, you instruct the agent to ask for consent before sending – the SMS is not sent automatically just because the topic matches.

## Adding an SMS trigger

Add an SMS trigger to a topic's **Actions** field using any of these methods:

1. Type `/` in the Actions field and select **SMS**
2. Right-click in the Actions field and choose **SMS** from the menu
3. Click the **+** icon on the right side of the field and select **SMS**

![Adding an SMS action to a managed topic using the /sms command](/_fern-files/_img/6102e650753f426440935c046ffae1abe294a0a968ded1e1fd28bb3654a1653e.webp)

## Selecting the SMS template

1. After selecting **SMS**, choose an existing template from the dropdown.
2. To create a new template, click **+ add sms template**. You will be redirected to the [SMS](/agent-studio/voice/message-templates) section (**Messaging**) to define the message content and phone number.

## Writing the action prompt

The prompt tells the agent *when* and *how* to trigger the SMS. Always include a consent step so the agent asks before sending.

**Example prompt:**

```plaintext
After the caller confirms that they would like to receive an SMS message with further details, call {{SMS_template}} to send the SMS out.
```

**Example with a fallback:**

```plaintext
Offer to send the caller a text message with booking details. If they agree, call {{booking_confirmation_sms}}. If they decline, continue the conversation normally.
```

> **Tip**
>
> Always require explicit caller consent before sending SMS. This is both a best practice and a regulatory requirement in many regions.

## Related pages

#### [Handoff actions](/agent-studio/knowledge/fa-qs/actions/handoff)

Transfer callers to live agents from FAQs.

#### [Function invocation](/agent-studio/knowledge/fa-qs/actions/invoke-tool)

Call custom functions from topic actions.