> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minimo.it/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Carousel Templates

> Create and send media card carousels: one message with 2 to 10 scrollable image or video cards

## Overview

A **carousel template** is one WhatsApp message with a short text on top and 2 to 10 cards the recipient scrolls sideways. Each card has an image or a video, an optional short text and up to 2 buttons. It is Meta's "media card carousel" format, passed through as Meta defines it.

> [!WARNING]
>
> Carousels work only on WhatsApp numbers **connected directly to Meta through Minimo**. On a number connected through
> 360dialog or Twilio, creating, submitting or sending a carousel is refused with
> `400 WHATSAPP_CAROUSEL_PROVIDER_UNSUPPORTED`.

Meta's rules, checked by Minimo before anything reaches Meta:

| Rule | Limit |
| - | - |
| Category | `MARKETING` only (marketing price and Meta's marketing limits per recipient apply) |
| Cards | 2 to 10, fixed when the template is created: every send carries the same number of cards |
| Components | the message `BODY` (max 1024 characters) and one `CAROUSEL`, nothing else at the top level |
| Card header | `IMAGE` or `VIDEO`, the same format on every card, with a sample media on every card |
| Card text | optional, max 160 characters; if one card has it, every card has it |
| Card buttons | up to 2: `QUICK_REPLY`, `URL` (one variable at the end) or `PHONE_NUMBER`; label max 25 characters |
| Consistency | every card has the same components and the same button types in the same order |

## Create and submit

Create the template with the MCP tools `minimo_whatsapp_template_create` then `minimo_whatsapp_template_submit` (or ask Mo), or from the app API (`POST /v1/whatsapp/templates`, then `POST /v1/whatsapp/templates/{id}/submit`). The definition uses Meta's format. Each card header gives a public `https` `mediaUrl`: Minimo uploads it to Meta as the **review sample**. At send time each card normally gets its own image for that contact; the sample is only used for a card the send leaves without media.

```json theme={null}
{
  "name": "weekly_homes",
  "language": "it",
  "category": "MARKETING",
  "components": [
    {
      "type": "BODY",
      "text": "Ciao {{1}}, ecco le case della settimana per te.",
      "example": { "body_text": [["Luca"]] }
    },
    {
      "type": "CAROUSEL",
      "cards": [
        {
          "components": [
            { "type": "HEADER", "format": "IMAGE", "mediaUrl": "https://cdn.example.com/home-1.jpg" },
            { "type": "BODY", "text": "Bilocale a {{1}}, da vedere.", "example": { "body_text": [["Roma"]] } },
            {
              "type": "BUTTONS",
              "buttons": [
                { "type": "QUICK_REPLY", "text": "Mi interessa" },
                {
                  "type": "URL",
                  "text": "Apri annuncio",
                  "url": "https://homes.example.com/l/{{1}}",
                  "example": ["https://homes.example.com/l/123"]
                }
              ]
            }
          ]
        },
        {
          "components": [
            { "type": "HEADER", "format": "IMAGE", "mediaUrl": "https://cdn.example.com/home-2.jpg" },
            { "type": "BODY", "text": "Trilocale a {{1}}, da vedere.", "example": { "body_text": [["Milano"]] } },
            {
              "type": "BUTTONS",
              "buttons": [
                { "type": "QUICK_REPLY", "text": "Mi interessa" },
                {
                  "type": "URL",
                  "text": "Apri annuncio",
                  "url": "https://homes.example.com/l/{{1}}",
                  "example": ["https://homes.example.com/l/456"]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

Meta reviews it like any other template (minutes, up to 24 hours). Check the result with `minimo_whatsapp_template_status`, or in the list of templates.

> [!NOTE]
>
> The carousel editor in the template builder is coming: until then a carousel is shown in the app but edited through the API or MCP.

## Send

Send it with [Send WhatsApp Template](https://docs.minimo.it/api-reference/messaging-channels/whatsapp/send-template.md), adding a `carousel` component with one entry per card (`card_index` from 0). The component types can be written in lowercase, as in Meta's docs.

The usual case is **a different image on every card for every contact** (for example the listings picked for that person): build the `carousel` per recipient, one send per contact, each card with its own `link`.

```json theme={null}
{
  "recipient": "+391234567890",
  "type": "template",
  "template": {
    "name": "weekly_homes",
    "languageCode": "it",
    "components": [
      { "type": "body", "parameters": [{ "type": "text", "text": "Luca" }] },
      {
        "type": "carousel",
        "cards": [
          {
            "card_index": 0,
            "components": [
              { "type": "header", "parameters": [{ "type": "image", "image": { "link": "https://cdn.example.com/listing-81.jpg" } }] },
              { "type": "body", "parameters": [{ "type": "text", "text": "Roma" }] },
              { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [{ "type": "payload", "payload": "listing-81" }] },
              { "type": "button", "sub_type": "url", "index": 1, "parameters": [{ "type": "text", "text": "81" }] }
            ]
          },
          {
            "card_index": 1,
            "components": [
              { "type": "header", "parameters": [{ "type": "image", "image": { "link": "https://cdn.example.com/listing-94.jpg" } }] },
              { "type": "body", "parameters": [{ "type": "text", "text": "Milano" }] },
              { "type": "button", "sub_type": "url", "index": 1, "parameters": [{ "type": "text", "text": "94" }] }
            ]
          }
        ]
      }
    ]
  }
}
```

* **Card media**: `{ "type": "image", "image": { "link": "https://…" } }` (or `"video"`), or `{ "id": "…" }` for a media already uploaded to your number. A card without a header goes out with the review sample saved on the template; a card with media always goes out with yours.
* **Media checks, on every send**: before anything reaches WhatsApp, Minimo checks each card's media for that send: a public `https` URL that answers 200, an image `image/jpeg` or `image/png` up to 5 MB, a video `video/mp4` or `video/3gpp` up to 16 MB, matching the card format (image or video) of the template. A media `id` is checked on WhatsApp. A bad card stops only that send with `400 WHATSAPP_CAROUSEL_MEDIA_INVALID` naming the card; your other sends are not affected. Nothing is cached between contacts.
* **Card text and buttons**: every variable of a card text needs a value (`default` works as on the message body), and a `URL` button with a variable needs its `button` parameter. A `quick_reply` payload comes back in the inbound webhook when the recipient taps it.
* **Cards**: the message always carries every approved card, in order. A `card_index` that does not exist is refused.
* The send is billed as **one marketing message**, whatever the number of cards. The message appears in the Minimo inbox with its cards.

## Errors

| Error | Cause | Solution |
| - | - | - |
| `400 WHATSAPP_CAROUSEL_PROVIDER_UNSUPPORTED` | The number is connected through 360dialog or Twilio | Use a number connected directly to Meta through Minimo |
| `400 WHATSAPP_CAROUSEL_MEDIA_INVALID` | A card's image or video for this send cannot be used: not a public `https` URL, not reachable, not 200, wrong type for the card, or too large | Fix that card's `link` (or `id`) and send again |
| `400 WHATSAPP_CAROUSEL_CARDS_INVALID` | A `card_index` that does not exist or is repeated, a video on an image card, a card with no media and no saved sample, or a `carousel` sent to a template that is not a carousel | Fix the cards as the message says |
| `400 WHATSAPP_TEMPLATE_VARIABLE_MISSING` | A card variable has no value, e.g. `card 1 body {{1}}` or `card 0 button 1 {{1}}` | Send a value or a `default` |
| `400` "Template is not valid for submission" | A Meta rule above is not met (category, cards, formats, limits) | Fix the definition as the message says, then submit again |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.