Create a Carousel template

The Carousel message template is only supported in the Cloud API.

Carousel templates allow you to send a single text message (1), accompanied by a set of up to 10 carousel cards (2) in a horizontally scrollable view.

The template can be viewed by users both from mobile devices and in the WhatsApp web client.

Basic rules for creating a template:

  1. A message bubble (1) is required. Message bubbles are text-only and support variables in it.

  2. Carousel templates support up to 10 carousel cards.

  3. The media header format and button types must be the same for all cards.

  4. Cards must have a mandatory media header (image or video) and card body text

  5. Card should at least have 1 button. Template supports a maximum of up to 2 buttons for each card.

  6. The button types supported are Quick Reply, Website URL CTA & Call Phone Number CTA. Buttons can be the same type or a mix of Quick reply buttons, phone number buttons, or URL buttons for each card.

Create a template using the developer API

Creating a template is described in the API documentation in the /addTemplate method.

The difference from the basic template creation is the addition of a new CAROUSEL type to the components and cards array..

You can also create a template from the 'Dev Toolkit' → 'Test requests' section of your personal cabinet. The example below was created using this section. Don't forget to specify examples of variables if you have added them to the body, link URL of buttons. Otherwise the template will be rejected by Meta*.

PlaceholderDescriptionExample Value

BUBBLE_TEXT

String

Required..

Message bubble text string. Supports variables.

Maximum 1024 characters.

Summer is here, and we've got the freshest produce around! Use code {{1}} to get {{2}} off your next order.

BUBBLE_TEXT_VAR_EXAMPLE

Array of strings

Required if the message bubble text string uses variables.

Array of example variable strings. Number of strings must match the number of variables included in the string.

"15OFF","15%"

CARD_BODY_TEXT

String

Required.

Card body text. Support variables.

Maximum 160 characters.

Rare lemons for unique cocktails. Use code {{1}} to get {{2}} off all produce.

CARD_BODY_TEXT_VAR_EXAMPLE

Array of strings

Required if using card body text with variables.

Card body text example variables.

"15OFF","15%"

CARD_HEADER_FORMAT

Enum

Required.

Card media header format. Must be IMAGE or VIDEO.

IMAGE

CARD_HEADER_HANDLE

Required.

QUICK_REPLY_BUTTON_TEXT

String

Required if using a quick reply button.

Quick reply button label text.

Maximum 25 characters.

Send more like this #2

TEMPLATE_CATEGORY

Enum

Required.

Must be MARKETING or UTILITY.

MARKETING

TEMPLATE_LANGUAGE

Enum

Required.

Template language and locale code.

en

TEMPLATE_NAME

String

Required.

Template name.

Maximum 512 characters.

marceting_carousel_01_test

URL_BUTTON_TEXT

String

Required if using a URL button.

URL button label text.

25 characters maximum.

Buy now

URL_BUTTON_URL

String

Required if using a URL button.

URL of website that loads in the device's default mobile web browser when the URL button is tapped by the app user.

Supports 1 variable, appended to the end of the URL string.

Maximum 2000 characters.

URL_BUTTON_VAR_EXAMPLE

String

Required if using a URL button.

URL of website. Supports 1 variable.

If using a variable, add sample variable property to the end of the URL string. The URL loads in the device's default mobile web browser when the customer taps the URL button.

Maximum 2000 characters.

Last updated