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

# SMS (Twilio)

> Send and receive SMS via Twilio

<Note>
  **Requires a paid service.** Twilio provides Fliiq with its own phone number. If you're just getting started with channels, [Telegram](/channels/telegram) (free) or [Gmail](/channels/email) (free) are easier entry points.
</Note>

Fliiq gets its own phone number via Twilio. This isn't your personal phone — Fliiq has its own number that it sends and receives SMS from. You text Fliiq's number from your phone, and Fliiq responds from its number.

Fliiq sends and receives SMS through Twilio's REST API. No SDK dependency — uses `httpx` directly.

## Setup

1. Create a [Twilio account](https://console.twilio.com/)
2. Get a phone number from the Twilio console — this becomes Fliiq's number
3. Add credentials to `.env`:

```bash .env theme={null}
TWILIO_ACCOUNT_SID=AC...
TWILIO_AUTH_TOKEN=...
TWILIO_PHONE_NUMBER=+1234567890
```

<Note>
  Twilio trial accounts can only send to verified phone numbers. Upgrade for unrestricted sending.
</Note>

## Skills

### send\_sms

Send a text message from Fliiq's number.

```
"Send a text to +1555123456 saying the deployment is complete"
```

### receive\_sms

Fetch recent inbound SMS messages to Fliiq's number. Filters for inbound direction only, default 1-hour lookback window.

```
"Check if I received any text messages in the last hour"
```

## Persistent Session Store

Outbound SMS sent via `send_sms` is logged to a per-phone-number session store at `.fliiq/sms_sessions/`. This gives Fliiq a persistent record of SMS exchanges per contact, consistent with how the email and Telegram channels handle conversation history.

## Usage in Jobs

```yaml theme={null}
name: fitness-nudge
trigger:
  type: cron
  schedule: "0 17 * * *"       # 5pm daily
prompt: "Check my fitness memory and send me a motivational workout reminder"
delivery:
  type: sms
  to: "+1555123456"
```
