Confirmation dialog object
Adds a confirmation step to an interactive element: before the action reaches your app, the reader sees a dialog and must confirm it.
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.
Fields
Section titled “Fields”| 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 |
Examples
Section titled “Examples”A button that asks before it acts
Section titled “A button that asks before it acts”{ "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" } } } } ]}A destructive choice in an overflow menu
Section titled “A destructive choice in an overflow menu”{ "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" } } } ]}