# Carousel

{% hint style="info" %}
All examples below must be sent within the **body** field of a message as shown below
{% endhint %}

{% code lineNumbers="true" %}

```json
{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "body": {...}
}
```

{% endcode %}

## Single cards

A carousel can contain between 1-10 cards. Each card must contain:

1. A title
2. One of description, mediaUrl, actions
   1. mediaURL must be a supported image type
3. A card supports up between 1-3 actions and can be a mix of reply, postback and url buttons

### Single card with title and description

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "carousel",
  "carousel": {
    "items":  [ 
        {
            "title": "Card 1",
            "description": "First card"
        }
  ]
  }
}
```

{% endcode %}

#### Google RCS

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FAbCdlN9O0RHw9rszHKEU%2Fimage.png?alt=media&#x26;token=a98f0e69-324b-40f5-a982-91906f59bfa1" alt="" width="360"><figcaption></figcaption></figure></div>

#### Facebook

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FTgIaue0DBt1op3k1O3dQ%2Fimage.png?alt=media\&token=cd2a0c20-dff1-4872-a04f-60efec069b07)

#### Instagram

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2Fm87BN0o016PBaiJpX20O%2Fimage.png?alt=media\&token=22b2cc35-ff18-4c81-9464-b06318af6067)

### Single card with title, description and actions

#### Body

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
  "type": "carousel",
  "carousel": {
    "items":  [ 
        {
            "title": "Card 1",
            "description": "First card",
            "actions": [
            {
                "type": "reply",
                 "reply": {
                    "text": "reply"
                }
            },
                        {
                "type": "postback",
                 "postback": {
                    "text": "postback",
                    "payload": "postback"
                }
            },
                        {
                "type": "link",
                 "link": {
                    "url": "https://www.messagebird.com",
                    "text": "Visit MessageBird"
                }
            }
            ]
        } 
  ]
  }
}
```

{% endcode %}

#### Google RCS

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FMEIsPnpf7OS40jZYgNPk%2Fimage.png?alt=media&#x26;token=7882ef78-12b7-4eca-8a53-606715fcbb90" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FSkdw43q1RyvlMvd0AII2%2Fimage.png?alt=media\&token=9f910572-2d7d-4453-8ed0-355e5f7bd729)

#### Instagram

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FBAy05rYXcNY6Mu0HsZnq%2Fimage.png?alt=media\&token=d96b5594-1892-4918-8859-d8325f89a0d0)

#### Line

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FAB1mIkLuP31dU98ArsLC%2Fsingle%20card%20with%20title%20description%20and%20actions.png?alt=media&#x26;token=6ce666c3-1680-4445-8bbf-9ec8be6f1361" alt=""><figcaption></figcaption></figure></div>

### Single card with image, title, description and actions

#### Body

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
  "type": "carousel",
  "carousel": {
    "items":  [ 
        {
            "title": "Card 1",
            "description": "First card",
            "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media",
            "actions": [
            {
                "type": "reply",
                 "reply": {
                    "text": "reply"
                }
            },
                        {
                "type": "postback",
                 "postback": {
                    "text": "postback",
                    "payload": "postback"
                }
            },
                        {
                "type": "link",
                 "link": {
                    "url": "https://www.messagebird.com",
                    "text": "Visit MessageBird"
                }
            }
            ]
        } 
  ]
  }
}
```

{% endcode %}

#### Google RCS

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2F7ZiJgajXPVCgSxHkPBnz%2Fimage.png?alt=media&#x26;token=a70a7c22-b557-4d1f-b1c4-d0ad3a4c22a2" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FJ0PvdcfSdD3A19ifSTv8%2Fimage.png?alt=media\&token=bcd27c2e-0fa6-4482-bc8c-56466d35a644)

#### Instagram

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2F1IY2QrWyTw6y8jWl8iwY%2Fimage.png?alt=media\&token=f9aaac70-b9f3-47f3-9e6c-8e1c65354d7f)

#### Line

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FeykqjJdi6gcca4DzTLsg%2Fsingle%20card%20with%20image%20title%20description%20and%20actions.png?alt=media&#x26;token=b1667716-6a94-4e2a-9b16-c37aa0476efc" alt=""><figcaption></figcaption></figure></div>

## Multiple cards

A carousel can contain up to 10 cards.&#x20;

The format of each card can either be the same or mixed e.g. one card with title and description and one card with title, description and actions. Generally for display purposes it is recommend to keep the format of cards similar.

### Multiple cards with title and description

#### Body

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
  "type": "carousel",
  "carousel": {
    "items":  [ 
        {
            "title": "Card 1",
            "description": "First card"
        },
        {
            "title": "Card 2",
            "description": "Second card"
        },
        {
            "title": "Card 3",
            "description": "Third card"
        }
  ]
  }
}
```

{% endcode %}

#### Google RCS

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FSgUmKij9dDNC7PUMOzyY%2Fimage.png?alt=media&#x26;token=013b3fae-60c9-4ffd-987f-6d30039e71c3" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FxdABcxdZ32CeXKTD7G67%2Fimage.png?alt=media\&token=cc8ec4ff-56ea-48a2-b073-664608e35b2e)

#### Instagram

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2F1TEqEQFmRDdgljmtI5K2%2Fimage.png?alt=media\&token=581099d8-1dd0-40d4-876e-5f94f0472052)

### Multiple cards with title, description and actions

#### Body

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
  "type": "carousel",
  "carousel": {
    "items":  [ 
        {
            "title": "Card 1",
            "description": "First card",
            "actions": [
            {
                "type": "reply",
                 "reply": {
                    "text": "reply"
                }
            },
                        {
                "type": "postback",
                 "postback": {
                    "text": "postback",
                    "payload": "postback"
                }
            },
                        {
                "type": "link",
                 "link": {
                    "url": "https://www.messagebird.com",
                    "text": "Visit MessageBird"
                }
            }
            ]
        },        
        {
            "title": "Card 2",
            "description": "Second card",
            "actions": [
            {
                "type": "reply",
                 "reply": {
                    "text": "reply"
                }
            },
                        {
                "type": "postback",
                 "postback": {
                    "text": "postback",
                    "payload": "postback"
                }
            },
                        {
                "type": "link",
                 "link": {
                    "url": "https://www.messagebird.com",
                    "text": "Visit MessageBird"
                }
            }
            ]
        },
        {
            "title": "Card 3",
            "description": "Third card",
            "actions": [
            {
                "type": "reply",
                 "reply": {
                    "text": "reply"
                }
            },
                        {
                "type": "postback",
                 "postback": {
                    "text": "postback",
                    "payload": "postback"
                }
            },
                        {
                "type": "link",
                 "link": {
                    "url": "https://www.messagebird.com",
                    "text": "Visit MessageBird"
                }
            }
            ]
        } 
  ]
  }
}
```

{% endcode %}

#### Google RCS

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FY01B11vR5vhhQLxoKBx9%2Fimage.png?alt=media&#x26;token=acc7409c-9265-4f6f-a7bb-e621ffc868c0" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FlnrJXROFuE9tLbVj085g%2Fimage.png?alt=media\&token=f9c1082b-9a8c-489c-aadb-abc4b9bfd107)

#### Instagram

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2Fg5Sd8OBuo0KcLnI9JJIv%2Fimage.png?alt=media\&token=175d69c8-e273-49d8-9081-f6158dbad762)

#### Line

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FNc1s1s1PMgJSctMEF9QM%2Fmultiple%20cards%20with%20title%20description%20and%20actions.png?alt=media&#x26;token=6cef7114-6b47-46bf-aacd-377e666c98f2" alt=""><figcaption></figcaption></figure></div>

### Multiple cards with image title, description and actions

#### Body

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
  "type": "carousel",
  "carousel": {
    "items":  [ 
        {
            "title": "Card 1",
            "description": "First card",
            "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FrEM9zztd8SEiJS6RQuR3%2Fimage.png?alt=media",
            "actions": [
            {
                "type": "reply",
                 "reply": {
                    "text": "reply"
                }
            },
                        {
                "type": "postback",
                 "postback": {
                    "text": "postback",
                    "payload": "postback"
                }
            },
                        {
                "type": "link",
                 "link": {
                    "url": "https://www.messagebird.com",
                    "text": "Visit MessageBird"
                }
            }
            ]
        },
        {
            "title": "Card 2",
            "description": "Second card",
            "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media",
            "actions": [
            {
                "type": "reply",
                 "reply": {
                    "text": "reply"
                }
            },
                        {
                "type": "postback",
                 "postback": {
                    "text": "postback",
                    "payload": "postback"
                }
            },
                        {
                "type": "link",
                 "link": {
                    "url": "https://www.messagebird.com",
                    "text": "Visit MessageBird"
                }
            }
            ]
        } 
  ]
  }
}
```

{% endcode %}

#### Google RCS

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FcqAdpCIYz0Slh6i5C30h%2Fimage.png?alt=media&#x26;token=a82dad77-cf3e-48d3-aef3-5e4d20170a82" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FDVxLPZpLjCgSwscw6k2T%2Fimage.png?alt=media\&token=9a848d34-aaa1-40e1-800e-81eb7516c8d2)

#### Instagram

![](https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FFcnKFYOtp0RVGcbphbLb%2Fimage.png?alt=media\&token=02f75ba8-1dc9-411b-ba6c-79f145286094)

#### Line

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FQjEIPYl7DuvM0ZZydmVs%2Fmultiple%20cards%20with%20image%20title%20description%20and%20actions.png?alt=media&#x26;token=6a518d7c-61c2-49e8-bf7f-ade3d105bdd8" alt=""><figcaption></figcaption></figure></div>

### Multiple cards with body text, media url, title, and link action

This carousel format must have the following:

* `body.carousel.text` - this contains the text for the bubble before the carousel
* Between 2-10 cards.&#x20;
  1. `mediaUrl` where media type is either all image or all video
     1. Image types - `image/jpeg`, `image/png`
     2. Video types - `video/mp4`, `video/3gpp`
  2. Card `title`
  3. One link action button

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
  "type": "carousel",
  "carousel": {
    "text": "Here is a media carousel with link actions",
    "items": [
      {
        "title": "Card 1",
        "mediaUrl": "https://bird.com/images/image1.jpg",
        "actions": [
          {
            "type": "link",
            "link": {
              "text": "Visit Bird",
              "url": "https://www.bird.com"
            }
          }
        ]
      },
      {
        "title": "Card 2",
        "mediaUrl": "https://bird.com/images/image2.jpg",
        "actions": [
          {
            "type": "link",
            "link": {
              "text": "Visit Bird",
              "url": "https://www.bird.com"
            }
          }
        ]
      }
    ]
  }
}
```

{% endcode %}

#### WhatsApp

<div align="left"><figure><img src="https://3210271997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FCEsgmuEyGXpjrbDEWcaz%2Fimage.png?alt=media&#x26;token=bdac9ece-7a7e-47d9-ab94-ae3bd08c1835" alt="" width="360"><figcaption></figcaption></figure></div>
