---
title: "POST /medias/spaces/{spaceId}/upload"
method: POST
path: "/medias/spaces/{spaceId}/upload"
tags: ["Media"]
---

# POST /medias/spaces/{spaceId}/upload

`POST /medias/spaces/{spaceId}/upload`

## Request

- Base URL: `https://www.taskade.com/api/v1`
- URL: `https://www.taskade.com/api/v1/medias/spaces/{spaceId}/upload`
- Auth: OAuth 2 and HTTP bearer
  - Authorization code: `https://www.taskade.com/oauth2/authorize`
  - Token URL: `https://www.taskade.com/oauth2/token`

Upload a media file to a space (root workspace or subspace / app). Send the file as the raw request body with the appropriate Content-Type header (e.g. image/png, application/pdf, application/octet-stream). Pass the original filename as the `filename` query parameter.

## Path parameters

- `spaceId` string, required

## Query parameters

- `filename` string, required

## Response `200`

Uploaded media file details

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

## Other responses

- `4XX`: Error description

---

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