Rich text block
Displays formatted, structured text — styled runs, lists, quotes, code — built from rich text elements.
| Type | rich_text |
| Available in | Messages, Modals, Home tab |
| Compatible block elements | Rich text section element, Rich text list element, Rich text preformatted element, Rich text quote element |
This is the format chat messages are written in, and what a rich text input returns. Elements nest: a list holds sections, and a section holds text, links, emoji, mentions and dates.
Fields
Section titled “Fields”| Field | Type | Description | Required? |
|---|---|---|---|
type |
String | The type of block. For a rich text block, type is always rich_text. |
Required |
elements |
Object[] | An array of rich_text_section, rich_text_list, rich_text_preformatted and rich_text_quote elements. |
Required |
block_id |
String | A unique identifier for the block. Maximum length is 255 characters. It must be unique within the message or view — a duplicate is replaced and reported as a warning. | Optional |
Examples
Section titled “Examples”Styled text, a list and a link
Section titled “Styled text, a list and a link”
{ "blocks": [ { "type": "rich_text", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Handover for " }, { "type": "text", "text": "Gulf Retail Co. ", "style": { "bold": true } }, { "type": "emoji", "name": "package" } ] }, { "type": "rich_text_list", "style": "bullet", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Delivery window: 08:00–12:00" } ] }, { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Ask for the store manager at the loading bay" } ] }, { "type": "rich_text_section", "elements": [ { "type": "link", "url": "https://example.com/orders/SO-2041", "text": "Order SO-2041" } ] } ] } ] } ]}A quote and a code block
Section titled “A quote and a code block”
{ "blocks": [ { "type": "rich_text", "elements": [ { "type": "rich_text_quote", "elements": [ { "type": "text", "text": "The terminal shows error E-104 after the latest update." } ] }, { "type": "rich_text_preformatted", "elements": [ { "type": "text", "text": "device_id=POS-X2-00917\nfirmware=4.2.1\nerror=E-104" } ] } ] } ]}