A flexible template enables you to customize your message layout according to CSS Flexible Box (CSS Flexbox), where a "flex container" and "flex item" are equivalent to a "box component" and "component" in the flexible template, respectively.

Like other message types, a flexible template is formatted as JSON. For more information about how a bot sends flexible template messages, see the following topics:
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Y | Set this parameter to flex. |
| "altText": | string | Y | Alternative text displayed on messages or push notifications. Alternative text can be written and sent in multiple languages. Maximum length: 400 characters |
| contents | object | Y | Flexible template container |
| Parameter | Type | Required | Description |
|---|---|---|---|
| i18nAltTexts[] | array | N | List of multilingual alternative texts |
| i18nAltTexts[].language | string | Y | Language code • ko_KR • ja_JP • zh_CN • zh_TW • en_US |
| i18nAltTexts[].altText | string | Y | Multilingual alternative text Maximum length: 400 characters |
{ "content": { "type": "flex", "altText": "this is a flexible template", "contents": { "type": "bubble", "body": { "type": "box", "layout": "vertical", "contents": [ { "type": "text", "text": "hello" }, { "type": "text", "text": "world" } ] } } }}{ "content": { "type": "flex", "altText": "Hello", "i18nAltTexts":[{ "language": "ja_JP", "altText": "こんにちは" } "language": "ko_KR", "altText": "Hello" }], "contents": { "type": "bubble", "size": "mega", "hero": { "type": "box", "layout": "vertical", "contents": [ { "type": "text", "text": "YOU ARE INVITED!", "size": "xl", "color": "#ffffff", "weight": "bold", "align": "center", "wrap": true } ], "backgroundColor": "#81DBA0", "paddingAll": "15px" } } }}Use Flexible Template Simulator to create JSON code for a flexible template container. It helps you create JSON code for your container or check the layout without sending a message.
Flexible Template Simulator consists of the following three areas:
{ "content": { "type": "flex", "altText": "Alternative text displayed on messages or push notifications", "contents": { Paste the copied code here. } }}