---
title: "Upload a file to Slack channels or conversations."
method: POST
path: "/uploadFile"
---

# Upload a file to Slack channels or conversations.

`POST /uploadFile`

This function allows users to upload and share files in Slack channels or conversations. It supports various file upload options including content, filename, file type, and additional metadata. The function returns a promise that resolves to the Slack API response containing file details or error information.

## Request body

- object
  - `body` object — Body of the uploadFile sls call
    - `arguments` object, required — File upload configuration object
      - `channels` string — Comma-separated channel IDs where the file will be shared
      - `content` string — File content as string
      - `filename` string — Name of the file being uploaded
      - `filetype` string — File type identifier
      - `initial_comment` string — Initial comment to be added with the file
      - `thread_ts` string — Thread timestamp if the file is being added to a thread
      - `title` string — Title of the file

## Response `200`

Successful file upload

- object
  - `ok` boolean, required — Indicates if the upload was successful
  - `file` object — Details of the uploaded file
    - `id` string — Unique identifier of the uploaded file

## Other responses

- `400` — Bad request
- `500` — Server error

## Changes

- **2025-07-06** `089d0d129999` — 1 breaking, 2 warning, 7 info
  - the `body/arguments` request property type/format changed from `array`/`` to `object`/``
  - removed the request property `body/auth`
  - removed the request property `body/packageName`
  - added the new optional request property `body/arguments/channels`
  - …6 more
- **2025-05-27** `8ed465204f85` — 8 warning, 4 info
  - removed the request property `channels`
  - removed the request property `content`
  - removed the request property `filename`
  - removed the request property `filetype`
  - …8 more
- **2025-05-15** `f4d5f1c6aa29` — 1 info
  - endpoint added
- **2025-05-15** `9da633fac0b3` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/microfox-ai/apis/microfox-slack-web-tiny-api/changes/uploadFile/post.md)

---

[API](https://skmtc.dev/microfox-ai/apis/microfox-slack-web-tiny-api.md) · [All operations](https://skmtc.dev/microfox-ai/apis/microfox-slack-web-tiny-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/microfox-ai/microfox-slack-web-tiny-api/revisions/430f57e9b7c5/schema)
