---
title: "Create an ads"
method: POST
path: "/1/videos/{channel}/players/{player}/ads"
tags: ["Players > Ads"]
---

# Create an ads

`POST /1/videos/{channel}/players/{player}/ads`

This endpoint allows you to create a new Ads.

## Path parameters

- `channel` integer, required
- `player` integer, required

## Query parameters

- `with` string
- `account_id` integer, required — Account identifier

## Request body

- object
  - `is_periodic` boolean — boolean to determine if ad should cycle
  - `offset` integer, required — the offset to play the ad
  - `type` 'mid-roll' | 'pre-roll', required — the ad type to play the ad
  - `url` string, required — the url of the vast XML

## Response `201`

Created

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` A57c9d69Ads
    - `id` integer, required — The id of the `Ad
    - `offset` integer, required — The activation delay of the `Ad
    - `type` string, required — midroll or preroll
    - `url` string, required — The url of the `Ad
    - `periodic` string, required — Is the ad playing multiples times
    - `enabled` boolean, required — Is the ad enabled?

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/158a854b0c7d/schema)
