Context 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 context block, type is always context . | Required |
elements | Object[] | An array of image elements and text objects. Maximum number of items is 10. | Required |
block_id | String | A 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
{
"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**"
}
]
}