A2P 10DLC Campaign Vetting Delays: Twilio cannot approve 10DLC Campaigns ourselves, and must rely on third parties who control our connections to carriers to sign off. These external processes are creating several week delays for our customers. We continue to escalate these issues and are working to reduce delays wherever possible. Further details will be shared in the Campaign Vetting Changes article as they become available.

At a Glance: WhatsApp Legacy Templates versus Content Templates

There are important differences between sending WhatsApp template messages using Legacy Templates and Content Templates (Templates submitted via the Twilio Content API/Editor). These differences include changes to code and mandatory usage of Messaging Services.

This guide details the main differences between the two systems and what users need to be aware of when implementing Content Templates in their WhatsApp workflow. 

Key Terms

Legacy Templates: Templates submitted in the Twilio Console under Messaging > Senders > WhatsApp Templates.

Content API: API currently available in private beta that enables users to create and send rich messaging content over any Twilio-supported messaging channel, not just WhatsApp. Currently, access is granted through this form. Documentation can be found here.

Content Editor: Twilio Console product currently available in private beta that is built on top of the Content API. Content Editor enables users to create, approve, and manage templates from the Twilio Console. Templates can be used on any supported channel, not just WhatsApp. Access is granted along with the Content API on the form above and is accessible via Messaging > Content Editor. Documentation can be found here.

Sending a message using legacy templates

To send a legacy template, users need to match the message body in the “body” parameter of their API call exactly with the template body as it was created via the Twilio console. This can cause problems with special characters, right to left languages and newlines, leading to error 63016. Often encoded characters or trailing spaces are present in the template body but are missed when sending the message body.

Example of sending a Legacy Template

Raw Template Body:


“Hi {{1}}, thanks for joining our business. \nWe're looking forward to seeing you again soon in store. “

Sending the template with cURL:


curl -X POST "https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json" \
--data-urlencode "From=whatsapp:+1234567890" \
--data-urlencode "Body=Hi Joe, thanks for joining our business.

We're looking forward to seeing you again soon in store. " \
--data-urlencode "To=whatsapp:+0987654321" \
-u {account_sid}:{auth_token}

Legacy template required API parameters:

  • Body
  • From
  • To

Sending a message with Content Templates

To send a template message using a Content Template, users only need to supply the SID of the template, a Messaging Service SID and the placeholder values, if any. This prevents template mismatch errors that frequently occur using the legacy template system.

Example of sending a Content Template

 Raw Template Body:


“Hi {{1}} thanks for reaching out. \nHow can I help you today? “

Code Snippet:


curl -X POST https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages \
--data-urlencode "To=whatsapp:+1234567890" \
--data-urlencode "MessagingServiceSid={messaging_service_sid}" \
--data-urlencode "From=whatsapp:+0987654321" \
--data-urlencode "ContentSid={template_sid}" \
--data-urlencode 'ContentVariables={"1": "Josephine"}' \
-u {account_sid}:{auth_token}

Content template required parameters:

  • Messaging Service SID (Can be in the From field or a MessagingServiceSid field)
  • Content SID
  • Content Variables
  • To

Helper Libraries

The Content API is in private beta. It is partially supported by our helper libraries for all endpoints that don’t use a JSON body but users must make sure their helper library is up to date to ensure all features are available for use. 

Required Messaging Services Usage

Content Templates require a ​​Messaging Service to work. There are two options available to send Content Templates depending on your use case:

  1. Add your WhatsApp Sender(s) to the Messaging Service Sender Pool for automatic sender selection

    You can add one or multiple WhatsApp Senders to a Messaging Service and the Sender Pool logic will select a Sender automatically. You can include the Messaging Service in your API call using either the “From” parameter or the “MessagingServiceSID” parameter.

  2. Chose a specific WhatsApp Sender

    You can decide which WhatsApp Sender you want to use to send your Content Templates. Add the Sender in the “From” parameter of your API call. You will need to include a ​​Messaging Service SID in the “MessagingServiceSID” parameter, but the WhatsApp Sender does not need to be added to the Sender Pool.

Parameter Comparison Table

480px-Eo_circle_light-blue_checkmark.svg.png Supported but not required 480px-Eo_circle_green_checkmark.svg.png Required 480px-Eo_circle_red_no-entry.svg.png Not supported

 

API Parameter Legacy Templates Content Templates
Messaging Service 480px-Eo_circle_light-blue_checkmark.svg.png 480px-Eo_circle_green_checkmark.svg.png
From 480px-Eo_circle_green_checkmark.svg.png 480px-Eo_circle_light-blue_checkmark.svg.png
To 480px-Eo_circle_green_checkmark.svg.png 480px-Eo_circle_green_checkmark.svg.png
Content SID 480px-Eo_circle_red_no-entry.svg.png 480px-Eo_circle_green_checkmark.svg.png
Content Variables 480px-Eo_circle_red_no-entry.svg.png 480px-Eo_circle_light-blue_checkmark.svg.png
Body 480px-Eo_circle_green_checkmark.svg.png 480px-Eo_circle_light-blue_checkmark.svg.png

 

FAQS

Can I use Legacy Templates and Content Templates at the same time?

Templates submitted through the Legacy Template console cannot be sent in the same way that Content Templates and vice versa. You can utilise both in your code at the same time, but you will have to differentiate between the two types at send time. 

Can I migrate all my legacy templates to content templates?

Twilio is planning to migrate legacy templates to content templates for all customers in the future. This functionality is expected to be made available in mid-2023. If you have requested access to Content API & Editor, all your legacy templates will be made available in the Content API & Editor automatically once this feature is released.

Where can I find documentation for Content API and Content Editor?

You can find Content API docs here and Content Editor docs here.

Have more questions? Submit a request
Powered by Zendesk