---
title: "Upload a media file to a space. Send the file as the raw request body with the appropriate Content-Type header. Pass spaceId and filename as query parameters. Maximum file size: 25 MB."
method: POST
path: "/uploadMedia"
tags: ["Media"]
---

# Upload a media file to a space. Send the file as the raw request body with the appropriate Content-Type header. Pass spaceId and filename as query parameters. Maximum file size: 25 MB.

`POST /uploadMedia`

## Request

- Base URL: `https://www.taskade.com/api/v2`
- URL: `https://www.taskade.com/api/v2/uploadMedia`
- Auth: OAuth 2 and HTTP bearer
  - Authorization code: `https://www.taskade.com/oauth2/authorize`
  - Token URL: `https://www.taskade.com/oauth2/token`

## Query parameters

- `spaceId` string, required
- `filename` string, required

## Response `200`

Default response

- object
  - `ok` true, required
  - `item` object, required
    - `mediaId` string, required: The SpaceMedia record ID (UUID).
    - `fileId` string, required: The file ID used in S3.
    - `kind` string, required: Detected media kind (image, video, audio, document, etc.).
    - `downloadUrl` string, required: Public URL to download the uploaded file.

---

[API](https://skmtc.dev/taskade/apis/taskade-public-api-v2.md) - [All operations](https://skmtc.dev/taskade/apis/taskade-public-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/taskade/apis/taskade-public-api-v2/revisions/45f0e74ec083?raw)
