Skip to main content

Context block

Fields

FieldTypeDescriptionRequired?
typeStringThe type of block. For a context block, type is always context.Required
elementsObject[]An array of image elements and text objects. Maximum number of items is 10.Required
block_idStringA unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.Optional

Example

An example of a context block

{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "https://image.freepik.com/free-photo/red-drawing-pin_1156-445.jpg",
"alt_text": "images"
},
{
"type": "mrkdwn",
"text": "Location: **Dogpatch**"
}
]
}