Skip to main content

Slack file object

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.

Defines an object containing Slack file information to be used in an image block or image element.

This file must be an image and you must provide either the URL or ID. In addition, the user posting these blocks must have access to this file. If both are provided then the payload will be rejected. Currently only png, jpg, jpeg, and gif Slack image files are supported.

Fields

FieldTypeDescriptionRequired?
urlstringThis URL can be the url_private or the permalink of the Slack file.Optional
idstringSlack ID of the file.Optional

Example

{
"slack_file": {
"url": "https://files.slack.com/files-pri/T0123456-F0123456/xyz.png",
}
}
{
"slack_file": {
"id": "F0123456",
}
}