File 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 file block, type is always file . | Required |
external_id | String | The external unique ID for this file. | Required |
source | String | At the moment, source will always be remote for a remote file. | 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 |
Usage info
You can't add this block to app surfaces directly, but it will show up when retrieving messages that contain remote files.
If you want to add remote files to messages, follow our guide.
Example
{
"type": "file",
"external_id": "ABCD1",
"source": "remote",
}