Skip to main content

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

FieldTypeDescriptionRequired?
titleObjectA plain_text text object that defines the dialog's title. Maximum length for this field is 100 characters.Required
textObjectA 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
confirmObjectA 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
denyObjectA 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
styleStringDefines 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!"
}
}