twilio-sms-send-message
This skill provides SMS and MMS sending through Twilio's Messaging API, with detailed guidance on error codes, delivery troubleshooting, and SMS-specific…
Identity proven by GitHub's verified organisation badge (twilio)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- MIT (permissive)
- Pin
- 8aba46fpinned Oct 9, 2026
- Context cost
- about 1,800 tokenswhen the skill loads
- GitHub stars
- 37on twilio/ai
- Scripts
- None found
What it does
“SMS and MMS deep-dive reference. Covers SMS-specific error codes, message filtering troubleshooting ("Messages Being Filtered or Blocked?" diagnostic checklist), MMS media support (US/CA/AU only), and SMS pumping indicators. For sending SMS, use twilio-send-message instead. Use this skill only when debugging SMS delivery issues or needing SMS-specific details not in the consolidated send skill.”
Generated summary from the skill's own text
This skill provides SMS and MMS sending through Twilio's Messaging API, with detailed guidance on error codes, delivery troubleshooting, and SMS-specific constraints. It covers sending text messages globally, attaching media in supported regions, tracking delivery status via callbacks, and diagnosing why messages get filtered or blocked. Use the main send-message skill for straightforward sending; this skill focuses on debugging issues and understanding SMS platform specifics.
When to use it
- Debugging SMS delivery failures or carrier filtering issues
- Sending time-sensitive alerts or OTPs to phone numbers globally
- Understanding SMS pumping protection and error codes like 30034 or 30007
- Determining whether SMS suits your use case versus WhatsApp or other channels
When not to
- Sending simple SMS without debugging needs; use twilio-send-message instead
- Sending rich media internationally outside US, Canada, and Australia
- Marketing campaigns; use twilio-marketing-promotions-advisor instead
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add twilio/ai --skill twilio-sms-send-messageInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install twilio/ai twilio-sms-send-message@8aba46fb65dc8d9a20f4b301a68352064b4159a5Installs the commit we checked (8aba46f).
Copy by hand
Download the folder at 8aba46f and put it in .claude/skills/twilio-sms-send-message for Claude Code and in .agents/skills/twilio-sms-send-message for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install twilio-developer-kit@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "twilio-sms-send-message" by Twilio. Source, pinned to commit 8aba46fb65dc8d9a20f4b301a68352064b4159a5: https://github.com/twilio/ai/tree/8aba46fb65dc8d9a20f4b301a68352064b4159a5/skills/twilio/twilio-sms-send-message 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/twilio-sms-send-message/ for Claude Code and .agents/skills/twilio-sms-send-message/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/twilio/twilio-sms-send-message
SKILL.md at the pin
---
name: twilio-sms-send-message
description: >
SMS and MMS deep-dive reference. Covers SMS-specific error codes,
message filtering troubleshooting ("Messages Being Filtered or Blocked?"
diagnostic checklist), MMS media support (US/CA/AU only), and SMS pumping
indicators. For sending SMS, use twilio-send-message instead. Use this
skill only when debugging SMS delivery issues or needing SMS-specific
details not in the consolidated send skill.
---
## Overview
**SMS is one channel in Twilio's Messaging platform.** All channels — SMS, WhatsApp, RCS, Facebook Messenger — share the same `messages.create()` API. See `twilio-messaging-overview` for the full channel comparison and onboarding sequence.
| When to use SMS | When to consider alternatives |
|----------------|------------------------------|
| Reach any phone number globally | Need rich media outside US/CA/AU → WhatsApp |
| No app install required | Opted-in audience prefers chat apps → WhatsApp |
| Time-sensitive alerts (OTP, outage) | Marketing campaigns → `twilio-marketing-promotions-advisor` |
| Regulatory/compliance requires SMS | Cost-sensitive high-volume → WhatsApp (lower per-msg cost in many markets) |
**For production SMS:** Use a Messaging Service (`messagingServiceSid`) instead of a raw `from` number. It enables sender pool management, compliance toolkit, SMS pumping protection, link shortening, and message scheduling. See `twilio-messaging-services`.
Every outbound SMS requires a `from` Twilio number (or `messagingServiceSid`) and a `to` recipient — both in E.164 format.
---
## Prerequisites
- Twilio account with an SMS-capable phone number
— New to Twilio? See `twilio-account-setup` for signup, getting a number, and trial limitations
- Environment variables:
- `TWILIO_ACCOUNT_SID`
- `TWILIO_AUTH_TOKEN`
— See `twilio-iam-auth-setup` for credential setup and best practices
- SDK: `pip install twilio` / `npm install twilio`
---
## Quickstart
**Python**
```python
import os
from twilio.rest import Client
client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])
message = client.messages.create(
from_="+15017122661", # Your Twilio number (E.164)
to="+15558675310", # Recipient (E.164)
body="Your appointment is confirmed for tomorrow at 2pm."
)
print(message.sid) # SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
print(message.status) # queued | sent | delivered | failed
```
**Node.js**
```node
const twilio = require("twilio");
const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
const message = await client.messages.create({
from: "+15017122661",
to: "+15558675310",
body: "Your appointment is confirmed for tomorrow at 2pm.",
});
console.log(message.sid);
console.log(message.status);
```
---
## Key Patterns
### Send MMS (with media)
**Python**
```python
message = client.messages.create(
from_="+15017122661",
to="+15558675310",
body="Here is your invoice.",
media_url=["https://example.com/invoice.pdf"]
)
```
**Node.js**
```node
const message = await client.messages.create({
from: "+15017122661",
to: "+15558675310",
body: "Here is your invoice.",
mediaUrl: ["https://example.com/invoice.pdf"],
});
```
Supported media types: images (JPEG, PNG, GIF), PDF, audio, video. Max 5 MB per message.
### Send via Messaging Service (recommended for scale)
Use `messagingServiceSid` instead of `from` — Twilio picks the best sender automatically from your pool.
**Python**
```python
message = client.messages.create(
messaging_service_sid="MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
to="+15558675310",
body="Your order has shipped."
)
```
**Node.js**
```node
const message = await client.messages.create({
messagingServiceSid: "MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
to: "+15558675310",
body: "Your order has shipped.",
});
```
### Track Delivery Status
**Python**
```python
message = client.messages.create(
from_="+15017122661",
to="+15558675310",
body="Hello!",
status_callback="https://yourapp.com/sms-status"
)
```
**Node.js**
```node
const message = await client.messages.create({
from: "+15017122661",
to: "+15558675310",
body: "Hello!",
statusCallback: "https://yourapp.com/sms-status",
});
```
Twilio POSTs to your URL at each transition: `queued → sent → delivered` (or `failed`/`undelivered`).
---
## Response Fields
| Field | Description |
|-------|-------------|
| `sid` | Message identifier (`SM...`) |
| `status` | `queued`, `sent`, `delivered`, `undelivered`, `failed` |
| `error_code` | Populated on failure |
| `error_message` | Human-readable description |
| `price` | Cost (populated after delivery) |
| `date_sent` | UTC timestamp |
---
## Common Errors
| Code | Meaning | Fix |
|------|---------|-----|
| 21211 | Invalid `to` number | Validate E.164 format |
| 21408 | Permission to send to region not enabled | Enable geo-permissions in Console |
| 21610 | Number is on blocklist (opted out) | Do not retry; respect opt-out |
| 30003 | Unreachable destination | Carrier cannot deliver; try later |
| 30007 | Message filtered as spam | Review content and sender reputation |
| 30034 | Message from unregistered number | Complete A2P 10DLC registration — see `twilio-compliance-onboarding` |
| 30450 | SMS pumping detected | Message blocked by SMS pumping protection — see `twilio-messaging-services` |
### Messages Being Filtered or Blocked?
If your messages aren't being delivered, check these causes in order:
1. **Unregistered sender (error 30034)** — US 10DLC numbers must be registered. See `twilio-compliance-onboarding`
2. **Spam filtered (error 30007)** — Carrier flagged content. Check: opt-out language included? URL shorteners avoided? Content matches registered campaign?
3. **Opted-out recipient (error 21610)** — Recipient sent STOP. Do not retry. See `twilio-compliance-traffic`
4. **Geo-permissions disabled (error 21408)** — Enable the destination country in Console > Messaging > Settings > Geo Permissions. See `twilio-security-hardening`
5. **SMS pumping (error 30450)** — Artificial traffic detected. Whitelist known prefixes via Global Safe List. See `twilio-messaging-services`
6. **Account suspended** — Check Console for account status notifications. See `twilio-account-setup`
For delivery event tracking, set up StatusCallbacks or use `twilio-debugging-observability`.
---
## CANNOT
- **Cannot send without E.164 format** — Both `from` and `to` must be `+` followed by country code and number
- **Cannot send to unverified numbers on trial accounts** — Upgrade to paid or verify recipient numbers first
- **Cannot send MMS outside US, Canada, and Australia** — MMS is only supported on US/CA/AU numbers; for international rich media use WhatsApp
- **Cannot exceed 1,600 characters per message** — Longer messages are automatically split into segments (each billed separately)
- **Cannot prevent SMS pumping without a Messaging Service** — Enable SMS pumping protection via Messaging Services to prevent artificial traffic inflation. See `twilio-messaging-services`
---
## Next Steps
- **Channel overview and onboarding guide:** `twilio-messaging-overview`
- **Receive inbound SMS and delivery status:** `twilio-messaging-webhooks`
- **Manage sender pools at scale:** `twilio-messaging-services`
- **US compliance for A2P traffic:** `twilio-compliance-onboarding`
- **Send via WhatsApp instead:** `twilio-whatsapp-send-message`
From twilio/ai at 8aba46f, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 8aba46fFiles
- SKILL.md7.6 KB · 115fd1a596ac
- agents/
- openai.yaml427 B · 6b56302ae540
- assets/
- icon-large.png9.6 KB · 0ba822e01172
- icon-small.png5.6 KB · 400e3f49b6c1
4 files, 23 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 8aba46fMore from Twilio
twilio-account-setup
Sets up a Twilio account from scratch, including free trial signup, credential retrieval, phone number purchase, and enabling specific products like AI…
Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago
twilio-agent-augmentation-architect
This skill helps developers design AI-augmented contact center systems that enhance human agents with real-time intelligence.
Claude Code, Codex, Cursor +3 · about 3.6K tokens · pinned 6 days ago
twilio-agent-connect
Twilio Agent Connect is middleware that integrates LLM agents with Twilio communication channels (voice, SMS, RCS, WhatsApp, chat).
Claude Code, Codex, Cursor +4 · about 4.1K tokens · pinned 6 days ago
twilio-ai-agent-architect
Planning skill that helps developers design AI-powered conversational agents by assessing their use case across outcome sophistication, channels, and customer…
Claude Code, Codex, Cursor +3 · about 4.9K tokens · pinned 6 days ago
twilio-call-recordings
This skill teaches agents to record Twilio voice calls correctly using the appropriate method for the use case.
Claude Code, Codex, Cursor +4 · about 2.6K tokens · pinned 6 days ago
twilio-cli-reference
The Twilio CLI reference enables agents to manage Twilio resources directly from the terminal, including phone number provisioning, sending SMS and email…
Claude Code, Codex, Cursor +4 · about 1.8K tokens · pinned 6 days ago
Related in Backend and APIs
twilio-conference-calls
This skill enables multi-party call handling using Twilio Conference, covering warm and cold transfers, hold versus mute, supervisor coaching with whisper…
by TwilioOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.8K tokens · pinned 6 days ago
twilio-content-template-builder
This skill enables agents to create, manage, and send message templates through Twilio's Content API across WhatsApp, SMS, RCS, and MMS channels.
by TwilioOfficial publisher
Claude Code, Codex, Cursor +4 · about 1.3K tokens · pinned 6 days ago
twilio-conversation-orchestrator
This skill configures Twilio Conversation Orchestrator to automatically capture and route SMS, voice, WhatsApp, RCS, and web chat into unified conversations.
by TwilioOfficial publisher
Claude Code, Codex, Cursor +4 · about 8.3K tokens · pinned 6 days ago
twilio-conversations-classic-api
Build multi-channel messaging conversations using Twilio's classic API, combining SMS, WhatsApp, and web chat participants in persistent threads with message…
by TwilioOfficial publisher
Claude Code, Codex, Cursor +4 · about 4.2K tokens · pinned 6 days ago
twilio-iam-auth-setup
This skill guides agents through setting up Twilio authentication methods including Auth Tokens, API Keys (Standard, Main, Restricted), Access Tokens for…
by TwilioOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago
twilio-isv-sms-best-practices
This skill guides ISVs building multi-tenant SMS platforms on Twilio through subaccount architecture, customer onboarding for A2P 10DLC and toll-free…
by TwilioOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.7K tokens · pinned 6 days ago