Skip to main content

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

FieldTypeDescriptionRequired?
typeStringThe type of block. For a markdown block, type is always markdown.Required
textStringThe standard markdown-formatted text. Limit 12,000 characters max.Required
block_idStringThe block_id is ignored in markdown blocks and will not be retained.Optional

The following are supported markdown types.

Markdown TypeExampleResult
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
- second item in a list
- third item in a list
  • first item in a list
  • second item in a list
  • third item in a list
Lists (ordered)
1. first item in a list
2. second item in a list
3. third item in a list
  1. first item in a list
  2. second item in a list
  3. third item in a list
Strikethrough~~this is strikethrough text~~this is strikethrough text
Headers (level 1)# Header 1This text will be bolded, i.e. Header 1
Headers (level 2+)
## Header 2
## Header #
etc.
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
```
this is a code block
Images![Logo](https://example.com/logo.png)This is translated as hyperlink text, i.e. Logo
Escaping special characters:
  • \ backslash
  • ` backtick
  • * asterisk
  • _ underscore
  • curly braces
  • [] square brackets
  • () parentheses
  • # hash mark
  • + plus sign
  • - minus sign (hypen)
  • . dot
  • ! exclamation mark
  • ampersand
  • \*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

    An example of an markdown block

    A markdown block:

      {
    "type": "markdown",
    "text": "**Lots of information here!!**",
    }