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

Twilio Content Template Builder

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

A reusable, pre-approved message template system that abstracts channel-specific formatting, approval workflows, and variable substitution for multi-channel messaging.

About

The Twilio Content Template Builder skill enables developers to create, manage, and send structured message templates through the Content API across multiple channels including WhatsApp, SMS, RCS, and MMS. Templates are identified by a ContentSid and support variable substitution using sequential placeholders. WhatsApp templates require Meta approval before use outside the 24-hour service window. The skill covers template creation via Console or API, approval submission and status tracking, variable management with ratio constraints, and multi-channel sending with fallback support for RCS to SMS.

  • Create channel-agnostic templates with ContentSid identification system
  • Submit WhatsApp templates for Meta approval with category classification
  • Support variable substitution with sequential {{1}}, {{2}} placeholders and ratio constraints
  • Multi-channel delivery across WhatsApp, SMS, RCS, and MMS with media and interactive elements
  • Automatic SMS fallback for RCS rich templates via Messaging Service configuration

Twilio Content Template Builder by the numbers

  • 101 all-time installs (skills.sh)
  • +4 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #2,981 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/twilio/ai --skill twilio-content-template-builder

Add your badge

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

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

What it does

Create and manage pre-approved message templates across WhatsApp, SMS, RCS, and MMS channels using Twilio's Content API.

Who is it for?

Building customer notification systems, appointment reminders, authentication flows, and marketing campaigns that span multiple messaging channels with compliance requirements.

Skip if: Ad-hoc single-message sending, real-time dynamic message generation without pre-approval, or simple text-only SMS without structured templates.

When should I use this skill?

Building scalable messaging workflows that require template reuse, channel consistency, regulatory approval, or variable message personalization.

What you get

Developers can define templates once, manage approvals centrally, and send consistently formatted messages across channels with minimal code changes.

Files

SKILL.mdMarkdownGitHub ↗

Overview

The Content API creates channel-agnostic templates identified by a ContentSid (HX...). WhatsApp templates must be approved by Meta before use outside the 24-hour service window.

---

Prerequisites

  • Twilio account — New to Twilio? See twilio-account-setup
  • For WhatsApp templates: active WhatsApp sender

— See twilio-whatsapp-send-message (sandbox) or twilio-whatsapp-manage-senders (production)

  • 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

Step 1 — Create a template via Console (simplest)

Console > Messaging > Content Template Builder > Create new. Use {{1}}, {{2}} for variables. Save to get a ContentSid.

Step 2 — Send the template

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_="whatsapp:+14155238886",
    to="whatsapp:+15558675310",
    content_sid="HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    content_variables='{"1": "Sarah", "2": "March 28", "3": "10:00 AM"}'
)
print(message.sid)

Node.js

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

const message = await client.messages.create({
    from: "whatsapp:+14155238886",
    to: "whatsapp:+15558675310",
    contentSid: "HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    contentVariables: JSON.stringify({ "1": "Sarah", "2": "March 28", "3": "10:00 AM" }),
});

---

Key Patterns

Create a Template via API

Python

template = client.content.v1.contents.create(
    friendly_name="appointment-reminder",
    language="en",
    types={
        "twilio/text": {
            "body": "Hi {{1}}, your appointment is on {{2}} at {{3}}. Reply YES to confirm."
        }
    }
)
print(template.sid)  # HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Node.js

const template = await client.content.v1.contents.create({
    friendlyName: "appointment-reminder",
    language: "en",
    types: {
        "twilio/text": {
            body: "Hi {{1}}, your appointment is on {{2}} at {{3}}. Reply YES to confirm.",
        },
    },
});
console.log(template.sid);

Submit for WhatsApp Approval

Python

approval = client.content.v1 \
    .contents(template.sid) \
    .approval_requests \
    .create(name="appointment-reminder", category="UTILITY")
print(approval.status)  # PENDING

Node.js

const approval = await client.content.v1
    .contents(templateSid)
    .approvalRequests.create({ name: "appointment-reminder", category: "UTILITY" });
console.log(approval.status);

Categories: UTILITY, MARKETING, AUTHENTICATION

Check Approval Status

Python

content = client.content.v1.contents(template.sid).fetch()
print(content.approval_requests.status)  # APPROVED | REJECTED | PENDING

Node.js

const content = await client.content.v1.contents(templateSid).fetch();
console.log(content.approvalRequests.status);

Approval typically takes under 1 hour.

List and Delete Templates

Python

for template in client.content.v1.contents.list():
    print(template.sid, template.friendly_name, template.language)

client.content.v1.contents("HXxxxxxxxxxx").delete()

Node.js

const templates = await client.content.v1.contents.list();
templates.forEach(t => console.log(t.sid, t.friendlyName, t.language));

await client.content.v1.contents("HXxxxxxxxxxx").remove();

Supported Content Types

Typetypes keyChannels
Plain texttwilio/textAll
Media (image, video)twilio/mediaWhatsApp, MMS, RCS
Quick reply buttonstwilio/quick-replyWhatsApp, RCS
Call-to-action buttonstwilio/call-to-actionWhatsApp, RCS
List pickertwilio/list-pickerWhatsApp
Cardtwilio/cardRCS
Carouseltwilio/carouselRCS

RCS Fallback Text

When sending a rich RCS template (card, carousel, quick reply) via a Messaging Service with SMS fallback configured, Twilio uses the template's twilio/text body as the SMS fallback copy. Any template intended for RCS should include a twilio/text entry so recipients on non-RCS devices still receive a readable message.

---

Variable Rules

  • Use {{1}}, {{2}} — sequential, no skipping
  • Max 100 variables per template
  • Provide sample values for WhatsApp submissions
  • Non-variable to variable ratio must be at least (2x + 1) : x

---

CANNOT

  • Cannot use WhatsApp templates without Meta approval — Plan for up to 24 hours review time
  • Cannot resubmit a rejected template with the same name — Use a different name for resubmission
  • Cannot include custom variables in AUTHENTICATION templates — Fixed format required by Meta

---

Next Steps

  • Channel overview and onboarding guide: twilio-messaging-overview
  • Send WhatsApp messages: twilio-whatsapp-send-message
  • Register a production WhatsApp sender: twilio-whatsapp-manage-senders

Related skills

Backend & APIsbackendintegrations

This week in AI coding

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

unsubscribe anytime.