Slack Files API

The Files API from Slack — 13 operation(s) for files.

Operations 11

GET /files.info Slack Get Files Info #
GET /files.list Slack Get Files List #
GET /files.remote.info Slack Get Files Remote Info #
GET /files.remote.list Slack Get Files Remote List #
POST /files.remote.remove Slack Post Files Remote Remove #
GET /files.remote.share Slack Get Files Remote Share #
POST /files.remote.update Slack Post Files Remote Update #
POST /files.revokePublicURL Slack Post Files Revokepublicurl #
POST /files.sharedPublicURL Slack Post Files Sharedpublicurl #
POST /files.upload Slack Post Files Upload #
POST /files.delete Slack Delete a File #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/slack-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

slack-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Slack Files API
  version: '1.0'
  description: 'Operations tagged Files across 2 of this provider''s published API definitions: slack-files-openapi.yml, slack-web-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://slack.com/api
  description: Slack Web API production server
tags:
- name: Files
paths:
  /files.info:
    get:
      tags:
      - Files
      description: Gets information about a file.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.info
      operationId: getFilesInfo
      parameters:
      - name: token
        in: query
        description: 'Authentication token. Requires scope: `files:read`'
        schema:
          type: string
      - name: file
        in: query
        description: Specify a file by providing its ID.
        schema:
          type: string
      - name: count
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: string
      - name: limit
        in: query
        description: The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.
        schema:
          type: integer
      - name: cursor
        in: query
        description: 'Parameter for pagination. File comments are paginated for a single file. Set `cursor` equal to the `next_cursor` attribute returned by the previous request''s `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection of comments. See [pagination](/docs/pagination) for more details.'
        schema:
          type: string
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: files.info schema
                required:
                - comments
                - file
                - ok
                type: object
                properties:
                  comments:
                    $ref: '#/components/schemas/objs_comments'
                  editor:
                    $ref: '#/components/schemas/defs_user_id'
                  file:
                    $ref: '#/components/schemas/objs_file'
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                  paging:
                    $ref: '#/components/schemas/objs_paging'
                  response_metadata:
                    $ref: '#/components/schemas/objs_response_metadata'
                additionalProperties: false
                description: Schema for successful response from files.info method
              example:
                comments: []
                file:
                  channels:
                  - C0T8SE4AU
                  comments_count: 0
                  created: 1531763342
                  deanimate_gif: https://.../tedair_deanimate_gif.png
                  display_as_bot: false
                  editable: false
                  external_type: ''
                  filetype: gif
                  groups: []
                  has_rich_preview: false
                  id: F0S43PZDF
                  image_exif_rotation: 1
                  ims: []
                  is_external: false
                  is_public: true
                  is_starred: false
                  mimetype: image/gif
                  mode: hosted
                  name: tedair.gif
                  original_h: 226
                  original_w: 176
                  permalink: https://.../tedair.gif
                  permalink_public: https://.../...
                  pjpeg: https://.../tedair_pjpeg.jpg
                  pretty_type: GIF
                  public_url_shared: false
                  shares:
                    public:
                      C0T8SE4AU:
                      - channel_name: file-under
                        latest_reply: '1531763348.000001'
                        reply_count: 1
                        reply_users:
                        - U061F7AUR
                        reply_users_count: 1
                        team_id: T061EG9R6
                        thread_ts: '1531763273.000015'
                        ts: '1531763348.000001'
                  size: 137531
                  thumb_160: https://.../tedair_=_160.png
                  thumb_360: https://.../tedair_360.png
                  thumb_360_gif: https://.../tedair_360.gif
                  thumb_360_h: 226
                  thumb_360_w: 176
                  thumb_64: https://.../tedair_64.png
                  thumb_80: https://.../tedair_80.png
                  timestamp: 1531763342
                  title: tedair.gif
                  url_private: https://.../tedair.gif
                  url_private_download: https://.../tedair.gif
                  user: U061F7AUR
                  username: ''
                ok: true
                response_metadata:
                  next_cursor: dGVhbTpDMUg5UkVTR0w=
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: files.info error schema
                required:
                - error
                - ok
                type: object
                properties:
                  callstack:
                    type: string
                    description: 'Note: PHP callstack is only visible in dev/qa'
                  error:
                    type: string
                    enum:
                    - file_not_found
                    - file_deleted
                    - timezone_count_failed
                    - 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:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: false
                description: Schema for error response from files.info method
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - files:read
      summary: Slack Get Files Info
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.list:
    get:
      tags:
      - Files
      description: List for a team, in a channel, or from a user with applied filters.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.list
      operationId: getFilesList
      parameters:
      - name: token
        in: query
        description: 'Authentication token. Requires scope: `files:read`'
        schema:
          type: string
      - name: user
        in: query
        description: Filter files created by a single user.
        schema:
          type: string
      - name: channel
        in: query
        description: Filter files appearing in a specific channel, indicated by its ID.
        schema:
          type: string
      - name: ts_from
        in: query
        description: Filter files created after this timestamp (inclusive).
        schema:
          type: number
      - name: ts_to
        in: query
        description: Filter files created before this timestamp (inclusive).
        schema:
          type: number
      - name: types
        in: query
        description: Filter files by type ([see below](#file_types)). You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list.
        schema:
          type: string
      - name: count
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: string
      - name: show_files_hidden_by_limit
        in: query
        description: Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.
        schema:
          type: boolean
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: files.list schema
                required:
                - files
                - ok
                - paging
                type: object
                properties:
                  files:
                    minItems: 0
                    uniqueItems: true
                    type: array
                    items:
                      $ref: '#/components/schemas/objs_file'
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                  paging:
                    $ref: '#/components/schemas/objs_paging'
                additionalProperties: false
                description: Schema for successful response from files.list method
              example:
                files:
                - channels:
                  - C0T8SE4AU
                  comments_count: 0
                  created: 1531763254
                  deanimate_gif: https://.../billair_deanimate_gif.png
                  display_as_bot: false
                  editable: false
                  external_type: ''
                  filetype: gif
                  groups: []
                  id: F0S43P1CZ
                  image_exif_rotation: 1
                  ims: []
                  is_external: false
                  is_public: true
                  mimetype: image/gif
                  mode: hosted
                  name: billair.gif
                  original_h: 226
                  original_w: 176
                  permalink: https://.../billair.gif
                  permalink_public: https://.../...
                  pjpeg: https://.../billair_pjpeg.jpg
                  pretty_type: GIF
                  public_url_shared: false
                  size: 144538
                  thumb_160: https://.../billair_=_160.png
                  thumb_360: https://.../billair_360.png
                  thumb_360_gif: https://.../billair_360.gif
                  thumb_360_h: 226
                  thumb_360_w: 176
                  thumb_64: https://.../billair_64.png
                  thumb_80: https://.../billair_80.png
                  timestamp: 1531763254
                  title: billair.gif
                  url_private: https://.../billair.gif
                  url_private_download: https://.../billair.gif
                  user: U061F7AUR
                  username: ''
                - channels:
                  - C0T8SE4AU
                  comments_count: 0
                  created: 1531763342
                  deanimate_gif: https://.../tedair_deanimate_gif.png
                  display_as_bot: false
                  editable: false
                  external_type: ''
                  filetype: gif
                  groups: []
                  id: F0S43PZDF
                  image_exif_rotation: 1
                  ims: []
                  is_external: false
                  is_public: true
                  mimetype: image/gif
                  mode: hosted
                  name: tedair.gif
                  original_h: 226
                  original_w: 176
                  permalink: https://.../tedair.gif
                  permalink_public: https://.../...
                  pjpeg: https://.../tedair_pjpeg.jpg
                  pretty_type: GIF
                  public_url_shared: false
                  size: 137531
                  thumb_160: https://.../tedair_=_160.png
                  thumb_360: https://.../tedair_360.png
                  thumb_360_gif: https://.../tedair_360.gif
                  thumb_360_h: 226
                  thumb_360_w: 176
                  thumb_64: https://.../tedair_64.png
                  thumb_80: https://.../tedair_80.png
                  timestamp: 1531763342
                  title: tedair.gif
                  url_private: https://.../tedair.gif
                  url_private_download: https://.../tedair.gif
                  user: U061F7AUR
                  username: ''
                ok: true
                paging:
                  count: 100
                  page: 1
                  pages: 1
                  total: 2
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: files.list error schema
                required:
                - error
                - ok
                type: object
                properties:
                  callstack:
                    type: string
                    description: 'Note: PHP callstack is only visible in dev/qa'
                  error:
                    type: string
                    enum:
                    - user_not_found
                    - unknown_type
                    - not_authed
                    - invalid_auth
                    - account_inactive
                    - no_permission
                    - user_is_bot
                    - 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:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: false
                description: Schema for error response from files.list method
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - files:read
      summary: Slack Get Files List
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.remote.info:
    get:
      tags:
      - Files
      description: Retrieve information about a remote file added to Slack
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.remote.info
      operationId: getFilesRemoteInfo
      parameters:
      - name: token
        in: query
        description: 'Authentication token. Requires scope: `remote_files:read`'
        schema:
          type: string
      - name: file
        in: query
        description: Specify a file by providing its ID.
        schema:
          type: string
      - name: external_id
        in: query
        description: Creator defined GUID for the file.
        schema:
          type: string
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - remote_files:read
      summary: Slack Get Files Remote Info
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.remote.list:
    get:
      tags:
      - Files
      description: Retrieve information about a remote file added to Slack
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.remote.list
      operationId: getFilesRemoteList
      parameters:
      - name: token
        in: query
        description: 'Authentication token. Requires scope: `remote_files:read`'
        schema:
          type: string
      - name: channel
        in: query
        description: Filter files appearing in a specific channel, indicated by its ID.
        schema:
          type: string
      - name: ts_from
        in: query
        description: Filter files created after this timestamp (inclusive).
        schema:
          type: number
      - name: ts_to
        in: query
        description: Filter files created before this timestamp (inclusive).
        schema:
          type: number
      - name: limit
        in: query
        description: The maximum number of items to return.
        schema:
          type: integer
      - name: cursor
        in: query
        description: Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail.
        schema:
          type: string
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - remote_files:read
      summary: Slack Get Files Remote List
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.remote.remove:
    post:
      tags:
      - Files
      description: Remove a remote file.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.remote.remove
      operationId: postFilesRemoteRemove
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'Authentication token. Requires scope: `remote_files:write`'
                file:
                  type: string
                  description: Specify a file by providing its ID.
                external_id:
                  type: string
                  description: Creator defined GUID for the file.
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - remote_files:write
      summary: Slack Post Files Remote Remove
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.remote.share:
    get:
      tags:
      - Files
      description: Share a remote file into a channel.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.remote.share
      operationId: getFilesRemoteShare
      parameters:
      - name: token
        in: query
        description: 'Authentication token. Requires scope: `remote_files:share`'
        schema:
          type: string
      - name: file
        in: query
        description: Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.
        schema:
          type: string
      - name: external_id
        in: query
        description: The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both are required.
        schema:
          type: string
      - name: channels
        in: query
        description: Comma-separated list of channel IDs where the file will be shared.
        schema:
          type: string
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - remote_files:share
      summary: Slack Get Files Remote Share
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.remote.update:
    post:
      tags:
      - Files
      description: Updates an existing remote file.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.remote.update
      operationId: postFilesRemoteUpdate
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'Authentication token. Requires scope: `remote_files:write`'
                file:
                  type: string
                  description: Specify a file by providing its ID.
                external_id:
                  type: string
                  description: Creator defined GUID for the file.
                title:
                  type: string
                  description: Title of the file being shared.
                filetype:
                  type: string
                  description: type of file
                external_url:
                  type: string
                  description: URL of the remote file.
                preview_image:
                  type: string
                  description: Preview of the document via `multipart/form-data`.
                indexable_file_contents:
                  type: string
                  description: File containing contents that can be used to improve searchability for the remote file.
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: Default success template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: true
                description: This method either only returns a brief _OK_ response or a verbose schema is not available for this method.
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: Default error template
                required:
                - ok
                type: object
                properties:
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: true
                description: This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - remote_files:write
      summary: Slack Post Files Remote Update
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.revokePublicURL:
    post:
      tags:
      - Files
      description: Revokes public/external sharing access for a file
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.revokePublicURL
      operationId: postFilesRevokepublicurl
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `files:write:user`'
        schema:
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: File to revoke
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: File to revoke
      responses:
        '200':
          description: Typical success response
          content:
            application/json:
              schema:
                title: files.revokePublicURL schema
                required:
                - file
                - ok
                type: object
                properties:
                  file:
                    $ref: '#/components/schemas/objs_file'
                  ok:
                    $ref: '#/components/schemas/defs_ok_true'
                additionalProperties: false
                description: Schema for successful response from files.revokePublicURL method
              example:
                ok: true
        default:
          description: Typical error response
          content:
            application/json:
              schema:
                title: files.revokePublicURL error schema
                required:
                - error
                - ok
                type: object
                properties:
                  callstack:
                    type: string
                    description: 'Note: PHP callstack is only visible in dev/qa'
                  error:
                    type: string
                    enum:
                    - file_not_found
                    - not_authed
                    - invalid_auth
                    - account_inactive
                    - token_revoked
                    - no_permission
                    - org_login_required
                    - user_is_bot
                    - user_is_restricted
                    - 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
                    - fatal_error
                  ok:
                    $ref: '#/components/schemas/defs_ok_false'
                additionalProperties: false
                description: Schema for error response from files.revokePublicURL method
              example:
                error: invalid_auth
                ok: false
      security:
      - slackAuth:
        - files:write:user
      summary: Slack Post Files Revokepublicurl
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /files.sharedPublicURL:
    post:
      tags:
      - Files
      description: Enables a file for public/external sharing.
      externalDocs:
        description: API method documentation
        url: https://api.slack.com/methods/files.sharedPublicURL
      operationId: postFilesSharedpublicurl
      parameters:
      - name: token
        in: header
        description: 'Authentication token. Requires scope: `files:write:user`'
        schema:
          type: string
      requestBody:

# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/slack/refs/heads/main/openapi/slack-files-api-openapi.yml