Skip to contentSkip to navigationSkip to topbar
On this page

Create templates with the Content Template Builder in Console


The Content Template Builder in Console guides you through creating and managing templates for channels such as WhatsApp, RCS, Facebook Messenger, MMS, and SMS. Content Templates let you deliver consistent messages to your customers on their preferred channels. The builder uses universal templates that support shared capabilities across channels.


Start creating templates

start-creating-templates page anchor

Access the Template Builder

access-the-template-builder page anchor

If Messaging doesn't appear in the Develop sidebar, select Explore Products, and pin Messaging.

Twilio console showing Messaging setup for SMS, MMS, WhatsApp with documentation link.

Select Messaging, and then choose Content Template Builder from the dropdown list.

Twilio Content Editor interface showing template SID, language, content type, WhatsApp eligibility, and last updated date.

Select Create new to start a template.

Twilio Content Editor screen with options to create new templates and view existing ones with details.

General information

general-information page anchor
  1. Template name: Enter a name for the template. This value is also submitted to WhatsApp for approval.
  2. Template language: Select the language of the template.
  3. Select content type: Choose the type of content the template will contain.
(information)

Info

Not all template types that are available in the Content API are available in the Content Template Builder. We will add more template types over time. If you need to use twilio/card, twilio/list, or twilio/location templates now, use the Content API.

New Content Template screen with fields for Template Name, Language, and a Call to Action content type selection.

Preview sample content template and supported channels

preview-sample-content-template-and-supported-channels page anchor

Supported channels appear on the template listing page and template detail pages.

Call to Action setup screen with channels WhatsApp & Facebook Messenger, showing Twilio support and website visit messages.

Fill out the template fields

fill-out-the-template-fields page anchor

Each content type has its own fields. For more information, see Content Types Overview. The following example uses a twilio/call-to-action template.

  1. Body: The message content.

  2. Add buttons: Action buttons that are attached to the template. A twilio/call-to-action template can have up to two buttons.

    • Type of action: The button type.
    • Button text: Text displayed on the button.
    • URL: A dynamic or static URL. Only one URL button is allowed.
    • Phone: A phone number in E.164 format that's called when the user selects the button. Only one phone-number button is allowed.
Call to Action content setup with template info and channels like WhatsApp and Facebook Messenger, awaiting approval.

Add variables by selecting +Add Variable (shown below) or by typing the variable with {{}} notation.

To delete a variable, press the Delete or Backspace key.

Configure text content with flight update template, supporting WhatsApp, Facebook Messenger, and SMS channels.

Variable samples are required in templates that contain media and in templates that require WhatsApp approval. Twilio recommends providing samples for all variables so that messages have fallback text if a variable is undefined at send time. Samples can be set when you select Save or Save and submit for WhatsApp approval. The requirement for samples depends on the template type and whether you submit the template for WhatsApp approval.

Add sample to variables screen with fields for flight number and other variables for WhatsApp template approval.

You can include up to 100 variables in a template. Templates submitted to WhatsApp must follow a non-variable-to-variable word ratio of at least (2x + 1) non-variable words for every x variables.

When you send templates out of session on WhatsApp, the following rules apply. For additional guidance on avoiding template rejections, see Create WhatsApp message templates and submit them for approval.

  • Variables must be numbered sequentially without skipping integers.
    • Not allowed: "body": "Hi {{1}}, Your flight will depart from gate {{3}}. Please reply STOP to unsubscribe."
    • Allowed: "body": "Hi {{1}}, Your flight will depart from gate {{2}}. Please reply STOP to unsubscribe."
  • Variables shouldn't be adjacent.
    • Not in line with best practice: "body": "Hi {{1}} {{2}}, your flight will depart from gate {{3}}. Please reply STOP to unsubscribe."
    • Best practice: "body": "Hi {{1}} and {{2}}, your flight will depart from gate {{3}}. Please reply STOP to unsubscribe."
  • Variables shouldn't appear at the start or end of the body string.
    • Not in line with best practice: "body": "Hi {{1}}, your flight will depart from gate {{2}}."
    • Best practice: "body": "Hi {{1}}, your flight will depart from gate {{2}}. Please reply STOP to unsubscribe."
  • A template can't have too many variables relative to its length.
    • Not allowed: "body": "Hi {{1}}, gate {{2}}. Thank you."
    • Allowed: "body": "Hi {{1}}, your flight will depart from gate {{2}}. Thank you."
(information)

Info

Samples are required for any of the validations above. They're also required in media templates and CTA URL links. If a variable is present in a media or CTA URL link, all text variables require samples, even if the text variable does not trigger the preceding validations.

Save the template and submit it to WhatsApp

save-the-template-and-submit-it-to-whatsapp page anchor
Save and submit for WhatsApp approval with Save and Cancel options.
  • Save: Creates the template and returns you to the home screen. The builder assigns the template a SID that starts with HX, which you can reference in send requests.
  • Save and submit for WhatsApp approval: Creates the template, assigns an HX SID, and submits the template for WhatsApp review. Meta typically processes approvals within an hour, but some approvals take up to one business day. When you choose this option, select a template category for review.
  • Cancel: Discards the template and returns you to the home screen.
Submit for WhatsApp review screen with options for Transactional, Marketing, or One-time passwords template categories.