---
title: "Activate Video CDN and get embed settings"
method: POST
path: "/dam/files/{file_id}/video-cdn/embed-settings"
tags: ["DAM: Files: Video CDN"]
---

# Activate Video CDN and get embed settings

`POST /dam/files/{file_id}/video-cdn/embed-settings`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/dam/files/{file_id}/video-cdn/embed-settings`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/dam/files/:file_id/video-cdn/embed-settings/post.ts> (a function with typed inputs; its response is checked against the schema)

## Activate Video CDN and get embed settings
Activates the Video CDN for a file if it is not active yet, then returns its embed code in the same call.
The embed code is stable from the moment the Video CDN exists; the player shows a notice until the conversion has finished (see `status`).

## Path parameters

- `file_id` string, required

## Query parameters

- `autoplay` boolean
- `loop` boolean
- `muted` boolean
- `hideControls` boolean
- `showDownload` boolean
- `showVideoThumbnail` boolean
- `fitToWindow` boolean
- `subtitles` boolean
- `accessible` boolean
- `width` integer
- `height` integer
- `videoPlayerPresetId` integer
- `color` string

## Response `200`

Video CDN was already active

- VideoEmbedSettings
  - `data` object
    - `cdnFileVideoId` integer: ID of the Video CDN
    - `status` 'QUEUED' | 'IN_PROGRESS' | 'FINISHED' | 'FAILED': Status of video conversion. The embed code plays once it is FINISHED.
    - `videoSource` string: Master playlist (HLS) URL
    - `iframe` string: Embed code using an iframe
    - `html` string: Embed code rendering the player directly on the page

## Other responses

- `201`: Video CDN was activated
- `400`: Video player preset not found
- `401`: Unauthorized
- `403`: Insufficient access, or the file is not a video
- `404`: File not found, or the video conversion failed

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
