files_upload
POST
/files.upload https://slack.com/api
Uploads or creates a file.
Request Body
application/x-www-form-urlencoded
{
channels?: string;
content?: string;
file?: string;
filename?: string;
filetype?: string;
initial_comment?: string;
thread_ts?: number;
title?: string;
token?: string;
}
channels?: string;
content?: string;
file?: string;
filename?: string;
filetype?: string;
initial_comment?: string;
thread_ts?: number;
title?: string;
token?: string;
}
Responses
200 application/json
Success response after uploading a file to a channel with an initial message
{ file: ObjsFile ;ok: DefsOkTrue ; }
default application/json
Typical error response
{ callstack?: string;error: "posting_to_general_channel_denied" | "invalid_channel" | "file_uploads_disabled" | "file_uploads_except_images_disabled" | "storage_limit_reached" | "not_authed" | "invalid_auth" | "account_inactive" | "no_permission" | "invalid_arg_name" | "invalid_array_arg" | "invalid_charset" | "invalid_form_data" | "invalid_post_type" | "missing_post_type" | "team_added_to_org" | "invalid_json" | "json_not_object" | "request_timeout" | "upgrade_required";ok: DefsOkFalse ; }