Files
Files Upload
Uploads or creates a file.
Authorization
slackAuth files:write:userAuthorizationBearer <token>
In: header
Scope: files:write:user
Header Parameters
Content-Type*"application/x-www-form-urlencoded"
Value in
- "application/x-www-form-urlencoded"
Request Body
application/x-www-form-urlencoded
token?string
Authentication token. Requires scope: files:write:user
file?string
File contents via multipart/form-data. If omitting this parameter, you must submit content.
content?string
File contents via a POST variable. If omitting this parameter, you must provide a file.
filetype?string
A file type identifier.
filename?string
Filename of file.
title?string
Title of file.
initial_comment?string
The message text introducing the file in specified channels.
channels?string
Comma-separated list of channel names or IDs where the file will be shared.
thread_ts?number
Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.
Format
doubleResponse Body
application/json
application/json
curl -X POST "https://example.com/files.upload" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d ''{ "file": { "channels": [ "string" ], "comments_count": 0, "created": 0, "date_delete": 0, "display_as_bot": true, "editable": true, "editor": "string", "external_id": "string", "external_type": "string", "external_url": "http://example.com", "filetype": "string", "groups": [ "string" ], "has_rich_preview": true, "id": "string", "image_exif_rotation": 0, "ims": [ "string" ], "is_external": true, "is_public": true, "is_starred": true, "is_tombstoned": true, "last_editor": "string", "mimetype": "string", "mode": "string", "name": "string", "non_owner_editable": true, "num_stars": 0, "original_h": 0, "original_w": 0, "permalink": "http://example.com", "permalink_public": "http://example.com", "pinned_info": {}, "pinned_to": [ "string" ], "pretty_type": "string", "preview": "string", "public_url_shared": true, "reactions": [ { "count": 0, "name": "string", "users": [ "string" ] } ], "shares": { "private": null, "public": null }, "size": 0, "source_team": "string", "state": "string", "thumb_1024": "http://example.com", "thumb_1024_h": 0, "thumb_1024_w": 0, "thumb_160": "http://example.com", "thumb_360": "http://example.com", "thumb_360_h": 0, "thumb_360_w": 0, "thumb_480": "http://example.com", "thumb_480_h": 0, "thumb_480_w": 0, "thumb_64": "http://example.com", "thumb_720": "http://example.com", "thumb_720_h": 0, "thumb_720_w": 0, "thumb_80": "http://example.com", "thumb_800": "http://example.com", "thumb_800_h": 0, "thumb_800_w": 0, "thumb_960": "http://example.com", "thumb_960_h": 0, "thumb_960_w": 0, "thumb_tiny": "string", "timestamp": 0, "title": "string", "updated": 0, "url_private": "http://example.com", "url_private_download": "http://example.com", "user": "string", "user_team": "string", "username": "string" }, "ok": "True"}
