Carousel

A carousel message displays items in order in multiple columns,
which can be scrolled horizontally.

A message to send can be written in multiple languages. Then, it will be displayed in the language that matches the client device's language settings.

The following figure shows the carousel structure.

structure_carousel

Note

  • The number of actions must be consistent for all the columns.
  • If needed, images or titles must be specified consistently for all the columns.

Request content {#carousel-request}

common {#carousel-request-common}

ParameterTypeRequiredDescription
typestringYSet this parameter to "carousel".
imageAspectRatiostringNAspect ratio of an image. It applies to all the columns.
• "rectangle": 1.51:1 (default)
• "square": 1:1
imageSizestringNImage size It applies to all the columns.
• "cover": Resizes the image to cover the entire area (default).
The part of the image that does not fit the area is not displayed.
• "contain": Resizes the image to make sure the image is fully visible. A vertically long image is displayed with blank spaces on the left and right sides. A horizontally long image is displayed with blank spaces on the upper and lower sides.
columnsarrayYList of carousel objects
Maximum number: 10 objects
columns[].originalContentUrlstringNImage URL (PNG format, HTTPS only)
Either originalContentUrl or fileId, but not both, can be specified (optional).
Maximum size: 1 MB
Maximum length: 1,000 characters
columns[].fileIdstringNImage file ID.
Either originalContentUrl or fileId, but not both, can be specified (optional).
Maximum size: 1 MB
columns[].titlestringNSubject
Maximum length: 40 characters
columns[].textstringYMessage content
Maximum length (with no image and title): 4 lines, 120 characters
• Maximum length (with an image or title): 2 lines, 60 characters
columns[].defaultActionAction ObjectNAction that occurs when the image, title, or text area is pressed.
columns[].actionsarrayYButtons where actions are defined
Maximum number: 3 buttons

Note

  • If either the maximum number of lines or characters is exceeded in columns[].text, the excess characters are not displayed.
  • Therefore, the number of characters displayed in a carousel message may be less than the maximum length, depending on the device's screen size and character type.

multi language {#carousel-request-multilang}

ParameterTypeRequiredDescription
columns[].i18nOriginalContentUrls[]arrayNList of multilingual image URLs
columns[].i18nOriginalContentUrls[].languagestringYLanguage code
• ko_KR • ja_JP • zh_CN • zh_TW • en_US
columns[].i18nOriginalContentUrls[].originalContentUrlstringYImage URL (PNG format, HTTPS only)
Maximum size: 1 MB
Maximum length: 1,000 characters
columns[].i18nFileIds[]arrayNList of multilingual image file IDs
columns[].i18nFileIds[].languagestringYLanguage code
• ko_KR • ja_JP • zh_CN • zh_TW • en_US
columns[].i18nFileIds[].fileIdstringYImage file ID.
Maximum size: 1 MB

Request example {#carousel-request-example}

example_carousel

{  "content": {    "type": "carousel",    "columns": [{      "originalContentUrl": "https://example.com/example.png",      "title": "Works Mobile",      "text": "Press the button to visit",      "defaultAction": {        "type":"uri",        "uri":"https://example.com"      },      "actions": [{        "type":"uri",        "label":"Visit",        "uri":"https://example.com"      }]    }, {      "originalContentUrl": "https://example.com/example2.png",      "title": "Works Mobile",      "text": "New way of working",      "defaultAction": {        "type":"uri",        "uri":"https://example.com"      },      "actions": [{        "type":"uri",        "label":"Talk",        "uri":"https://example.com"      }]    }]  }}