Sending Carousel Template

Use this API to send templates messages to your customers.

🚧

API token & Name space

Please refer to this page to fine the API Token and the name space: https://developer.cequens.com/reference/whatsapp-business-ver2

💡

Tip: Looking for example requests? Click the dropdown in the top-right corner of the "Request body" section to see pre-built examples you can use.

Overview

WhatsApp carousel templates are specialized message templates that display multiple cards (3-10 cards) that users can swipe through horizontally. Each card can contain:

  • An image header
  • Body text with variables
  • Interactive buttons (URL or quick reply)

Carousels are ideal for:

  • Product Catalogs: Showcase multiple products with images, descriptions, and purchase links
  • Service Offerings: Present different service packages or options
  • Event Promotions: Display multiple events or dates
  • Menu Items: Show food items, services, or offerings with details and ordering options

No 24-Hour Window Restriction

Like all template messages, carousel templates can be sent at any time, even if the customer hasn't messaged you recently.

Before You Start

  • Create and Register Carousel Template: Carousel templates must be created and approved in WhatsApp Business Manager
  • Card Limit: Carousels must contain between 2 and 10 cards
  • Consistent Structure: All cards in a carousel must have the same component structure
  • Image Required: Each card must have an image header.

Components Structure

Carousel templates require two main components:

  1. Body Component (optional): Text that appears above the carousel
  2. Carousel Component: Contains the array of cards

Body Component (Optional)

{
    "type": "body",
    "parameters": [
        {
            "type": "text",
            "text": "Check out our latest collection"
        }
    ]
}

Carousel Component

ParameterTypeDescriptionRequired
typestringMust be set to "carousel"Yes
cardsarrayArray of card objects (3-10 cards)Yes

Card Object

Each card in the carousel contains:

ParameterTypeDescriptionRequired
card_indexintegerIndex of the card (starting from 0)Yes
componentsarrayArray of components for this cardYes

Card Components

Each card must have the same structure with these components:

  1. Header Component (required): Image for the card
  2. Body Component (optional): Text with variables
  3. Button Component (optional): URL or quick reply button

Card Header (Image)

{
    "type": "header",
    "parameters": [
        {
            "type": "image",
            "image": {
                "link": "https://example.com/product1.jpg"
            }
        }
    ]
}

Card Body

{
    "type": "body",
    "parameters": [
        {
            "type": "text",
            "text": "Product Name"
        },
        {
            "type": "text",
            "text": "$99.99"
        }
    ]
}

Card Button

{
    "type": "button",
    "sub_type": "URL",
    "index": "0",
    "parameters": [
        {
            "type": "text",
            "text": "https://example.com/product/12345"
        }
    ]
}

Common Errors and Troubleshooting

ErrorCauseSolution
Invalid card countLess than 3 or more than 10 cardsEnsure carousel has 3-10 cards
Inconsistent card structureCards have different component structuresAll cards must have identical component types
Missing image headerCard doesn't have image headerEach card must include an image header
Invalid card_indexCard indices not sequential or starting from wrong numberStart card_index from 0 and increment sequentially
Image download failedImage URL not accessibleEnsure all image URLs are publicly accessible via HTTPS
Button URL parameter missingDynamic URL button missing parameterProvide URL parameter for dynamic URL buttons

Carousel vs. Standard Templates

FeatureStandard TemplateCarousel Template
CardsSingle message3-10 swipeable cards
ImagesOptionalRequired for each card
Use CaseSingle product/messageMultiple products/options
ButtonsUp to 3 buttons1 button per card
ComplexitySimpleMore complex structure
Best ForSingle CTAProduct catalogs, comparisons

Language
Credentials
Header
Click Try It! to start a request and see the response here!