Markdown block
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.
Fields
Field | Type | Description | Required? |
---|---|---|---|
type | String | The type of block. For a markdown block, type is always markdown . | Required |
text | String | The standard markdown-formatted text. Limit 12,000 characters max. | Required |
block_id | String | The block_id is ignored in markdown blocks and will not be retained. | Optional |
The following are supported markdown
types.
Markdown Type | Example | Result |
---|---|---|
Bold | **this is bold** or __this is bold__ | this is bold |
Italic | *this text is italicized* or _this text is italicized_ | this text is italicized |
Bold and nested italic | **this text is _extremely_ important** | this text is extremely important |
All bold and italic | ***all of this is important*** | all of this is important |
Links | [my text](https://www.google.com) | my text |
Lists (unordered) | - first item in list |
|
Lists (ordered) | 1. first item in a list |
|
Strikethrough | ~~this is strikethrough text~~ | |
Headers (level 1) | # Header 1 | This text will be bolded, i.e. Header 1 |
Headers (level 2+) | ## Header 2 | This text will be bolded, i.e. Header 2 |
In-line code | `this is my code` | this is my code |
Block quote | > this is a block quote | this is a block quote |
Code blocks | ``` | this is a code block |
Images |  | This is translated as hyperlink text, i.e. Logo |
Escaping special characters: | \*This is special text\* | *This is special text* |
Usage info
This block can be used with AI apps when you expect a markdown response from an LLM that can get lost in translation rendering in Slack. Providing it in a markdown block leaves the translating to Slack to ensure your message appears as intended. Note that passing a single block may result in multiple blocks after translation.
The markdown types that are not supported are code block with syntax highlighting, horizontal lines, tables, and task list.
Example
A markdown block:
{
"type": "markdown",
"text": "**Lots of information here!!**",
}