---
title: "Create a new media in \"My Uploads\" or specified collection from an existing file accessible by URL"
method: POST
path: "/media"
tags: ["Media upload"]
---

# Create a new media in "My Uploads" or specified collection from an existing file accessible by URL

`POST /media`

## Request body

- object — An object containing the necessary information for external media creation
  - `url` string, required — The originating URL where the media can be retrieved.
  - `title` string — The title of the media. Required for non-external media.
  - `user_id` integer — ID of the user to upload the media on behalf of. if not provided, the video will be uploaded to requestor's user library
  - `description` string — The description of the media.
  - `collection_id` integer — The ID of a collection, user_id and collection_id can not be sent together as if user_id is provided the media will be uploaded to user's user library
  - `auto_caption` boolean — Whether to request auto-captioning for the media (false by default). This option is only available if auto-captioning is enabled for your account.
  - `is_external` boolean — Whether the media is external or not (false by default). Only YouTube and Vimeo are supported.

## Response `201`

The media object that was created.

- object
  - `media` Media
    - `id` integer
    - `title` string
    - `description` string
    - `duration` number
    - `created_at` string, date-time
    - `last_viewed` string, date
    - `last_viewed_by_student` string, date
    - `thumbnail_url` string
    - `transcoding_status` string
    - `owner` User
      - `id` integer
      - `full_name` string
      - `display_name` string
      - `email` string
    - `size` integer
    - `source` string
    - `embed_id` string
    - `lti_launch_id` string
    - `archived_at` string, date-time

## Other responses

- `401` — Authorization information is missing or invalid.
- `403` — If a user without proper permissions tries to call this endpoint, the call is rejected with 403 Forbidden.
- `422` — Invalid parameters.
- `501` — Auto-captioning was requested but is not enabled for the account.

---

[API](https://skmtc.net/instructure/apis/studio-public-api.md) · [All operations](https://skmtc.net/instructure/apis/studio-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/instructure/studio-public-api/revisions/4838a5113869/schema)
