Skip to main content

Option group object

Welcome to the new home of Slack developer docs!

We're still building and not all features are available quite yet. Enjoy this peek into the future!

Not ready for the future? Return to the past at api.slack.com.

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"
}
]
}
]