Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
twilio avatar

Twilio Send Message

  • 676 installs
  • 26 repo stars
  • Updated July 29, 2026
  • twilio/ai

Twilio unified send message skill for SMS MMS WhatsApp via Messages API.

About

Twilio send message skill for the unified Messages API across SMS, MMS, and WhatsApp channels. Covers channel selection, From number or Messaging Service configuration, media attachments for MMS, WhatsApp template requirements, compliance and opt-out handling, and status callback webhooks. Broader than twilio-sms-send-message by supporting multi-channel message sends. Documents helper library and REST patterns with Account SID and Auth Token environment setup for agent-built messaging integrations.

  • Unified Twilio Messages API for SMS MMS and WhatsApp
  • Messaging Service or From number channel configuration
  • WhatsApp template and media attachment requirements
  • Compliance opt-out and status callback patterns
  • Multi-channel beyond SMS-only send skill

Twilio Send Message by the numbers

  • 676 all-time installs (skills.sh)
  • +9 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #543 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

twilio-send-message capabilities & compatibility

Capabilities
send sms · send mms · send whatsapp · configure messaging service
Use cases
api development · email
Runs
Remote server
Pricing
Paid
npx skills add https://github.com/twilio/ai --skill twilio-send-message

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs676
repo stars26
Last updatedJuly 29, 2026
Repositorytwilio/ai

How do I send a message via Twilio across SMS or WhatsApp?

Send messages via Twilio unified messaging API covering SMS, MMS, and WhatsApp channel selection with compliance patterns.

Who is it for?

Developers integrating Twilio multi-channel messaging into applications.

Skip if: Voice-only or email-only Twilio features.

When should I use this skill?

User needs Twilio send message across SMS MMS or WhatsApp channels.

What you get

Message sent via correct Twilio channel with compliance and callback configuration.

Files

SKILL.mdMarkdownGitHub ↗

Overview

A single `messages.create()` call sends on any messaging channel — SMS, MMS, RCS, or WhatsApp. The channel is determined by the sender address and the recipient's capabilities. For channel selection guidance and the full onboarding sequence, see twilio-messaging-overview and twilio-messaging-channel-advisor.

Channelto formatNotesTemplate required?
SMS/MMS+15551234567MMS: US/CA/AU onlyNo
RCS (with SMS fallback)+15551234567Send via Messaging Service that has both an RCS sender and an SMS sender — Twilio attempts RCS first, falls back to SMS on failureNo
RCS (no fallback)rcs:+15551234567Forces RCS only — fails if recipient isn't RCS-capableNo
WhatsAppwhatsapp:+15551234567Send via whatsapp:-prefixed fromOutside 24-hr window: yes

For production: Send via messagingServiceSid instead of from. This enables sender pool management, RCS→SMS fallback, SMS pumping protection, link shortening, compliance toolkit, and scheduling. See twilio-messaging-services.

---

Prerequisites

  • Twilio account — New to Twilio? See twilio-account-setup
  • Environment variables: TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN — see twilio-iam-auth-setup
  • SDK: pip install twilio / npm install twilio
  • Channel-specific senders:
  • SMS/MMS: a Twilio phone number (see twilio-account-setup)
  • RCS: an RCS sender added to a Messaging Service (see twilio-rcs-messaging)
  • WhatsApp: an active WhatsApp sender (see twilio-whatsapp-send-message for sandbox, twilio-whatsapp-manage-senders for production)

---

Quickstart

Python

import os
from twilio.rest import Client

client = Client(os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_AUTH_TOKEN"])

# SMS
sms = client.messages.create(
    from_="+15017122661",
    to="+15558675310",
    body="Your order has shipped."
)

# RCS — forces RCS only, no fallback
rcs = client.messages.create(
    messaging_service_sid="MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    to="rcs:+15558675310",
    body="Your order has shipped."
)

# WhatsApp
whatsapp = client.messages.create(
    from_="whatsapp:+15017122661",
    to="whatsapp:+15558675310",
    body="Your order has shipped."
)

# Via Messaging Service (recommended — attempts RCS first, falls back to SMS)
msg = client.messages.create(
    messaging_service_sid="MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    to="+15558675310",
    body="Your order has shipped."
)

Node.js

const client = require("twilio")(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);

// SMS
const sms = await client.messages.create({
    from: "+15017122661",
    to: "+15558675310",
    body: "Your order has shipped.",
});

// RCS — forces RCS only, no fallback
const rcs = await client.messages.create({
    messagingServiceSid: "MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    to: "rcs:+15558675310",
    body: "Your order has shipped.",
});

// WhatsApp
const whatsapp = await client.messages.create({
    from: "whatsapp:+15017122661",
    to: "whatsapp:+15558675310",
    body: "Your order has shipped.",
});

// Via Messaging Service (attempts RCS first, falls back to SMS)
const msg = await client.messages.create({
    messagingServiceSid: "MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    to: "+15558675310",
    body: "Your order has shipped.",
});

---

Key Patterns

Send with media (MMS, WhatsApp, RCS)

client.messages.create(
    from_="+15017122661",
    to="+15558675310",
    body="Here is your invoice.",
    media_url=["https://example.com/invoice.pdf"]
)

Supported: images (JPEG, PNG, GIF), PDF, audio, video. 5 MB max per attachment.

Send a template (WhatsApp required outside 24-hr window; RCS rich content)

client.messages.create(
    messaging_service_sid="MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    to="+15558675310",
    content_sid="HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    content_variables='{"1": "Sarah", "2": "12345"}'
)

See twilio-content-template-builder for building templates.

Track delivery status

client.messages.create(
    messaging_service_sid="MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    to="+15558675310",
    body="Hello!",
    status_callback="https://yourapp.com/status"
)

Twilio POSTs at each state transition: queued → sent → delivered (or failed/undelivered).

Configure RCS→SMS fallback

Configured on the Messaging Service, not per-message. Add both an RCS sender and an SMS sender to the same Messaging Service. Twilio attempts RCS first and falls back to SMS on failure. See twilio-messaging-services and twilio-rcs-messaging.

---

Common Errors

CodeMeaningFix
21211Invalid to numberValidate E.164 format
21408Region not permittedEnable geo-permissions in Console
21610Recipient opted outDo not retry; respect opt-out
21664FallbackFrom cannot be used with From senderUse messaging_service_sid instead of from
21666FallbackFrom requires MessagingServiceSidSend via a Messaging Service
21667FallbackFrom requires an RCS Sender on the Messaging ServiceAdd an RCS sender before configuring fallback
30003Unreachable destinationCarrier cannot deliver
30007Message filtered as spamReview content and sender reputation
30034US A2P 10DLC — sender not registeredRegister brand + campaign. See twilio-compliance-onboarding
30036Validity Period expiredMessage aged out. Often indicates RCS fallback is misconfigured
63036RCS recipient unreachableConfigure SMS fallback on the Messaging Service

---

CANNOT

  • Cannot send cross-channel in a single API call. One messages.create() = one channel. For multi-channel fallback, use RCS→SMS via a Messaging Service, or implement sequencing in your app.
  • Cannot send WhatsApp free-form outside the 24-hour service window. Use a pre-approved template (content_sid). See twilio-whatsapp-send-message.
  • Cannot send MMS outside US/Canada. For international rich media, use WhatsApp or RCS.
  • Cannot configure RCS→SMS fallback without a Messaging Service. Raw from sends don't support FallbackFrom.
  • Cannot guarantee delivery on any channel. Always implement status callbacks.

---

Next Steps

  • Pick a channel for your use case: twilio-messaging-channel-advisor
  • Full messaging platform overview: twilio-messaging-overview
  • Channel-specific deep dives: twilio-sms-send-message, twilio-rcs-messaging, twilio-whatsapp-send-message
  • Sender pools, fallback, production features: twilio-messaging-services
  • Build templates (cards, carousels, quick replies): twilio-content-template-builder
  • Handle inbound messages and status callbacks: twilio-messaging-webhooks
  • US A2P 10DLC compliance: twilio-compliance-onboarding
  • OTP / verification use cases: twilio-verify-send-otp

Related skills

FAQ

How does this differ from twilio-sms-send-message?

This skill covers unified multi-channel sends including MMS and WhatsApp, not SMS only.

What about WhatsApp?

WhatsApp requires approved templates and specific From configuration per Twilio docs.

What credentials are needed?

TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN from the Twilio console.

Backend & APIsintegrationsbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.