Twilio/text type contains only plain text-based content. While text content may be sent to OTT channels without the use of content templates, the twilio/text type can be used as a fallback content type when sending to a mix of channels. Additionally, templates make it easy to utilize variables to create dynamic content.
(warning)
Warning
Twilio/text templates can be sent via WhatsApp for out of session messages with variables. If the template's body starts or ends with a variable or has two variables next to each other, the template will not be approved by WhatsApp without a sample variable. For additional information about variables see Using Variables with Content Templates.
Supported Channels
SMS, WhatsApp, Facebook Messenger
Message Preview
Data Parameters
body:
Type:
string
Required:
yes
Variable Support:
yes
Description: The text of the message you want to send.
Maximum 1,600 characters
Create Text Template
C#
Java
curl
_27
// Install the C# / .NET helper library from twilio.com/docs/csharp/install
_27
_27
using System;
_27
using Twilio;
_27
using Twilio.Rest.Content.V1;
_27
_27
TwilioClient.Init(accountSid, authToken);
_27
_27
// define the twilio/text
_27
var twilioText = new TwilioText.Builder();
_27
twilioText.WithBody("Hi {{1}}. Thanks for contacting Owl Air Support. How can we help?");
_27
_27
// define all the content types to be part of the template
_27
var types = new Types.Builder();
_27
types.WithTwilioText(twilioText.Build());
_27
_27
// build the create request object
_27
var contentCreateRequest = new ContentCreateRequest.Builder();