---
title: "Create Embed"
method: POST
path: "/embed"
tags: ["Media Embed"]
---

# Create Embed

`POST /embed`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/embed`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

Create an Interactive Media Player by passing the value for `mediaId` OR `folderIds`

- By passing `mediaId` - Create an individual media player.

- By passing `folderIds` - Create a repository for a folder to share with others.


Make sure you have access to Shareable Media Repository in your subscription.

**Request rules.** Send either a media id or a set of folder ids. A non-empty media id creates a single media player, and the request is rejected with 403 unless your plan includes the media player feature and your role allows sharing media. An empty or absent media id switches to the library path, which is rejected with 403 unless your plan includes the media library feature. A media id that matches no media file in your workspace returns 404.

## Request body

- object
  - `mediaId` string: The id of the media file you want to publish as a standalone player. Send it to create a media player. Leave it out, or send an empty string, when you want a shared library built from folders instead. If that media file already has a player, you get the existing one back instead of a duplicate. Optional. An empty string is allowed and is treated the same as leaving it out.
  - `folderIds` string[]: The folders whose media you want to publish together as a shared library. Send folder ids with no media id to create one. If a library already exists for the same folder ids in the same order, you get that one back instead of a duplicate. Whenever you send folder ids, they are recorded on the new embed and a password is generated for it, and that password comes back in the response. Optional. A list of folder ids, with no minimum or maximum length. Folder ids that match nothing in your workspace do not cause an error.

## Response `200`

OK

- object
  - `status` string
  - `data` object
    - `_id` string
    - `meta` object
      - `callToActionButtons` object[]
        - `url` string
        - `label` string
      - `features` object[]
        - `name` string
        - `isActive` boolean
      - `isDataVizDownloadable` boolean
      - `isDescription` boolean
      - `isSEOIndexing` boolean
      - `isRemarks` boolean
      - `isPromptAsk` boolean
      - `isPromptHistory` boolean
      - `isTitle` boolean
      - `primaryColor` string
    - `mediaId` string
    - `folderIds` unknown[]
      - unknown
    - `mediaType` string
    - `token` string
    - `privacyMode` string
    - `page` string
    - `iframe` string

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
