Confirmation dialog 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 dialog that adds a confirmation step to interactive elements.
An object that defines a dialog that provides a confirmation step to any interactive element. This dialog will ask the user to confirm their action by offering a confirm and deny buttons.
Fields
Field | Type | Description | Required? |
---|---|---|---|
title | Object | A plain_text text object that defines the dialog's title. Maximum length for this field is 100 characters. | Required |
text | Object | A plain_text text object that defines the explanatory text that appears in the confirm dialog. Maximum length for the text in this field is 300 characters. | Required |
confirm | Object | A plain_text text object to define the text of the button that confirms the action. Maximum length for the text in this field is 30 characters. | Required |
deny | Object | A plain_text text object to define the text of the button that cancels the action. Maximum length for the text in this field is 30 characters. | Required |
style | String | Defines the color scheme applied to the confirm button. A value of danger will display the button with a red background on desktop, or red text on mobile. A value of primary will display the button with a green background on desktop, or blue text on mobile. If this field is not provided, the default value will be primary . | Optional |
Example
{
"title": {
"type": "plain_text",
"text": "Are you sure?"
},
"text": {
"type": "plain_text",
"text": "Wouldn't you prefer a good game of chess?"
},
"confirm": {
"type": "plain_text",
"text": "Do it"
},
"deny": {
"type": "plain_text",
"text": "Stop, I've changed my mind!"
}
}