Skip to main content

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

FieldTypeDescriptionRequired?
typeStringThe type of block. For a file block, type is always file.Required
external_idStringThe external unique ID for this file.Required
sourceStringAt the moment, source will always be remote for a remote file.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

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

An example of a file block

{
"type": "file",
"external_id": "ABCD1",
"source": "remote",
}