# Twilio

Send SMS/WhatsApp via Twilio; manage messages, numbers, and lookups. Exposes **21 actions** covering the full API surface
the agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `twilio_get_account` | Get authenticated account info - GET /Accounts/&#123;account_sid&#125;. |
| `twilio_list_messages` | List messages - GET /Accounts/&#123;account_sid&#125;/Messages. |
| `twilio_get_message` | Get one message - GET /Accounts/&#123;account_sid&#125;/Messages/&#123;message_sid&#125;. |
| `twilio_send_message` | Send an SMS or MMS message - POST /Accounts/&#123;account_sid&#125;/Messages. |
| `twilio_update_message` | Update a message - POST /Accounts/&#123;account_sid&#125;/Messages/&#123;message_sid&#125;. |
| `twilio_redact_message` | Redact (delete content of) a message - POST /Accounts/&#123;account_sid&#125;/Messages/&#123;message_sid&#125;. |
| `twilio_list_calls` | List calls - GET /Accounts/&#123;account_sid&#125;/Calls. |
| `twilio_get_call` | Get one call - GET /Accounts/&#123;account_sid&#125;/Calls/&#123;call_sid&#125;. |
| `twilio_make_call` | Make a phone call - POST /Accounts/&#123;account_sid&#125;/Calls. |
| `twilio_list_incoming_phone_numbers` | List incoming phone numbers - GET /Accounts/&#123;account_sid&#125;/IncomingPhoneNumbers. |
| `twilio_get_incoming_phone_number` | Get one incoming phone number - GET /Accounts/&#123;account_sid&#125;/IncomingPhoneNumbers/&#123;sid&#125;. |
| `twilio_buy_phone_number` | Buy a phone number - POST /Accounts/&#123;account_sid&#125;/IncomingPhoneNumbers. |
| `twilio_release_phone_number` | Release (delete) an incoming phone number - DELETE /Accounts/&#123;account_sid&#125;/IncomingPhoneNumbers/&#123;sid&#125;. |
| `twilio_list_outgoing_caller_ids` | List outgoing caller IDs - GET /Accounts/&#123;account_sid&#125;/OutgoingCallerIds. |
| `twilio_get_outgoing_caller_id` | Get one outgoing caller ID - GET /Accounts/&#123;account_sid&#125;/OutgoingCallerIds/&#123;sid&#125;. |
| `twilio_create_outgoing_caller_id` | Add an outgoing caller ID (verify a phone number) - POST /Accounts/&#123;account_sid&#125;/OutgoingCallerIds. |
| `twilio_delete_outgoing_caller_id` | Delete an outgoing caller ID - DELETE /Accounts/&#123;account_sid&#125;/OutgoingCallerIds/&#123;sid&#125;. |
| `twilio_list_available_phone_numbers` | List available phone numbers to buy - GET /Accounts/&#123;account_sid&#125;/AvailablePhoneNumbers/&#123;iso_country&#125;. |
| `twilio_create_verification` | Create a verification code - POST /Services/&#123;service_sid&#125;/Verifications. |
| `twilio_check_verification` | Check a verification code - POST /Services/&#123;service_sid&#125;/VerificationCheck. |
| `twilio_lookup_phone_number` | Lookup a phone number for carrier/name info - GET /PhoneNumbers/&#123;phone_number&#125;. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`TWILIO_ACCOUNT_SID`** - Twilio Console dashboard. (https://console.twilio.com/)
- **`TWILIO_AUTH_TOKEN`** - Twilio Console dashboard.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `TWILIO_ACCOUNT_SID` | Twilio Console dashboard. |
| `TWILIO_AUTH_TOKEN` | Twilio Console dashboard. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope - regenerate it.
- **`429 Too Many Requests`** - you hit the provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Twilio API documentation](https://www.twilio.com/docs/usage/api)
