---
title: "Upload media"
method: POST
path: "/api/v1/workspaces/{workspace_id}/media"
tags: ["📁 Media Library"]
---

# Upload media

`POST /api/v1/workspaces/{workspace_id}/media`

Upload a media file or import from URL into the workspace media library. Provide either a file or a URL, not both.

## Path parameters

- `workspace_id` string, required

## Response `201`

Media uploaded successfully

- object
  - `status` boolean
  - `message` string
  - `data` object
    - `id` string
    - `_id` string — Deprecated alias for `id` — will be removed once clients migrate.
    - `name` string
    - `url` string
    - `mime_type` string
    - `extension` string
    - `size` integer
    - `type` 'image' | 'video' | 'gif'
    - `folder_id` string, nullable
    - `is_processing` boolean
    - `created_at` string, date-time
    - `dimensions` object
      - `width` integer, nullable
      - `height` integer, nullable

## Other responses

- `400` — Validation error or upload failed
- `401` — Unauthorized - API key missing or invalid
- `429` — Too many requests

---

[API](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1.md) · [All operations](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contentstudio/contentstudio-api-v1/revisions/ec0c85521883/schema)
