Twilio/card
is a structured template which can be used to send a series of related information. It must include a title and at least one additional field.
On WhatsApp, a card must be approved as a template before it can be sent. If you use variables with twilio/card
, then additional approval steps are required. If a twilio/card
template is created with media and with variables and you plan to submit this template to WhatsApp for approval, a valid media sample is required. Static media urls should resolve to publicly hosted media files. Variable media urls should include a valid media URL suffix in the variable declaration.
Only one type of media can be sent per approved variable WhatsApp card template. WhatsApp classifies approved templates into 1 of 3 types of media headers (Image, Video, Document) based on the sample that was submitted. Once the template has been approved another type of media header cannot be sent using the template.
Ex. If a template is approved with an image then a video cannot be sent using the same template.
In the Media field of the template you create, provide the URL of the publicly hosted file.
If you are using a media in the card with a variable. Please submit a sample path of a publicly hosted image URL in the variable array. The combined URL must contain the file type. The combined URL must resolve to a publicly hosted file.
Example:
"media": ["https://twilio-cms-prod.s3.amazonaws.com/{{1}}"]
would include a path sample in the variables
definition. "variables": {"1": "images/library-logo-resource2x.width-1000.png"}
If you are using a call-to-action URL button in your card, the URL must resolve to a publicly accessible website. If there is a variable, a valid path sample should be included in the variables array. The combined URL should resolve to a publicly accessible website.
Example:
"url": ["https://www.twilio.com/{{1}}"]
would include a path sample in the variables
definition. "variables": {"1": "docs"}
WhatsApp, Facebook Messenger
title:
Description: Title of card.
subtitle:
Description: Subtitle of card.
media:
Description: The URL of the media to send with the message.
Description: Buttons that recipients can tap on to act on the message: