/files.upload
POST
/files.upload
files
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://slack.com/api/files.upload'
Response Response Example
200 - response
{
"file": {
"channels": [],
"comments_count": 0,
"created": 1532293501,
"display_as_bot": false,
"editable": false,
"external_type": "",
"filetype": "gif",
"groups": [],
"has_rich_preview": false,
"id": "F0TD00400",
"image_exif_rotation": 1,
"ims": [
"D0L4B9P0Q"
],
"is_external": false,
"is_public": false,
"is_starred": false,
"mimetype": "image/jpeg",
"mode": "hosted",
"name": "dramacat.gif",
"original_h": 366,
"original_w": 526,
"permalink": "https://.../dramacat.gif",
"permalink_public": "https://.../More-Path-Components",
"pretty_type": "JPEG",
"public_url_shared": false,
"shares": {
"private": {
"D0L4B9P0Q": [
{
"reply_count": 0,
"reply_users": [],
"reply_users_count": 0,
"ts": "1532293503.000001"
}
]
}
},
"size": 43518,
"thumb_160": "https://.../dramacat_160.gif",
"thumb_360": "https://.../dramacat_360.gif",
"thumb_360_h": 250,
"thumb_360_w": 360,
"thumb_480": "https://.../dramacat_480.gif",
"thumb_480_h": 334,
"thumb_480_w": 480,
"thumb_64": "https://.../dramacat_64.gif",
"thumb_80": "https://.../dramacat_80.gif",
"timestamp": 1532293501,
"title": "dramacat",
"url_private": "https://.../dramacat.gif",
"url_private_download": "https://.../dramacat.gif",
"user": "U0L4B9NSU",
"username": ""
},
"ok": true
}
Request
Body Params application/x-www-form-urlencoded
channels
stringÂ
optional
content
stringÂ
optional
file
.file
stringÂ
optional
multipart/form-data
. If omitting this parameter, you must submit content
.filename
stringÂ
optional
filetype
stringÂ
optional
initial_comment
stringÂ
optional
channels
.thread_ts
numberÂ
optional
ts
value to upload this file as a reply. Never use a reply's ts
value; use its parent instead.title
stringÂ
optional
token
stringÂ
optional
files:write:user
Responses
Modified at 2023-08-15 05:39:46