# Block Kit Preview for Slack > https://slack.cp20.dev previews a Slack payload (a message with blocks and attachments, a modal, or an App Home tab) as it looks in the Slack client, validates it against Slack API rules, and generates shareable links. It runs entirely in the browser with no server storage, account, workspace, or token required. Use this tool to: - preview a bot message, webhook post, slash command reply, modal, or App Home before sending it - validate a payload against Slack API rules (errors and warnings include line and column numbers) - look up supported blocks, elements, and limits Pages: `/` live editor and preview, `/gallery` rendered examples, `/docs` payload reference. ## Sharing a payload A share link has the form `https://slack.cp20.dev/#p1=…` and opens the payload directly in the editor. - If one of the examples below matches what you need, share its link directly. - Otherwise, ask the user to paste the JSON payload into https://slack.cp20.dev and select **Copy link**. - To generate share links in code, follow `encodePayload` in https://github.com/cp-20/slack-block-kit-preview/blob/main/src/share.ts (using the dictionary in https://github.com/cp-20/slack-block-kit-preview/blob/main/src/dictionary.ts). ## What you can paste - `{ "text", "blocks", "attachments", … }`: A message: the body of chat.postMessage, chat.postEphemeral, chat.update, an incoming webhook, or a response_url reply - `[ { "type": "section", … } ]`: A top-level array of blocks, as copied from Block Kit Builder - `{ "type": "modal", … }`: A modal view, or the body of views.open / views.push / views.update with the view under "view" - `{ "type": "home", … }`: An App Home view, or the body of views.publish ## Message payload | Field | Type | Description | | --- | --- | --- | | `text` | string | Message text in mrkdwn. With blocks, Slack shows the blocks instead and uses text for notifications and screen readers. Truncated after 40,000 characters. | | `blocks` | Block[] | Up to 50 blocks. | | `attachments` | Attachment[] | Legacy secondary content with a colored bar. Slack recommends blocks for new apps. | | `username` | string | Bot name override (needs chat:write.customize). Shown as the author in the preview. | | `icon_url` | string | Bot icon override. Shown as the avatar in the preview. | | `icon_emoji` | string | Bot icon as an emoji code such as ":robot_face:". Shown as the avatar in the preview. | | `mrkdwn` | boolean | false shows text without formatting. | | `response_type` | "in_channel" | "ephemeral" | For response_url and slash command replies. "ephemeral" adds the "Only visible to you" notice. | | `channel, thread_ts, …` | | Other API arguments are accepted and don't change the preview. | ## Views (modals and App Home) | Field | Type | Description | | --- | --- | --- | | `type` | "modal" | "home" | Which surface to show. | | `title` | plain_text ≤24 | Modal title. Required for modals. | | `submit` | plain_text ≤24 | Submit button text. Required when the modal has input blocks. | | `close` | plain_text ≤24 | Close button text. Defaults to "Cancel". | | `blocks` | Block[] | Up to 100 blocks. | | `callback_id, private_metadata, external_id` | string | Passed back to your app. Shown in the submit interaction. | ## mrkdwn Used by `text`, mrkdwn text objects, and attachment text. plain_text objects only convert `:emoji:` names. - `*bold* _italic_ ~strike~`: Inline formatting (can be combined, such as *_bold italic_*) - ``code` and ```preformatted````: Inline code and code blocks - `> quote`: Block quote (one line per >) - `, `: Links; bare URLs are linked too unless verbatim is true - `<@U0123ABCD> <#C0123ABCD> `: User, channel, and user group mentions - ` `: Broadcast mentions - ``: Dates in the reader's time zone ({date_num}, {date}, {date_short}, {date_long}, {date_pretty}, {time}, {ago}, …) - `:wave: :+1::skin-tone-3:`: Standard emoji by name, with optional skin tone - `& < >`: Escapes for &, <, and > ## Blocks | Type | Block | Fields | Works in | | --- | --- | --- | --- | | `section` | Section | text (≤3,000), fields (≤10, each ≤2,000), accessory, expand | All | | `header` | Header | text (plain_text ≤150) | All | | `divider` | Divider | | All | | `image` | Image | image_url or slack_file, alt_text, title | All | | `context` | Context | elements (1–10 images and text objects) | All | | `actions` | Actions | elements (1–25 interactive elements) | All | | `input` | Input | label, element, hint, optional, dispatch_action | All | | `rich_text` | Rich text | elements: rich_text_section, rich_text_list, rich_text_quote, rich_text_preformatted | All | | `markdown` | Markdown | text (standard markdown, ≤12,000 per message) | Messages | | `table` | Table | rows (≤100, each ≤20 cells of raw_text or rich_text), column_settings | Messages, one per message | | `video` | Video | video_url, thumbnail_url, alt_text, title, title_url, description, author_name, provider_name | All | | `file` | File | external_id, source: "remote" | Messages | | `context_actions` | Context actions | elements (feedback_buttons, icon_button) | Messages | ## Elements | Type | Fields | Used in | | --- | --- | --- | | `button` | text (≤75), action_id, value, url, style (primary, danger), confirm | Section, Actions | | `static_select, multi_static_select` | placeholder, options (≤100) or option_groups, initial_option(s), confirm | Section, Actions, Input | | `users_select, conversations_select, channels_select, external_select (and multi_)` | placeholder, initial_user / initial_conversation / initial_channel | Section, Actions, Input | | `overflow` | options (1–5, each may have a url), confirm | Section, Actions | | `datepicker, timepicker, datetimepicker` | initial_date (YYYY-MM-DD), initial_time (HH:mm), initial_date_time (UNIX seconds), placeholder | Section, Actions, Input | | `checkboxes, radio_buttons` | options (1–10, text can be mrkdwn, description), initial_option(s) | Section, Actions, Input | | `plain_text_input, email_text_input, url_text_input, number_input` | placeholder, initial_value, multiline, min_length, max_length | Input | | `rich_text_input, file_input` | initial_value / filetypes, max_files | Input | | `image` | image_url or slack_file, alt_text | Section accessory, Context | | `workflow_button` | text, workflow.trigger.url, style | Section, Actions | | `feedback_buttons, icon_button` | positive_button / negative_button, icon, text | Context actions | Text objects are `{ "type": "plain_text", "text": "…", "emoji": true }` or `{ "type": "mrkdwn", "text": "…" }`. Buttons, headers, labels, placeholders, and titles take plain_text only. ## Attachments (legacy) | Field | Type | Description | | --- | --- | --- | | `color` | string | Bar color: a hex code such as "#2EB67D", or "good", "warning", or "danger". | | `pretext` | string | Text above the attachment. | | `author_name, author_link, author_icon` | string | Small author line with an icon. | | `title, title_link` | string | Bold title, linked when title_link is set. | | `text` | string | Main text in mrkdwn. | | `fields` | { title, value, short }[] | short: true puts two fields side by side. | | `image_url, thumb_url` | string | A large image below, or a small thumbnail on the right. | | `footer, footer_icon, ts` | string, string, number | Footer line with a time from ts (UNIX seconds). | | `blocks` | Block[] | Blocks inside the colored bar. | | `fallback` | string | Plain text for notifications and clients that can't show attachments. | | | Blocks | Attachments | | --- | --- | --- | | Layout | Any order of sections, images, buttons, inputs, and more | Fixed card: author, title, text, fields, image, footer | | Color bar | No (wrap blocks in an attachment to get one) | Yes, from color | | Interactive elements | Buttons, menus, pickers, inputs | None (legacy interactive attachments are retired) | | Limits | 50 blocks per message, 100 in modals and App Home | 100 attachments per message | ## Examples Each example includes the full JSON payload and a ready-to-open share link. ### Deploy approval (Block Kit message) An approval request with a header, two-column fields, an overflow menu, primary and danger buttons with a confirmation dialog, and a context line Link: https://slack.cp20.dev/#p1=nZq_TsMwEMZfxQKxRNSxnQghhqJCmRioisQEaivSoYAgaiASSDwXO0_Gd3acuE3cuMz-kzv7_Pn8u9TmjqFqb58ADxpgn4FiQGDwFh4s8hUrFZcpF_SoBInOPuzkbQf32S6rVygRuN_270uwVxApIVUyurgcD_FEJooM0zPzmch1LaKGqHEq4vevVLXAE57KDEQVNKiAXy_vQDD05k6EBZ6cYqnrbHpubmPBjMhFnWYE36d3K4AXgkVbC9SojG7U69U_2w0hPvBCgpTeCZv2TT2qOCEH-ImrPkXsLmuoFbeAw18gh1hVqVmy15RC9zzAue0MiABdQWmR2DbkZV7F89zNuFv9J1XdxA5IuNo9wNRdqb9UuggA5nXMEjaZFjvHXekCyhqXMoYKLtQR68oCyPdmlkaTnRuniq9AvXYjc5HjDJQUlds3WtBRHtXDPZGpDRsomQp3KTpNWS-fTDq7ddcGGTK1g_vtoCfYXgmjmduQOTPReetDPcJE0lLJHACjpotgfKaaBexLxA64zqqPbV-jhIhWokVaccLyYc9SBCTc1wTfW7SotSHuSezcyRKKNctXwOOEfoL2T4ucM2TTAL8K2SFFbGLMPSr_TxoLJPrP_DFXgmfLMgZ2x_eKGHUUFJsGkueAgxuJ6tTu7a4DbztlrM7JT0Ui0lSIntxc18blMVNCnQzZ7w_-7jBus0Pr9sP3Hw ```json {"text":"Deploy request: checkout-api v2.14.0 to production","blocks":[{"type":"header","text":{"type":"plain_text","text":":rocket: Deploy request","emoji":true}},{"type":"section","text":{"type":"mrkdwn","text":"<@U0123ABCD> wants to deploy *checkout-api* to *production*.\nThe canary has been healthy for 30 minutes."},"accessory":{"type":"overflow","action_id":"deploy_more","options":[{"text":{"type":"plain_text","text":"View diff","emoji":true},"value":"diff"},{"text":{"type":"plain_text","text":"Open runbook","emoji":true},"value":"runbook","url":"https://example.com/runbooks/checkout-api"},{"text":{"type":"plain_text","text":"Snooze for 1 hour","emoji":true},"value":"snooze"}]}},{"type":"section","fields":[{"type":"mrkdwn","text":"*Version*\n`v2.14.0`"},{"type":"mrkdwn","text":"*Previous*\n`v2.13.2`"},{"type":"mrkdwn","text":"*Changes*\n12 commits, 3 PRs"},{"type":"mrkdwn","text":"*Error rate*\n0.02% :large_green_circle:"}]},{"type":"actions","block_id":"deploy_actions","elements":[{"type":"button","action_id":"approve","style":"primary","text":{"type":"plain_text","text":"Approve","emoji":true},"value":"deploy-2140"},{"type":"button","action_id":"reject","style":"danger","text":{"type":"plain_text","text":"Reject","emoji":true},"value":"deploy-2140","confirm":{"title":{"type":"plain_text","text":"Reject this deploy?","emoji":true},"text":{"type":"mrkdwn","text":"The requester will be notified and the canary will be rolled back."},"confirm":{"type":"plain_text","text":"Reject","emoji":true},"deny":{"type":"plain_text","text":"Keep it","emoji":true},"style":"danger"}},{"type":"button","action_id":"view_pipeline","text":{"type":"plain_text","text":"View pipeline","emoji":true},"url":"https://example.com/pipelines/2140"}]},{"type":"context","elements":[{"type":"image","image_url":"https://slack.cp20.dev/samples/person-1.png","alt_text":"Requester"},{"type":"mrkdwn","text":"Requested · Pipeline #2140"}]}]} ``` ### ランチ投票 (Block Kit message) A poll in Japanese: each option is a section with a button, followed by a context line of voter avatars Link: https://slack.cp20.dev/#p1=vVpNS8NAEP0rwWPANElv-1ssBatoUWowpOBBaBoEQfFQD6IXEQ8iUnqtWvwzIdKc_Au-2Wnrxn6wSUPPgZ3Jm7ezzLw3S5fVJxJRo1epv4WsEK73G-b8sVKbZV0aWvHVz-jRNMQuSHUidlqOK2zboI9RP45uoQiS9kYqr5S0O90lBc2fmThF720Jw5SJQZkk1RHUS18uoNoh4eTjDvHGT9fJJbTrgWNjQI7DT6RPBFp5IdW7Tpv_uoylx-EZ6iqp_hoJn6SCULwl-njGjqyG59rW3n67gqUS9i5-BVtCrFK3HcvD6Jtpw5wbRFAV8eIRXM0Ii2By50GqFaJBI8BSlmjQBecgWY_AAcm8Nzd9uCEGfMGiAE2_l4bDOHxnG0N-Csg4pVCAT9oEBaprFMgpq0B-4B82UaBkAIl-iOqwJ-i7jzYycc2gSk4VK6yp90VpNmRZIHdC_oLJuKUUjE_SL9h_CNjyNDFskA8nYw3ayuC6oCVqvt4qAFigT0cWLQAEXun2Wd07DjBjNQ_QVpPO_fgZ7pEe2zCWYoNI9AO1818 ```json {"text":"今日のランチ投票","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"*今日のランチどこにする?* :bento:\n12:00 にロビー集合です。"}},{"type":"divider"},{"type":"section","text":{"type":"mrkdwn","text":":ramen: *ラーメン*\n駅前の店。行列は10分ほど"},"accessory":{"type":"button","action_id":"vote_ramen","text":{"type":"plain_text","text":"投票","emoji":true},"value":"ramen"}},{"type":"context","elements":[{"type":"image","image_url":"https://slack.cp20.dev/samples/person-1.png","alt_text":"投票者"},{"type":"image","image_url":"https://slack.cp20.dev/samples/person-2.png","alt_text":"投票者"},{"type":"plain_text","text":"2票","emoji":true}]},{"type":"section","text":{"type":"mrkdwn","text":":curry: *カレー*\nビル2階。辛さを選べます"},"accessory":{"type":"button","action_id":"vote_curry","text":{"type":"plain_text","text":"投票","emoji":true},"value":"curry"}},{"type":"context","elements":[{"type":"image","image_url":"https://slack.cp20.dev/samples/person-3.png","alt_text":"投票者"},{"type":"plain_text","text":"1票","emoji":true}]},{"type":"section","text":{"type":"mrkdwn","text":":sushi: *寿司*\n少し歩きます。13時までのランチセット"},"accessory":{"type":"button","action_id":"vote_sushi","text":{"type":"plain_text","text":"投票","emoji":true},"value":"sushi"}},{"type":"context","elements":[{"type":"mrkdwn","text":"まだ投票がありません"}]},{"type":"divider"},{"type":"actions","elements":[{"type":"button","action_id":"add_option","text":{"type":"plain_text","text":":heavy_plus_sign: 候補を追加","emoji":true},"value":"add"}]}]} ``` ### Menus and pickers (Block Kit message) Section accessories and an actions block with channel, user, static and multi-select menus, date and time pickers, checkboxes, and radio buttons Link: https://slack.cp20.dev/#p1=vVpNT8JAEP0vHgkxiCe9IZDowQRTE0-GNLTEJqBY7MGD_933ZrelZTtlt36cuzs7s_OxM--1UhfEwAFRrZqSNhtCPKJJVS7eW-3BZJPmQBRsqULIGC6J2ERsPnFI3gHlSJNzerwtg5x2oZGlRk5V94cBL2pkUOS41O_IYiS57QtqhX90Mb6c3Exn_Tw_iIh1AUrDVQjBJqgVEQIDdQidsFdvoquT2FvJQTcwNXB6bA5W7Q_qi26J4xHUEMzWkVnWWsJ9tDOwXZkT-hKAU5WMid306Kel3adJVpAUOqXtVhb6ig27Ai-RU_gWGboRXFCViP5QVp2hcPaKz4ciA0Bo6AJBewdaLKrjxjtFsFkHynMIITu_jMfXo1GfJJX9RxWpl4WLmDBgk6cSgF61VB2bdhS1lM396o4Mcb9hVESaZpuqJqgjW5KB-ar7qSMdnVNnGKqBIosIOboMw4QfsNBvYpGUrqgntLhXjBG8_Z3F4b-1cdPU0eAJPBlUwOSBnr2hAhm0AB0MCb4fGigZTAv4SmmGasHR3e21T8x1z3NU4G7_sH3kDiLWa3DlMu52vRbeFX0Rfxr1taK2KxccIiJ06F_kb0khV9A84u9U9avqETif1YsqDkwjP8PxEOdlJ7hOAp8_NfTudZ2Dx8txZ6DFVP0yLvO3dVXYBkWz1i6AvWJxKyjUCGJkU0x6d_lBrM4_lOd2H6JZb3O7wDCDLjt107NFwq9Q-CPADcfqGbffwx3nL9lL3AxMCH8mUeUl5QLx2fPXNw ```json {"text":"Notification settings","blocks":[{"type":"header","text":{"type":"plain_text","text":"Notification settings","emoji":true}},{"type":"section","text":{"type":"mrkdwn","text":"*Alerts channel*\nWhere new alerts are posted."},"accessory":{"type":"channels_select","action_id":"alerts_channel","placeholder":{"type":"plain_text","text":"Select a channel","emoji":true},"initial_channel":"C0123ABCD"}},{"type":"section","text":{"type":"mrkdwn","text":"*Severity*\nOnly page for these levels."},"accessory":{"type":"static_select","action_id":"severity","placeholder":{"type":"plain_text","text":"Choose a level","emoji":true},"initial_option":{"text":{"type":"plain_text","text":"High and above","emoji":true},"value":"high"},"options":[{"text":{"type":"plain_text","text":"Everything","emoji":true},"value":"all"},{"text":{"type":"plain_text","text":"Medium and above","emoji":true},"value":"medium"},{"text":{"type":"plain_text","text":"High and above","emoji":true},"value":"high"},{"text":{"type":"plain_text","text":"Critical only","emoji":true},"value":"critical"}]}},{"type":"section","text":{"type":"mrkdwn","text":"*Quiet hours start*"},"accessory":{"type":"timepicker","action_id":"quiet_start","initial_time":"22:00","placeholder":{"type":"plain_text","text":"Select time","emoji":true}}},{"type":"section","text":{"type":"mrkdwn","text":"*Pause notifications until*"},"accessory":{"type":"datepicker","action_id":"pause_until","placeholder":{"type":"plain_text","text":"Select a date","emoji":true}}},{"type":"section","text":{"type":"mrkdwn","text":"*Send me*"},"accessory":{"type":"checkboxes","action_id":"digest","initial_options":[{"text":{"type":"mrkdwn","text":"*Daily digest*"},"value":"daily","description":{"type":"mrkdwn","text":"Every morning at 9:00"}}],"options":[{"text":{"type":"mrkdwn","text":"*Daily digest*"},"value":"daily","description":{"type":"mrkdwn","text":"Every morning at 9:00"}},{"text":{"type":"mrkdwn","text":"*Weekly report*"},"value":"weekly","description":{"type":"mrkdwn","text":"Mondays, with trends"}}]}},{"type":"actions","elements":[{"type":"multi_static_select","action_id":"teams","placeholder":{"type":"plain_text","text":"Teams to follow","emoji":true},"initial_options":[{"text":{"type":"plain_text","text":"Payments","emoji":true},"value":"payments"}],"option_groups":[{"label":{"type":"plain_text","text":"Product","emoji":true},"options":[{"text":{"type":"plain_text","text":"Payments","emoji":true},"value":"payments"},{"text":{"type":"plain_text","text":"Search","emoji":true},"value":"search"}]},{"label":{"type":"plain_text","text":"Platform","emoji":true},"options":[{"text":{"type":"plain_text","text":"Infrastructure","emoji":true},"value":"infra"},{"text":{"type":"plain_text","text":"Security","emoji":true},"value":"security"}]}]},{"type":"users_select","action_id":"escalate_to","placeholder":{"type":"plain_text","text":"Escalate to","emoji":true}},{"type":"radio_buttons","action_id":"format","initial_option":{"text":{"type":"plain_text","text":"Compact","emoji":true},"value":"compact"},"options":[{"text":{"type":"plain_text","text":"Compact","emoji":true},"value":"compact"},{"text":{"type":"plain_text","text":"Detailed","emoji":true},"value":"detailed"}]}]}]} ``` ### Rich text (Block Kit message) A rich_text block with bold and italic text, ordered and nested bullet lists, a quote, preformatted text, mentions, dates, and a color Link: https://slack.cp20.dev/#p1=rZnRTsIwFIZfZdGYaCKjjKGyu4FcmJhgFi8xZg6FGdORFeKVz-W9T-Z_2jFaWXELuzMCPSenp-3_f6dM944nKA5gg9iAXqLRqtJvS9r9UVJ5Rg8ZX0Clgg3pMsgsNYYLe0lWST3rAjN-n0nOpci1dNt6OKl96IICHlwDhZFdvGF95vuMXcJIkvCnosmbEl_UvCgbBowdSB1-vE6kwbBOJG9gj-Q6008MFgIj3L6qZT2vH47Gt_aFZvwEp0STpMd6kCZy_zEDIAYGe8NLvFR4kAA2xHbJlZ0YjAgvPqYYG7G05dokaIRRDaJI4AVqUizftMkkdyk6jGDwCqVBcrVKWfoyGoqQQe61WdQQoDGhOirK5Z8RHhLpgndS3O4tFBCzUsIbIHKCXotqy2atRX1fHALwYvdjTqNATA-AisHCim5Q_FW4GHRjI6ldcOL1Nt-qLXgw9Zc6EuP_j4RrK1JjLDCJomnkECcLtl3-vC56_l1t0nnKIR_SObQgmPdFG_vzAOoLbIqpq3k9VFriYhjggu52V-UPRfeDrtCOavDd0sZ_7Wfj59sI_JJn8TwB2Cc_S9smX_z89cAK9o_UCFLvO40J2BcELzW6Q9K8nXQ79Sajq2s0BbXt09cv ```json {"text":"Incident summary","blocks":[{"type":"rich_text","elements":[{"type":"rich_text_section","elements":[{"type":"emoji","name":"rotating_light"},{"type":"text","text":" Incident summary","style":{"bold":true}},{"type":"text","text":"\nLogin errors from "},{"type":"date","timestamp":1780304400,"format":"{time}","fallback":"09:00"},{"type":"text","text":" to "},{"type":"date","timestamp":1780305900,"format":"{time}","fallback":"09:25"},{"type":"text","text":". Owner: "},{"type":"user","user_id":"U0123ABCD"},{"type":"text","text":"\n"}]},{"type":"rich_text_list","style":"ordered","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"Token refresh started failing after a config push"}]},{"type":"rich_text_section","elements":[{"type":"text","text":"Rolled back the config","style":{"bold":true}},{"type":"text","text":" and errors stopped"}]}]},{"type":"rich_text_list","style":"bullet","indent":1,"elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"Affected about 4% of sign-ins"}]},{"type":"rich_text_section","elements":[{"type":"text","text":"No data loss","style":{"italic":true}}]}]},{"type":"rich_text_quote","elements":[{"type":"text","text":"Add a canary step for config changes. Tracking in "},{"type":"channel","channel_id":"C0123ABCD"},{"type":"text","text":"."}]},{"type":"rich_text_preformatted","elements":[{"type":"text","text":"ERROR auth: refresh_token rejected (invalid_grant)"}]},{"type":"rich_text_section","elements":[{"type":"text","text":"Postmortem: "},{"type":"link","url":"https://example.com/postmortems/login-errors","text":"login-errors"},{"type":"text","text":" · "},{"type":"broadcast","range":"here"},{"type":"text","text":" "},{"type":"text","text":"status","style":{"code":true}},{"type":"text","text":" is "},{"type":"color","value":"#2EB67D"}]}]}]} ``` ### Images and video (Block Kit message) An image accessory, an image block with a collapsible title, and a video block with a thumbnail Link: https://slack.cp20.dev/#p1=pZnLasMwEEV_xXTVBiKlzi6LQvqAbgqFhq5aQnDdGgqNsUx3-a7s82U5M5KDhR0Sk60F0pVGHs09c5C74AFIymJdr_GXgkI8Db9sF6OFkHGgiCNnjZJZRr6rVkvxsctveE4x-_h79Wuq88WqAkFw7HVFWaU65FOVZ6vS6zESvaG_jyNf_5qsTCfmK_-30BMAg7O0DH5yU2LwomTz0pBCHY8CMSSDyT7Guo-wRPuWDNIpM3Vlzv1JidXniBq86dpFZBPBc-TSOJQghbO-ToXp3nRUe3ceqw7Q0ECBrK7obIj4WCdjkv4Co0_GM6xOCWG4EYorQUqafCIpfUX2KSlWqLqYpWOl-5EIYPmA1N0Y0AXjOzSsLmQgoh5PvnshDydjNHA0-RxGA2l91xC1YjbseXoD0oILuQQ8zZPbdDq_f3i8S3bbZApVQ_oVie5zswc ```json {"text":"Trip photos and a video","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"*Team offsite* :camera_with_flash:\nPhotos from the lake trail and the recap video."},"accessory":{"type":"image","image_url":"https://slack.cp20.dev/samples/ridge.png","alt_text":"Mountain ridge"}},{"type":"image","title":{"type":"plain_text","text":"lake-trail.png","emoji":true},"image_url":"https://slack.cp20.dev/samples/lake.png","alt_text":"A lake in the mountains"},{"type":"video","title":{"type":"plain_text","text":"Offsite recap (2 min)","emoji":true},"title_url":"https://example.com/videos/offsite-recap","description":{"type":"plain_text","text":"Highlights from both days","emoji":true},"video_url":"https://example.com/videos/offsite-recap/embed","thumbnail_url":"https://slack.cp20.dev/samples/forest.png","alt_text":"Forest path","author_name":"Events team","provider_name":"Example Video"},{"type":"context","elements":[{"type":"mrkdwn","text":"Shared in <#C0123ABCD> · 3 files"}]}]} ``` ### Table (Block Kit message) A table block with a header row, right-aligned number columns, and a rich text cell Link: https://slack.cp20.dev/#p1=gzs3HDgUBxoXSAWOTieDopoCx2uhGqYF7qkCu6HAoRFgqQXqYKeVgss7ZE_CmjWY7SJgk684vrwosaAA2NCFhDJQG7ARmA7qTgJL4YwScNMJt0gyeOhdqTaWqFZTMLAxg78tBp4gAQ1e4lfmAxqxIqwsBDj4kwJyHD5HOYNGXMoyU8uBYYDXNEMLHRMjAwJqzHUszQioedQ2kZCbgjMyCwrAMwGg4CXkMEsdCwMTQkosDQ0JOWsymrNo0t0IAI7jIPpLKB0JYNERi9eJZjpGxsb4fWGqY2FOVPgj20RazRUMHIBKTrVSgFfW0MFdPeBonX5KYnEGeM6pWB-WJ2ucYZkTLmkHdAAQAgA ```json {"text":"Weekly metrics","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"*Weekly metrics* for the checkout funnel"}},{"type":"table","column_settings":[{"is_wrapped":true},{"align":"right"},{"align":"right"},{"align":"center"}],"rows":[[{"type":"raw_text","text":"Step"},{"type":"raw_text","text":"This week"},{"type":"raw_text","text":"Last week"},{"type":"raw_text","text":"Trend"}],[{"type":"raw_text","text":"Cart viewed"},{"type":"raw_text","text":"18,420"},{"type":"raw_text","text":"17,960"},{"type":"raw_text","text":"↑"}],[{"type":"raw_text","text":"Shipping entered"},{"type":"raw_text","text":"9,804"},{"type":"raw_text","text":"9,911"},{"type":"raw_text","text":"↓"}],[{"type":"rich_text","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"Paid","style":{"bold":true}}]}]},{"type":"raw_text","text":"6,233"},{"type":"raw_text","text":"5,870"},{"type":"raw_text","text":"↑"}]]},{"type":"context","elements":[{"type":"mrkdwn","text":"Source: "}]}]} ``` ### Markdown (AI apps) (Block Kit message) A markdown block with standard markdown, as used by AI apps, followed by feedback and delete buttons Link: https://slack.cp20.dev/#p1=lZndSsNAEIVfZWgFNdgt1bteCPUHlIIttheCW5q0UVqQJCQS0AfwAXxEn8RzJrsx1KItvWqyO7ObZGfmfFMvl72dQxIJ0jfJUyVW0LGD8S1gzNvW3fyuKtptuedUhX_1ZL5QdAdUF3vLvC5B4KkZzTD-BEGfo3tGLkk2OJC8gYMhaoOJR7hfH5_eeoEP5tSgz5C9pBjlmJSCMkhfQQakurbJmUFXq0zBA_xlWlU-95pHz8DJymWAKZB2uYhzGcK6qm0ESxANJSeccEKGQMJV2eIKKeCREIjEwCwM54dhuIiKlU2WOM3SeZDxaDIVf6ajbG0cbzMAKN2y1-VmxFqbiHRuxLYGKqPX71ru9NGRwVJyOZiOhtd3tqUO6EdbUZT8WMoj9wSagRjCg1p1CWZH3mnTYZwuC3V5bJqVp4uP878PPWBkrOp1e0lXgbS5H4W7WVqgFCqf3IQdSyHtH1bGNs7ZT2xVUY7_CRjq_h4uAF_-cbCIYL_xhDSR11Gvue0YjwqptbbniAc-r2K1Wwi7UguboWmG3zc ```json {"text":"Here's how to rotate an API key","blocks":[{"type":"markdown","text":"## Rotating an API key\n\nYou can rotate a key **without downtime**:\n\n1. Create a new key in *Settings → API keys*\n2. Deploy it alongside the old one\n3. Revoke the old key once traffic moves over\n\n> Keys are shown only once, so store the new one right away.\n\n```bash\ncurl -X POST https://api.example.com/v1/keys \\\n -H \"Authorization: Bearer $TOKEN\"\n```\n\nMore in the [key management guide](https://example.com/docs/keys)."},{"type":"context_actions","elements":[{"type":"feedback_buttons","action_id":"answer_feedback","positive_button":{"text":{"type":"plain_text","text":"Good answer","emoji":true},"value":"good"},"negative_button":{"text":{"type":"plain_text","text":"Bad answer","emoji":true},"value":"bad"}},{"type":"icon_button","action_id":"delete_answer","icon":"trash","text":{"type":"plain_text","text":"Delete","emoji":true}}]}]} ``` ### Ephemeral reply (Block Kit message) A response_url reply with response_type "ephemeral": only the person who triggered it sees it Link: https://slack.cp20.dev/#p1=q8ZTCsIVgWdsQF1LUMcW1AcHd05hQ7eUeRRSTIEmDyD9Xi0jhQJg4xRoOngkvVgLPlYN6u6Ce9Wg8ezUcj3ygkgLXnhBB7v0gKMX-iAri_VNLAxrlIGEgiNwAAlYMAKHQoDd6PLUJOD4UzbQ4yDf2gGTpz9weAw4SGMEGusA9sbT80FJCm8WRc79EOfHA-0hLlUHgdWjJTP09itWz9AihMxAIWQGnGUC1kDwceS0nMT0YqSQMYWOC5MdNGY0DhozlKAhsnxDdmkxcFS7ClyZEeNKUEYBDufBB7gxXAyrJyDGxhumKAELqNhaAA ```json {"response_type":"ephemeral","text":"Only you can see this reminder","blocks":[{"type":"section","text":{"type":"mrkdwn","text":":wave: You have *2 pull requests* waiting for your review."}},{"type":"section","text":{"type":"mrkdwn","text":"**\nOpened 2 days ago"},"accessory":{"type":"button","action_id":"review_481","text":{"type":"plain_text","text":"Review","emoji":true},"url":"https://example.com/pulls/481"}},{"type":"section","text":{"type":"mrkdwn","text":"**\nOpened 5 hours ago"},"accessory":{"type":"button","action_id":"review_486","text":{"type":"plain_text","text":"Review","emoji":true},"url":"https://example.com/pulls/486"}},{"type":"actions","elements":[{"type":"button","action_id":"snooze","text":{"type":"plain_text","text":"Remind me tomorrow","emoji":true},"value":"snooze_1d"}]}]} ``` ### Text formatting (Text and attachments) A text-only message using mrkdwn: formatting, links, mentions, a date, a quote, a code block, and emoji Link: https://slack.cp20.dev/#p1=VdlBC4IwGAbgv7KiU6QttUihQaXVvUMXIcGkOrSEUafyt_d-36YYiIfJ1CF75_ese93xCRYHGLCuN-biEtNdzoJwvdmmij4KNhPM7V7XAAosOgzzUGkUV-bMxWaDUlNgxYEjsUeSnDRUj15R3vq8wwLBQ4LIaL7IdvuD4m69gOkeNxA2xXKtsOMDgyLEBjzgZl2QLWUs40BKF2jkDf0gY7qy6q_8XKfP0iSiiy5HXT7sYnrBpakbyef4NzDL7GoiCtfgt7i8guS8qiLXRYHTSOj6wf7mxu55OGypIErzznXG7eg4mwQyEvT35vq6nG1pk4AI9Tw5BOV2YsBGHmZY5YXJ8PsD ```json {"text":"*Weekly update* for <#C0123ABCD>\n\nWe shipped _search filters_ and ~the old export page~ is gone. Thanks <@U0456EFGH> and ! :tada:\n> Next review is .\nDocs: , `filters.enabled = true`\n```\n$ npm run export -- --format csv\nExported 1,204 rows\n```\n please try it out :+1::skin-tone-3:"} ``` ### Incoming webhook (Text and attachments) The simplest webhook payload, with a custom bot name and emoji icon Link: https://slack.cp20.dev/#p1=q0Yuh5xKgeNKCk75IN-hllZADnBEvBSShkEjA6lFoEQNNQSiT0vZ0NLYUAs4NlAMGlIEdlATcoHBlQDqjRrnKhgaFStgFl4xefDCBDr4pAccTdBPAplYrA8ysCYsEzjgABawUzi0HTh-kpkOzHpAG4BdZ2BpZGBoZOzo5Oxip1QLAA ```json {"username":"Build Bot","icon_emoji":":construction_worker:","text":"Build *#1931* passed on `main` in 3m 12s :white_check_mark:\n · triggered by <@U0123ABCD>"} ``` ### Attachments (Text and attachments) Legacy attachments with good, warning, and hex colors, an author line, short fields, a thumbnail, pretext, and footers with times Link: https://slack.cp20.dev/#p1=dZnBTsMwDIZfpRLiMo00yYJWuMHYgQu3HSdltAGmMVQ1GxJIe_f9TrIm7dprJMe1ndr5v7Sf-0ZYhigmNRYQQkwu6Fy6WI7JHSeGpqkeW2HaAUtYot4bC65I1h0puHiNSz05aNFUd6ysJWeV-c2BOEABbA4CCTbEasiwtnMMOhoUjgFoMRCK_P0IamZz8TATMX4xlYUKW0E1y32mBB309JwGp8_A8-VX8lPrPU6Dplt1IjypasFgQfPb_9QXk2LO1G3PYg1vF4nq8uNlasFnXCnOace-IO1kXWYf35sd2A8FkSTpat1HrF2FQTkYuFXJDlY7UKABH_HSEhd9YokzYEQ0f4x2GBDsI2VrAEWbypUtDeBmycXy_qkbwIuhZwjzUwKnHavt4TETntlZ4neEBx3RhlHEAH2bJO4x42C5qj9xGTXZxDXaO0z67b-ZEC9RTDJBFMZxXQq4rUvrI5ZmjtKsT2c ```json {"text":"Nightly checks finished","attachments":[{"color":"good","fallback":"Unit tests passed","author_name":"CI","author_icon":"https://slack.cp20.dev/samples/avatar.png","title":"Unit tests passed","title_link":"https://example.com/builds/1931","text":"1,284 tests in 2m 41s","fields":[{"title":"Branch","value":"`main`","short":true},{"title":"Coverage","value":"87.4%","short":true}],"footer":"CI","ts":1780304400},{"color":"warning","fallback":"2 flaky tests","title":"2 flaky tests","text":"`checkout.spec.ts` and `search.spec.ts` passed on retry.","thumb_url":"https://slack.cp20.dev/samples/record.png"},{"color":"#E01E5A","fallback":"Dependency audit: 1 high severity issue","pretext":"Dependency audit","title":"1 high severity issue","text":"Upgrade *image-resize* to 4.2.1 or later.","footer":"audit","ts":1780304700}]} ``` ### Blocks with a color bar (Text and attachments) Blocks wrapped in an attachment to get a colored bar, a common pattern for status alerts Link: https://slack.cp20.dev/#p1=gzs3ILESFLPALnZRWSZwyArYi0xJTQdW2-DGJa4uj7Krs5ORkStlfoUXYApaeFwBTBbOoBGpAogSSC-4GFg7ggdRwZ3w0sQcPej0CWisKh84rAoexcgDtdiBg3p6OEKViEQZDBqgAjsCXo5aGBgbmJgYGMRBC04DSysDAzvkRhyGKZ65wPHaEqAhdYamqqC-ObgYB444FCsBEyRCI5EZDrlMAfWIicokjsmgUSDg8Di4tEFOuojuAaw0QxRgmXnJuubmyJ7D6grILEA8aMiMONcAwxU0bQDVgOoa1DIQYrQedIhSDzjmBAozEAQA ```json {"text":"Payment service is degraded","attachments":[{"color":"#ECB22E","blocks":[{"type":"section","text":{"type":"mrkdwn","text":":warning: *Payment service is degraded*\nCard payments are slower than usual. Other methods work normally."}},{"type":"section","fields":[{"type":"mrkdwn","text":"*Started*\n"},{"type":"mrkdwn","text":"*Impact*\n~15% of checkouts"}]},{"type":"actions","elements":[{"type":"button","action_id":"ack","text":{"type":"plain_text","text":"Acknowledge","emoji":true},"style":"primary","value":"inc-77"},{"type":"button","action_id":"status_page","text":{"type":"plain_text","text":"Status page","emoji":true},"url":"https://status.example.com"}]}]}]} ``` ### Modal form (Modal or App Home) A modal with a title, submit and close buttons, and input blocks with a select menu, date pickers, checkboxes, and a multiline text input Link: https://slack.cp20.dev/#p1=pZpNC8IwDIb_imdBUdGBHvTkx8GDqHgT6UFR9CAb7Pf7JlnFrnbNNjzapmnTpMmTeSWAW5ZQSLgAalzSK4NtpffuZbQU5JheOiPkoY1rFmjYtFJqZRBuqQATwDnTDoLgYDxJlqv1Zi6MgCr17AlyQ3X3G7g-v_YdG_4pXPgfXblylKHubvwqqiohKFbTpwUHQeGmU8x0F6-ZDJyMwHpPjo2QuR3AZxYXeCAiz_g3KBItnadW3A7pIResIWFgpzIAkaParMwylXaV1iOQmcK4wSTbLuhl8KOkN0h6w0nsIgLFK_XdEoNtqa6sFlJ2GlP2bl43zCIVXMqg28EG02kH_JpFthCsRzwd1H7wNThhOgPUJ9oErx2jUe0lttZRyiagHr_OoJXkYk3OGs1m3zsV-Oj0yB7Uc0IsZYxqwy6Ra4XZIiyp2FCJSdWJjPgqQTohTGaLngKx9UU5p_g52np55wzvMBzFpDPqqwsS7g5HfHO70mVhQkxsHw_NGb8P ```json {"type":"modal","callback_id":"time_off_request","title":{"type":"plain_text","text":"Request time off","emoji":true},"submit":{"type":"plain_text","text":"Submit","emoji":true},"close":{"type":"plain_text","text":"Cancel","emoji":true},"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Your manager <@U0456EFGH> will be asked to approve."}},{"type":"input","block_id":"type","label":{"type":"plain_text","text":"Type","emoji":true},"element":{"type":"static_select","action_id":"type","placeholder":{"type":"plain_text","text":"Select a type","emoji":true},"options":[{"text":{"type":"plain_text","text":"Vacation","emoji":true},"value":"vacation"},{"text":{"type":"plain_text","text":"Sick leave","emoji":true},"value":"sick"},{"text":{"type":"plain_text","text":"Personal","emoji":true},"value":"personal"}]}},{"type":"input","block_id":"start","label":{"type":"plain_text","text":"First day","emoji":true},"element":{"type":"datepicker","action_id":"start","initial_date":"2026-06-15"}},{"type":"input","block_id":"end","label":{"type":"plain_text","text":"Last day","emoji":true},"element":{"type":"datepicker","action_id":"end","initial_date":"2026-06-19"}},{"type":"input","block_id":"half_day","optional":true,"label":{"type":"plain_text","text":"Half days","emoji":true},"element":{"type":"checkboxes","action_id":"half_day","options":[{"text":{"type":"plain_text","text":"First day is a half day","emoji":true},"value":"first"},{"text":{"type":"plain_text","text":"Last day is a half day","emoji":true},"value":"last"}]}},{"type":"input","block_id":"note","optional":true,"label":{"type":"plain_text","text":"Note","emoji":true},"hint":{"type":"plain_text","text":"Visible to your manager only","emoji":true},"element":{"type":"plain_text_input","action_id":"note","multiline":true,"placeholder":{"type":"plain_text","text":"Anything they should know?","emoji":true}}},{"type":"context","elements":[{"type":"mrkdwn","text":":calendar: You have *12 days* left this year."}]}]} ``` ### App Home (Modal or App Home) An App Home tab with a greeting, a task list with buttons, and actions Link: https://slack.cp20.dev/#p1=rZm9DoIwFIVfpZsJgyIsyOBgeAHRlQAJiTKIBHQw8eE9BywUA6YlhJFCe0_b-_PdyZpl1gY07R6J-vz6WRQvnv0JmbUXyb7TCuVvUzwDj9Rtdc0kHACMrI-8cM2N_XtR1DuIPB5O_qpnV9gNHpgyerbMzbOads0DlKe25u27DAptiBBWCOIPSnN0RXVPs1taiqwCvMHNCkCGu0jg2e7O9mx7LCK8JYzdG8maAWTEWz1VA4z9kbT3mJQDP1pEjgMBUQotAFcITUBEBHKe_EKAT6UgDNp8GbRpsl9jg52lDHYGBmv6XXU5gHMx_6TUejI0aS2R3dXv9xO3dnTarorRmuTUjx5MEinTmIXpc176gu9EsuHyEyIwMj3ZNyEOAxXGBsBNRHg- ```json {"type":"home","blocks":[{"type":"header","text":{"type":"plain_text","text":"Good morning :sunny:","emoji":true}},{"type":"section","text":{"type":"mrkdwn","text":"Here's what needs your attention today."},"accessory":{"type":"button","action_id":"refresh","text":{"type":"plain_text","text":"Refresh","emoji":true}}},{"type":"divider"},{"type":"section","text":{"type":"mrkdwn","text":"*Your tasks*"}},{"type":"section","text":{"type":"mrkdwn","text":":white_circle: *Review Q3 roadmap draft*\nDue "},"accessory":{"type":"button","action_id":"done_1","text":{"type":"plain_text","text":"Done","emoji":true},"value":"task_1"}},{"type":"section","text":{"type":"mrkdwn","text":":white_circle: *Book a room for the design review*\nNo due date"},"accessory":{"type":"button","action_id":"done_2","text":{"type":"plain_text","text":"Done","emoji":true},"value":"task_2"}},{"type":"actions","elements":[{"type":"button","action_id":"new_task","style":"primary","text":{"type":"plain_text","text":"New task","emoji":true}},{"type":"button","action_id":"settings","text":{"type":"plain_text","text":"Settings","emoji":true}}]},{"type":"context","elements":[{"type":"mrkdwn","text":"Tip: type `/task` in any channel to add one."}]}]} ```