Skip to main content

Option group object

Defines a way to group options in a menu.

The menu can be a select menu or a multi-select menu. An option_groups array can have a maximum number of 100 option groups with a maximum of 100 options.

Fields

FieldTypeDescriptionRequired?
labelObjectA plain_text text object that defines the label shown above this group of options. Maximum length for the text in this field is 75 characters.Required
optionsObject[]An array of option objects that belong to this specific group. Maximum of 100 items.Required

Example

"option_groups": [
{
"label": {
"type": "plain_text",
"text": "Group 1"
},
"options": [
{
"text": {
"type": "plain_text",
"text": "*this is plain_text text*"
},
"value": "value-0"
},
{
"text": {
"type": "plain_text",
"text": "*this is plain_text text*"
},
"value": "value-1"
},
{
"text": {
"type": "plain_text",
"text": "*this is plain_text text*"
},
"value": "value-2"
}
]
},
{
"label": {
"type": "plain_text",
"text": "Group 2"
},
"options": [
{
"text": {
"type": "plain_text",
"text": "*this is plain_text text*"
},
"value": "value-3"
}
]
}
]