File object
A file object contains information about a file shared with a workspace.
{
"id": "F0A12BCDE",
"created": 1531763342,
"timestamp": 1531763342,
"name": "tedair.gif",
"title": "tedair.gif",
"mimetype": "image/gif",
"filetype": "gif",
"pretty_type": "GIF",
"user": "U012A3BCD",
"editable": false,
"size": 137531,
"mode": "hosted",
"is_external": false,
"external_type": "",
"is_public": true,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
"url_private": "https://.../tedair.gif",
"url_private_download": "https://.../tedair.gif",
"thumb_64": "https://.../tedair_64.png",
"thumb_80": "https://.../tedair_80.png",
"thumb_360": "https://.../tedair_360.png",
"thumb_360_w": 176,
"thumb_360_h": 226,
"thumb_160": "https://.../tedair_=_160.png",
"thumb_360_gif": "https://.../tedair_360.gif",
"image_exif_rotation": 1,
"original_w": 176,
"original_h": 226,
"deanimate_gif": "https://.../tedair_deanimate_gif.png",
"pjpeg": "https://.../tedair_pjpeg.jpg",
"permalink": "https://.../tedair.gif",
"permalink_public": "https://.../...",
"comments_count": 0,
"is_starred": false,
"shares": {
"public": {
"C0A1BC2DE": [
{
"reply_users": [
"U012A3BCD"
],
"reply_users_count": 1,
"reply_count": 1,
"ts": "1531763348.000001",
"thread_ts": "1531763273.000015",
"latest_reply": "1531763348.000001",
"channel_name": "file-under",
"team_id": "T012AB3C4"
}
]
}
},
"channels": [
"C0A1BC2DE"
],
"groups": [],
"ims": [],
"has_rich_preview": false
}
Properties
| Field | Type | Description |
|---|---|---|
ai_generated | Boolean | Whether the file was AI-generated. |
bot_id | String | ID of the bot that uploaded the file. |
bot_user_id | String | Bot user ID associated with the file. |
channels | Array | Contains the IDs of any channels with which the file is currently shared. |
created | Unix timestamp | A Unix timestamp representing when the file was created. |
editable | Boolean | Indicates whether files are stored in editable mode. |
edit_link | String (URL) | Only present for posts and snippets and is the page at which the file can be edited. |
external_id | String | ID of the file in an external system. |
external_type | String | Indicates what kind of external file it is; possible values: "", gdrive, dropbox, box, onedrive, app, undefined, salesforce. |
external_url | String (URI) or null | URL of the file in an external system. |
filetype | String | The file's type. Note the mimetype and filetype properties do not have a 1-to-1 mapping, as multiple different files types (html, js, etc.) share the same mime type. |
groups | Array | Contains the IDs of any private groups with which the file is currently shared. Groups are only returned if the caller is a member of that group. |
id | String | The ID of the file object. |
ims | Array | Contains the IDs of any direct message channels with which the file is currently shared. Messages are only returned if the caller is a member of that channel. |
initial_comment | Object | A comment from the file uploader. Will only be set when the uploader commented on the file at the time of upload. Clients can use this to display the comment with the file when announcing new file uploads. Use comments_count to determine how many comments are attached to a file. |
is_external | Boolean | Indicates whether or not the master copy of a file is stored within the system. If is_external is true, the url property will point to the externally-hosted master file. |
is_public | Boolean | Will be true if the file is public. |
is_starred | Boolean | Will be true if the calling user has starred the file, else it will be omitted. |
mimetype | String | The file's mimetype. |
mode | String | One of the following: hosted, external, snippet or post. |
name | String | Name of the file; may be null for unnamed files. |
num_stars | Integer | Contains the number of users who have starred this file. Will not be present if no users have starred it. |
permalink | String (URL) | Points to a single page for the file containing details, comments, and a download link. If the file is available to the public, a permalink_public URL points to the public file itself. |
pinned_to | Array | Contains the IDs of any channels in which the file is currently pinned. |
pretty_type | String | A human-readable version of the type. |
public_url_shared | Boolean | Will be true if the file's public URL has been shared. |
reactions | Array of reaction objects | Contains any reactions that have been added to the file. Gives information about the type of reaction, the total number of users who added that reaction, and a (possibly incomplete) list of users who have added that reaction to the file. The users array in the reactions property may not always contain all users that have reacted (we limit it, and the quantity might change); however, count will always represent the count of all users who made that reaction (i.e., it may be greater than users.length). If the authenticated user has a given reaction then they are guaranteed to appear in the users array regardless of whether count is greater than users.length or not. |
size | Integer | The filesize in bytes. Snippets are limited to a maximum file size of 1 megabyte. |
state | String or null | Current file state. |
subtype | String | File subtype. |
timestamp | Integer or null | A deprecated property that is provided only for backwards compatibility with older clients. |
title | String | Title of the file. |
updated | Unix timestamp | For Post filetypes only; a Unix timestamp of when the Post was last edited. |
user | String | The ID of the user who created the object. |
Previews
For posts, a short plain-text preview is also included that can be shown in place of a thumbnail.
For snippets, a preview of the contents is included (a few truncated lines of plaintext), as well as a more complex syntax-highlighted preview (preview_highlight) in HTML. The total count of lines in the snippet is returned in lines, while lines_more contains a count of lines not shown in the preview.
Depending on the file's type, you may encounter different fields relevant to that type. For instance, you may encounter fields such as image_exif_rotation, original_w, and original_h for images, but will not find those fields for HTML documents.
Access control / Sharing
Authentication is required to retrieve file URLs.
The url_private property points to a URL with the file contents. Editable-mode files will also have a url_private_download parameter, which includes headers to force a browser download. Both url_private and url_private_download require an authorization header of the form:
Authorization: Bearer A_VALID_TOKEN
In this case, A_VALID_TOKEN is representative of a real OAuth token, bearing at least the files:read scope. Learn more about OAuth Scopes.
Fields providing URLs that require this form of authentication include:
url_privateurl_private_downloadthumb_64thumb_80thumb_160thumb_360thumb_480thumb_720thumb_960thumb_1024
url and url_download parameters have been deprecated.Please use url_private and url_private_download instead.
| Field | Type | Description |
|---|---|---|
access | String | Access level of the file. |
dm_mpdm_users_with_file_access | Array of objects | DM/MPDM users with file access (each has user_id, access). |
external_workspaces_with_read_access | Array of team_id | External workspaces/Slack Connect spaces this file is pinned to that the viewer is a member of. |
file_access | String | File access level (e.g. "check_file_info" for Slack Connect files). |
has_more_shares | Boolean | Whether there are additional shares not returned. |
is_restricted_sharing_enabled | Boolean | Whether restricted sharing is enabled. |
last_read | Integer | Unix timestamp of when the file was last read. |
most_recent_access_request_ts | Integer | Unix timestamp of the most recent access request. |
org_or_workspace_access | String | Organization or workspace access level. |
private_channels_with_file_access_count | Integer | Count of private channels with access to this file. |
private_external_workspaces_with_read_access_count | Integer | Count of external workspaces with access that the viewer is not a member of. |
restriction_type | Integer (enum: 0, 1) | 0 = no restrictions, 1 = DSA restricted. |
skipped_shares | Boolean | Whether some shares were skipped in the response. |
source_team | team_id | Team where the file originated. |
teams_shared_with | Array of team_id | Teams the file is shared with. |
user_team | team_id | Team of the user who created the file. |
AI / Skills
| Field | Type | Description |
|---|---|---|
ai_skill_example_prompts | Array of string | AI-generated example prompts that trigger this skill. |
ai_skill_library_count | Integer | Number of users who added this skill to their library. |
ai_skill_usage_count | Integer | Total times this skill has been loaded across all users. |
ai_summary | Object | AI-generated file summary. |
excluded_from_slack_ai | Boolean | Whether the file is excluded from Slack AI. |
is_ai_suggested | Boolean | Whether the file was suggested by AI. |
is_skill | Boolean | Whether this canvas is a Slackbot AI skill. |
skill_description | String | Description of what this skill does. |
Audio / Video / Media
| Field | Type | Description |
|---|---|---|
aac | String | URL to AAC audio. |
acc | String | URL to ACC audio. |
audio_wave_samples | Array of integers | Audio waveform sample data. |
duration_ms | Integer | Duration of audio/video in milliseconds. |
hls | String | URL to HLS video stream. |
hls_embed | String | URL to HLS embed stream. |
hls_preview | String | URL to HLS preview stream. |
is_transcription_region_supported | Boolean | Whether transcription is supported for this file. |
media_display_type | String | How the media should be displayed. |
media_progress | Object | Media playback progress tracking. |
mp4 | String | URL to MP4 video. |
mp4_low | String | URL to low-bitrate MP4 video. |
vtt | String | WebVTT subtitle/caption content. |
Canvas properties
| Field | Type | Description |
|---|---|---|
canvas_agent_creator_id | String | AI agent ID that created the canvas. |
canvas_creator_id | String | User ID of the canvas creator. |
canvas_default_agent_id | String | Default AI agent ID for the canvas. |
canvas_metadata | Object | Canvas metadata (contains originating_huddle_id, items). |
canvas_printing_enabled | Boolean | Whether canvas printing org pref is enabled. |
canvas_readtime | Number | Approximate read time for canvas content. |
is_channel_space | Boolean | Whether the file is a channel space canvas. |
linked_channel_id | String | Channel ID this canvas is linked to. |
source_canvas_id | file_id | Source canvas ID if this canvas was duplicated. |
team_pref_version_history_enabled | Boolean or null | Whether version history team pref is enabled. |
title_blocks | Array of rich_text_title_block | Structured title blocks for canvases. |
Canvas template properties
| Field | Type | Description |
|---|---|---|
canvas_template_mode | Enum | Template publication status. Possible values: draft, published, sales_draft, sales_published, solutions_published. |
is_global_template | Boolean | Whether this is a global template. |
is_org_visible | Boolean | Whether the template is visible to the org. |
template_conversion_ts | Integer or null | Unix timestamp of template conversion. |
template_converter_id | user_id or null | User who converted the template. |
template_description | String | Template description. |
template_icon | String | Template icon. |
template_locale | String | Template locale. |
template_name | String | Template name. |
template_title | String | Template title. |
Editing / Collaboration
| Field | Type | Description |
|---|---|---|
can_toggle_canvas_lock | Boolean or null | Whether the viewer can toggle the canvas lock. |
edit_timestamp | Integer or null | Unix timestamp of last edit. |
editor | user_id or null | Current editor of the file. |
editors | Array of string | List of canvas editor user IDs. |
editors_count | Integer or null | Number of editors. |
is_locked | Boolean | Whether the file is locked. |
last_editor | user_id or null | Last user to edit the file. |
non_owner_editable | Boolean or null | Whether non-owners can edit the file. |
show_badge | Boolean | Whether to show an editor badge. |
Email properties
| Field | Type | Description |
|---|---|---|
attachments | Array of object | Email attachments (each has filename, size, mimetype, url, slack_file_id, etc.). |
cc | Array of email_address | CC recipients. |
email_security | Object | Email security info (contains has_valid_dmarc). |
from | Array of email_address | Email sender(s). |
headers | Object | Raw email headers. |
inline_attachment_count | Integer | Number of inline email attachments. |
meeting_metadata | Object | Meeting metadata extracted from calendar invites (contains meeting_object_id, meeting_provider, title, description, etc.). |
office_pdf | String | URL to Office document PDF conversion. |
original_attachment_count | Integer | Original number of email attachments. |
sent_to_self | Boolean | Whether the email was sent to the user's own address. |
simplified_html | String | Simplified HTML version of the email. |
subject | String | Email subject line. |
to | Array of email_address | Email recipients (each has address, name, original, slack_user_id). |
Lifecycle / Deletion
| Field | Type | Description |
|---|---|---|
date_delete | Integer | Unix timestamp of file deletion. |
is_archived | Boolean | Whether the file is archived. |
is_deleted | Boolean | Whether the file has been deleted. |
is_hidden_by_limit | Integer | Whether the file is hidden due to a limit. |
is_legally_held | Boolean | Whether the file is under a legal hold. |
is_tombstoned | Boolean | Whether the file has been tombstoned. |
migrated_id | String | ID of the file after migration. |
update_notification | Integer or null | Unix timestamp of update notification. |
Lists properties
| Field | Type | Description |
|---|---|---|
list_csv_download_url | String | URL to download the list as CSV. |
list_limits | Object | The List count of the current amount of rows/items, columns, views, and archived items. It also has the limits for each entity, including the maximum amount of items a List can have. Task tracking field columns (todo_completed, todo_due_date, and todo_assignee type columns) don't count towards the column_count limit. |
list_metadata | Object | This field contains List information such as List schema, which includes all columns with header names of the List. This field also has List view information (all existing views for the given List) and subtasks schema (column information for subtasks). The header name for columns will be present in the schema[].name field, and List view names will be present in the views[].name field. |
list_records | Array of list_record | List row/record data. |
list_template_localization_status | String | Localization status of the list template. |
list_template_mode | Ref (template_status) | List template publication status. |
list_template_type | Ref (template_type) | List template type. |
todos | Ref (list_todo_message_attachment) | List todo message attachment data. |
Stars / Saved / Pinning
| Field | Type | Description |
|---|---|---|
actions | Array of object | File actions (each has ts, event_type). |
favorites | Array of object | Favorites collections containing this file (each has collection_id, collection_name, position). |
pinned_info | Object | Detailed pinning information. |
saved | Object | Saved/bookmarked message reference. |
Text content / Previews
| Field | Type | Description |
|---|---|---|
alt_text_highlights | String | Alt text with search highlighting markers. |
alt_txt | String | Alternative text for image files. |
annotation_count | Integer | Number of annotations on the file. |
contents | String | Full file contents. |
contents_extracts | Array of string | Content extracts from the file. |
contents_highlight | String | File contents with search highlighting. |
file_contents_hl | Object | File contents with highlighting (contains lines array). |
formatted | String | Formatted content. |
has_more | Boolean | Whether more content is available. |
path_to_root | Array of string | Path hierarchy to root. |
plain_text | String | Plain text version of the file. |
preview_is_truncated | Boolean | Whether the preview was truncated. |
preview_plain_text | String | Plain text preview. |
Thumbnails (dimensions and extra formats)
If a thumbnail is available for the file, the URL to a 64x64 pixel thumbnail will be returned as the thumb_64 property.
The thumb_80 property, when present, contains the URL of an 80x80 pixel thumbnail. Unlike the 64px thumbnail, this size is guaranteed to be 80x80, even when the source image was smaller (it is padded with transparent pixels).
A variable-sized thumbnail will be returned as thumb_360, with its longest size no bigger than 360 pixels(although it may be smaller depending on the source size). Dimensions for this thumb are returned in thumb_360_w and thumb_360_h. In the case where the original image was an animated gif with dimensions greater than 360 pixels, an animated thumbnail is also created and passed as thumb_360_gif.
Depending on the original file's size, you may even find a thumb_480, thumb_720, thumb_960, or thumb_1024 property.
All thumbnails require an authorization header as described above.
| Field | Type | Description |
|---|---|---|
converted_pdf | String | URL to a converted PDF version of the file. |
deanimate | String (URI) | URL to deanimated version of the file (distinct from deanimate_gif). |
thumb_480_gif | String (URI) | URL to animated 480px thumbnail for GIFs. |
thumb_480_h | Integer | Height of the 480px thumbnail. |
thumb_480_w | Integer | Width of the 480px thumbnail. |
thumb_720_h | Integer | Height of the 720px thumbnail. |
thumb_720_w | Integer | Width of the 720px thumbnail. |
thumb_800 | String (URI) | URL to 800px thumbnail. |
thumb_800_h | Integer | Height of the 800px thumbnail. |
thumb_800_w | Integer | Width of the 800px thumbnail. |
thumb_960_h | Integer | Height of the 960px thumbnail. |
thumb_960_w | Integer | Width of the 960px thumbnail. |
thumb_1024_h | Integer | Height of the 1024px thumbnail. |
thumb_1024_w | Integer | Width of the 1024px thumbnail. |
thumb_pdf | String (URI) | URL to PDF thumbnail. |
thumb_pdf_h | Integer | Height of the PDF thumbnail. |
thumb_pdf_w | Integer | Width of the PDF thumbnail. |
thumb_tiny | String | Tiny inline thumbnail (base64-encoded). |
thumb_video | String (URI) | URL to video thumbnail. |
thumb_video_h | Integer | Height of the video thumbnail. |
thumb_video_ts | String | Timestamp within the video used for the thumbnail. |
thumb_video_w | Integer | Width of the video thumbnail. |
url_static_preview | String | URL to a static preview image. |
Transcription / Huddle
| Field | Type | Description |
|---|---|---|
huddle_date_end | Integer | End time of the huddle (Unix timestamp). |
huddle_date_start | Integer | Start time of the huddle (Unix timestamp). |
huddle_participant_ids | Array of user_id | User IDs of all huddle participants. |
huddle_summary_id | summary_id | ID of the associated huddle summary. |
huddle_transcript_file_id | file_id | ID of the associated huddle transcript file. |
huddle_transcription | Object | Full huddle transcription (contains blocks, lines, date_start, date_end, channel_id, transcription_time_ranges). |
is_huddle_canvas | Boolean | Whether the file is a huddle canvas. |
transcription | Object | Transcription data for audio/video files. |
transcription_hl | Object | Transcription with search highlighting (contains lines array with start_time_ms, contents). |
Work objects / App integration
| Field | Type | Description |
|---|---|---|
app_id | String | ID of the associated app. |
app_name | String | Name of the associated app. |
app_provides_file_work_objects | Boolean | Whether the app provides file work objects. |
embedded_file_ids | Array of string | IDs of files embedded within this file. |
entity_id | String | Work object entity ID associated with this file. |
full_size_preview_supported | Boolean | Whether full size preview is supported in work objects. |
is_salesforce_file | Boolean | Whether the file is a Salesforce file. |
product_icon | Object | Product icon to use when rendering the file. |
quip_thread_id | String | Associated Quip thread ID. |
Slack Connect files
When a file is uploaded to a Slack Connect channel, file object properties are not immediately accessible to apps listening via the Events API or the legacy RTM API. Instead, the payload will contain a file object with the key-value pair "file_access": "check_file_info" meaning that further action is required from your app in order to view an uploaded file's metadata.
{
...
"files": [
{
"id": "F12345678",
"mode": "file_access",
"file_access": "check_file_info",
"created": 0,
"timestamp": 0,
"user": ""
}
]
...
}
See the Slack Connect overview page for more details on how to handle this scenario.
File types
Possible filetype values include, but are not limited to, the following:
| Type | Description |
|---|---|
auto | Auto Detect Type |
text | Plain Text |
ai | Illustrator File |
apk | APK |
applescript | AppleScript |
binary | Binary |
bmp | Bitmap |
boxnote | BoxNote |
c | C |
csharp | C# |
cpp | C++ |
css | CSS |
csv | CSV |
clojure | Clojure |
coffeescript | CoffeeScript |
cfm | ColdFusion |
d | D |
dart | Dart |
diff | Diff |
doc | Word Document |
docx | Word document |
dockerfile | Docker |
dotx | Word template |
eml | |
eps | EPS |
epub | EPUB |
erlang | Erlang |
fla | Flash FLA |
flv | Flash video |
fsharp | F# |
fortran | Fortran |
gdoc | GDocs Document |
gdraw | GDocs Drawing |
gif | GIF |
go | Go |
gpres | GDocs Presentation |
groovy | Groovy |
gsheet | GDocs Spreadsheet |
gzip | Gzip |
html | HTML |
handlebars | Handlebars |
haskell | Haskell |
haxe | Haxe |
indd | InDesign Document |
java | Java |
javascript | JavaScript |
jpg | JPEG |
json | JSON |
keynote | Keynote Document |
kotlin | Kotlin |
latex | LaTeX/sTeX |
lisp | Lisp |
lua | Lua |
m4a | MPEG 4 audio |
markdown | Markdown (raw) |
matlab | MATLAB |
mhtml | MHTML |
mkv | Matroska video |
mov | QuickTime video |
mp3 | mp4 |
mp4 | MPEG 4 video |
mpg | MPEG video |
mumps | MUMPS |
numbers | Numbers Document |
nzb | NZB |
objc | Objective-C |
ocaml | OCaml |
odg | OpenDocument Drawing |
odi | OpenDocument Image |
odp | OpenDocument Presentation |
ods | OpenDocument Spreadsheet |
odt | OpenDocument Text |
ogg | Ogg Vorbis |
ogv | Ogg video |
pages | Pages Document |
pascal | Pascal |
pdf | |
perl | Perl |
php | PHP |
pig | Pig |
png | PNG |
post | Slack Post |
powershell | PowerShell |
ppt | PowerPoint presentation |
pptx | PowerPoint presentation |
psd | Photoshop Document |
puppet | Puppet |
python | Python |
qtz | Quartz Composer Composition |
r | R |
rtf | Rich Text File |
ruby | Ruby |
rust | Rust |
sql | SQL |
sass | Sass |
scala | Scala |
scheme | Scheme |
sketch | Sketch File |
shell | Shell |
smalltalk | Smalltalk |
svg | SVG |
swf | Flash SWF |
swift | Swift |
tar | Tarball |
tiff | TIFF |
tsv | TSV |
vb | VB.NET |
vbscript | VBScript |
vcard | vCard |
velocity | Velocity |
verilog | Verilog |
wav | Waveform audio |
webm | WebM |
wmv | Windows Media Video |
xls | Excel spreadsheet |
xlsx | Excel spreadsheet |
xlsb | Excel Spreadsheet (Binary, Macro Enabled) |
xlsm | Excel Spreadsheet (Macro Enabled) |
xltx | Excel template |
xml | XML |
yaml | YAML |
zip | Zip |