---
title: "Adds a Media to a Course Collection for the given course_id. Returns the URL to LTI-launch the embedded media."
method: POST
path: "/media/{media_id}/create_embed"
tags: ["Media"]
---

# Adds a Media to a Course Collection for the given course_id. Returns the URL to LTI-launch the embedded media.

`POST /media/{media_id}/create_embed`

## Path parameters

- `media_id` integer, required

## Request body

- object — An object containing the necessary information for embedding the media
  - `course_id` integer, required — Id of the course to embed the media in.
  - `embed_type` string, required — The type of the embed. Studio uses "embed" to create embedding with media tabs and "bare_embed" to create one with only the media player.
  - `downloadable` boolean — A flag that controlls if the embedded media should be downloadable or not.

## Response `200`

The URL to LTI-launch the embedded media. Please note that the URL in the result will work only if it is called with the proper LTI params.

- object
  - `embed_url` string — The URL to LTI-launch the embedded media.

## 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.
- `404` — The media was not found by ID.
- `422` — Invalid media_id is provided.

---

[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)
