POST/bots/{botId}/richmenus
Creates a rich menu for a bot.
Note
- Up to 1,000 rich menus can be added for a bot.
- The label of each action is used in the desktop environment. If no label is specified, the default text is displayed.
Follow the steps below to use the created rich menu.
Caution
- To set the default rich menu, set
defaultRichMenuIdin Update a bot or Update part of a bot.
OAuth 2.0 authentication.
For more information, see Authentication and Authorization.
bot.message
bot
| Parameter | Type | Description |
|---|---|---|
| botId | integer | Bot ID required example : 2000001 format : int64 |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
| Content-Type | string | application/json required example : application/json |
| Property | Type | Description |
|---|---|---|
| richmenuName | string | Rich menu name. It is used to manage rich menus and is not shown to users. required maxLength : 300 |
| areas | array (RichmenuArea) | List of areas to set rich menu actions required minItems : 1 maxItems : 20 |
| size | object (size) | Size object of the rich menu required |
| Property | Type | Description |
|---|---|---|
| action | object (action) | Action that occurs when the area is pressed required |
| bounds | object (bounds) | Bound object of the rich menu button required |
| Property | Type | Description |
|---|---|---|
| type | string | Action type required Allowed values : postback, message, uri, copy |
| label | string | Label displayed on an element.
|
| data | string | Text string returned through the callback of the postback.data property. maxLength : 300 |
| displayText | string | Chat message sent by a user. If it is not specified, no text is displayed. maxLength : 300 |
| postback | string | Text string returned through the message.postback property maxLength : 1000 |
| text | string | Text message sent when an element is pressed. It is required for a carousel, image carousel, rich menu and quick reply, and is replaced with the label value for a button template, list template, and persistent menu. maxLength : 300 |
| uri | string | URI that opens when an element is pressed. The "http" and "https" schemas are supported. maxLength : 1000 |
| copyText | string | Text string copied to the clipboard when an element is pressed. maxLength : 1000 |
| i18nDisplayTexts | array (i18nDisplayTexts) | List of multilingual display texts minItems : 0 |
| i18nLabels | array (i18nLabels) | List of multilingual labels minItems : 0 |
| i18nTexts | array (i18nTexts) | List of text messages sent when an element is pressed. minItems : 0 |
| Property | Type | Description |
|---|---|---|
| language | string | Language code required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| displayText | string | Chat message sent by a user. required maxLength : 300 |
| Property | Type | Description |
|---|---|---|
| language | string | Language code required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| label | string | Label displayed on an element
required |
| Property | Type | Description |
|---|---|---|
| language | string | Language code required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| text | string | Text message sent when an element is pressed. It is required for a carousel, image carousel, rich menu and quick reply, and is replaced with the label value for a button template, list template, and persistent menu. required maxLength : 300 |
| Property | Type | Description |
|---|---|---|
| x | integer | Horizontal offset from the left of the area required minimum : 0 maximum : 2500 format : int64 |
| y | integer | Vertical offset from the top of the area required minimum : 0 maximum : 1686 format : int64 |
| width | integer | Width of the area required minimum : 0 maximum : 2500 format : int64 |
| height | integer | Height of the area required minimum : 0 maximum : 1686 format : int64 |
| Property | Type | Description |
|---|---|---|
| width | integer | Width of the rich menu required Allowed values : 2500 format : int64 |
| height | integer | Height of the rich menu required Allowed values : 843, 1686 format : int64 |
example
1{2 "richmenuName": "Example Richmenu",3 "areas": [4 {5 "action": {6 "type": "postback",7 "label": "Example label",8 "data": "Example data",9 "displayText": "Example displayText",10 "i18nDisplayTexts": [11 {12 "language": "en_US",13 "displayText": "Example display text"14 }15 ],16 "i18nLabels": [17 {18 "language": "en_US",19 "label": "Example label"20 }21 ]22 },23 "bounds": {24 "x": 0,25 "y": 0,26 "width": 2500,27 "height": 84328 }29 }30 ],31 "size": {32 "width": 2500,33 "height": 84334 }35}OK
| Property | Type | Description |
|---|---|---|
| richmenuId | string | Rich menu ID readOnly : true |
| richmenuName | string | Rich menu name. It is used to manage rich menus and is not shown to users. required maxLength : 300 |
| areas | array (RichmenuArea) | List of areas to set rich menu actions required minItems : 1 maxItems : 20 |
| size | object (size) | Size object of the rich menu required |
| Property | Type | Description |
|---|---|---|
| action | object (action) | Action that occurs when the area is pressed required |
| bounds | object (bounds) | Bound object of the rich menu button required |
| Property | Type | Description |
|---|---|---|
| type | string | Action type required Allowed values : postback, message, uri, copy |
| label | string | Label displayed on an element.
|
| data | string | Text string returned through the callback of the postback.data property. maxLength : 300 |
| displayText | string | Chat message sent by a user. If it is not specified, no text is displayed. maxLength : 300 |
| postback | string | Text string returned through the message.postback property maxLength : 1000 |
| text | string | Text message sent when an element is pressed. It is required for a carousel, image carousel, rich menu and quick reply, and is replaced with the label value for a button template, list template, and persistent menu. maxLength : 300 |
| uri | string | URI that opens when an element is pressed. The "http" and "https" schemas are supported. maxLength : 1000 |
| copyText | string | Text string copied to the clipboard when an element is pressed. maxLength : 1000 |
| i18nDisplayTexts | array (i18nDisplayTexts) | List of multilingual display texts minItems : 0 |
| i18nLabels | array (i18nLabels) | List of multilingual labels minItems : 0 |
| i18nTexts | array (i18nTexts) | List of text messages sent when an element is pressed. minItems : 0 |
| Property | Type | Description |
|---|---|---|
| language | string | Language code required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| displayText | string | Chat message sent by a user. required maxLength : 300 |
| Property | Type | Description |
|---|---|---|
| language | string | Language code required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| label | string | Label displayed on an element
required |
| Property | Type | Description |
|---|---|---|
| language | string | Language code required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| text | string | Text message sent when an element is pressed. It is required for a carousel, image carousel, rich menu and quick reply, and is replaced with the label value for a button template, list template, and persistent menu. required maxLength : 300 |
| Property | Type | Description |
|---|---|---|
| x | integer | Horizontal offset from the left of the area required minimum : 0 maximum : 2500 format : int64 |
| y | integer | Vertical offset from the top of the area required minimum : 0 maximum : 1686 format : int64 |
| width | integer | Width of the area required minimum : 0 maximum : 2500 format : int64 |
| height | integer | Height of the area required minimum : 0 maximum : 1686 format : int64 |
| Property | Type | Description |
|---|---|---|
| width | integer | Width of the rich menu required Allowed values : 2500 format : int64 |
| height | integer | Height of the rich menu required Allowed values : 843, 1686 format : int64 |
example
1{2 "richmenuId": "40001",3 "richmenuName": "Example Richmenu",4 "areas": [5 {6 "action": {7 "type": "postback",8 "label": "Example label",9 "data": "Example data",10 "displayText": "Example displayText",11 "i18nDisplayTexts": [12 {13 "language": "en_US",14 "displayText": "Example display text"15 }16 ],17 "i18nLabels": [18 {19 "language": "en_US",20 "label": "Example label"21 }22 ]23 },24 "bounds": {25 "x": 0,26 "y": 0,27 "width": 2500,28 "height": 84329 }30 }31 ],32 "size": {33 "width": 2500,34 "height": 84335 }36}