Skip to content

Adds a confirmation step to an interactive element: before the action reaches your app, the reader sees a dialog and must confirm it.

Used in Button element, Checkboxes element, Date picker element, Datetime picker element, Multi-select menu element, Overflow menu element, Radio button group element, Select menu element, Time picker element, Workflow button element

Set it as the element’s confirm field. If the reader cancels, nothing is sent to your app and a select, date, checkbox or radio choice goes back to what it was.

Field Type Description Required?
title Text object A plain_text text object that defines the dialog’s title. Maximum length for this field is 100 characters. Required
text Text object A plain_text text object that defines the explanatory text that appears in the dialog. Maximum length for the text in this field is 300 characters. Required
confirm Text object A plain_text text object that defines the text of the button that confirms the action. Maximum length for the text in this field is 30 characters. Required
deny Text object A plain_text text object that defines the text of the button that cancels the action. Maximum length for the text in this field is 30 characters. Required
style String The colour scheme of the confirm button: primary (the default) or danger, which makes it red. Use danger for destructive actions. Optional
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Price offer PO-1187* for Cedar Retail Group is ready to send."
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Send to customer"
},
"style": "primary",
"action_id": "send_offer",
"value": "PO-1187",
"confirm": {
"title": {
"type": "plain_text",
"text": "Send this price offer?"
},
"text": {
"type": "plain_text",
"text": "Cedar Retail Group's buyer will get the offer by email right away."
},
"confirm": {
"type": "plain_text",
"text": "Send offer"
},
"deny": {
"type": "plain_text",
"text": "Not yet"
}
}
}
}
]
}
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Task: *Call back Atlas Engineering about the delivery date*"
},
"accessory": {
"type": "overflow",
"action_id": "task_menu",
"options": [
{
"text": {
"type": "plain_text",
"text": "Mark as done"
},
"value": "done"
},
{
"text": {
"type": "plain_text",
"text": "Delete task"
},
"value": "delete"
}
],
"confirm": {
"title": {
"type": "plain_text",
"text": "Are you sure?"
},
"text": {
"type": "plain_text",
"text": "This can't be undone from chat."
},
"confirm": {
"type": "plain_text",
"text": "Yes, go ahead"
},
"deny": {
"type": "plain_text",
"text": "Cancel"
},
"style": "danger"
}
}
}
]
}