Skip to content

Displays an alert, warning or informational message with a level-coloured icon.

Type alert
Available in Messages, Modals, Home tab
Field Type Description Required?
type String The type of block. For an alert block, type is always alert. Required
text Text object The alert message, using plain_text or mrkdwn formatting. Maximum 200 characters. Required
level String One of default, info, warning, error or success. Defaults to default. Optional
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

An info alert — how it renders in Repzo Chat

{
"blocks": [
{
"type": "alert",
"level": "info",
"text": {
"type": "mrkdwn",
"text": "Prices on this quote are valid until *31 October*."
}
}
]
}

Every level — how it renders in Repzo Chat

{
"blocks": [
{
"type": "alert",
"level": "success",
"text": {
"type": "plain_text",
"text": "Invoice INV-7731 was paid in full."
}
},
{
"type": "alert",
"level": "warning",
"text": {
"type": "plain_text",
"text": "Stock for SKU-2210 is below the reorder point."
}
},
{
"type": "alert",
"level": "error",
"text": {
"type": "plain_text",
"text": "The sync with the ERP failed. Retrying in 5 minutes."
}
},
{
"type": "alert",
"text": {
"type": "plain_text",
"text": "This channel is archived on 1 November."
}
}
]
}