---
title: "Create an advertising schedule"
method: POST
path: "/v2/sites/{site_id}/advertising/schedules/"
tags: ["advertising"]
---

# Create an advertising schedule

`POST /v2/sites/{site_id}/advertising/schedules/`

Create an advertising schedule

## Path parameters

- `site_id` string, required — Unique identifier for a resource

## Request body

- object
  - `metadata` AdScheduleResourceMetadata
    - `name` string — Name of advertising schedule
    - `breaks` object[], required
      - `tags` string[], required — List of ad tag URLs Only one ad tag is allowed for googima (Google IMA) client.
      - `offset` string, required — Location in the video where an ad break occurs Multiple ad breaks cannot share the same offset. Possible values: - `pre` - `post` - Seconds into video - % of video. Available only for VAST client. - Timecode (hh:mm:ss:mmm)
      - `skipoffset` integer — Length of time in seconds a viewer must watch an ad before having the ability to skip the ad Available only for VAST client.
      - `type` 'linear' | 'nonlinear', required — Format of the ad to be served within the ad break Possible values: - `linear`: Video ad that interrupts video content playback - `nonlinear`: Static display ad that overlays a portion of the player and does not interrupt playback. No advertisting cuepoint is shown for this ad break. nonlinear allows an ad banner to display over video content without disrupting the video.
    - `bids` BidsResourceMetadata
      - `settings` BidSettingsResourceMetadata
        - `bidTimeout` integer — Timeout for bid response from when the bid request occurs, in milliseconds
        - `floorPriceCents` integer — Price in cents (CPM) that a bid has to beat in order to win This property must be set when mediationLayerAdServer is set to jwp or jwpdfp. NOTE: Determining the best floor price depends upon various factors. If you need assistance determining the best floor price, please consult with your JWX representative or SSP partner.
        - `mediationLayerAdServer` 'dfp' | 'jwp' | 'jwpdfp' | 'jwpspotx' — Mediation layer that decides which ad runs Possible values: - `dfp`: (IMA) No auction is conducted by the player. All bids are sent to Google Ad Manager (GAM, formerly known as DFP) and rendered as line items that compete against other line items. GAM serves the winning line item. We recommend setting `buckets` to minimize the number of line items that you must set up in GAM. - `jwp`: (VAST/IMA) An auction is conducted by the player. If a winner is selected, the winner's ad is called. If no winner is selected, the fallback tag is called. **You must specify a floor price.** - `jwpdfp`: (IMA) An initial auction is conducted by the player. If a winner is selected, the winner's ad will is called. If no winner is selected, the fallback tag is called to serve. If no winner is selected for any reason, all valid bids are sent to Google Ad Manager (GAM, formerly known as DFP) where the bid values are rendered as line items to compete against other line items. The winning line item is served by GAM. **You must set `floorPriceCents`. We recommend setting `buckets` to minimize the number of line items that you must set up in GAM**. - `jwpspotx`: (VAST) No auction is conducted by the player. The player asks SpotX for a bid and calls the returned ad response regardless of price. This option is equivalent to using JWX mediation with a $.01 floor price. **You must set up [SpotX line items](https://developer.spotxchange.com/content/local/docs/HeaderBidding/lisa.md).**
        - `buckets` object[] — Ranges of bid prices When using buckets, bid prices sent to GAM are rounded down to the closest specified increment. Price buckets are helpful to reduce the number of line items in GAM. Without price buckets, one line item per one-cent increment is required. This property only applies when `dfp` or `jwpdfp` (only for the GAM portion of the mediation) is selected as the `mediationLayerAdServer`.
          - `min` number — Minimum value of a price bucket, in bidding currency
          - `max` number — Maximum value of a price bucket, in bidding currency
          - `increment` number — Nearest increment to which a bid is rounded down, in bidding currency
        - `consentManagement` object — Consent management for EU General Data Protection Regulation (GDPR) and California Consumer Privacy Act (CCPA)
          - `gdpr` object — Consent management module designed to support GDPR More information can be found [here](https://docs.prebid.org/dev-docs/modules/gdprEnforcement.html).
            - `cmpApi` 'iab' | 'static' — CMP interface that is in use
            - `timeout` integer — Length of time (in milliseconds) to allow the CMP to obtain the GDPR consent string
            - `defaultGdprScope` boolean — Defines what the `gdprApplies` flag should be when the CMP doesn’t respond in time or the static data doesn’t supply
            - `rules` object[] — GDPR Enforcement Module which allows the page to define which activities should be enforced at the Prebid.js level and actively enforces those activities based on user consent data Only used with TCF v2.0 More information can be found [here](https://docs.prebid.org/dev-docs/modules/gdprEnforcement.html)
              - …
            - `allowAuctionWithoutConsent` boolean — Determines what will happen if obtaining consent information from the CMP fails; either allow the auction to proceed (`true`) or cancel the auction (`false`). Only used with TCF v1.1
          - `usp` object — Consent management module designed to support the CCPA, referred to as “US Privacy” (USP) More information can be found [here](https://docs.prebid.org/dev-docs/modules/consentManagementUsp.html).
            - `cmpApi` 'iab' | 'static' — CMP interface that is in use
            - `timeout` integer — Length of time (in milliseconds) to allow the USP-API to obtain the CCPA string
      - `bidders` BiddersResourceMetadata, required
        - `name` 'jwdemand' | 'Adtelligent' | 'AppNexus' | 'Axonix' | 'criteo' | 'EMX' | 'improvedigital' | 'IndexExchange' | 'kargo' | 'MediaGrid' | 'MediaNet' | 'OpenX' | 'PubMatic' | 'Rubicon' | 'SmartAdServer' | 'Sonobi' | 'Sovrn' | 'SpotX' | 'SynacorMedia' | 'TheTradeDesk' | 'Unruly' | 'VideoByte' | 'YahooSSP', required — Ad partner from which the bid is received
        - `id` string — Identifier issued by the bidding partner that represents a segment of a publisher's inventory
        - `pubid` string — Identifier issued by an ad partner that represents the publisher
        - `custom_params` CustomParamSchema — User-generated key-value pairs When defining `custom_params`, include all custom parameters that should be associated with the target resource. When updating existing `custom_params`, include all `custom_params` keys with their updated values. Any `custom_params` key-value pair not included within the updated `custom_params` in the request body is [deleted](https://docs.jwplayer.com/platform/docs/stream-faq-how-can-i-delete-a-custom-parameter).
    - `rules` object
      - `startOn` integer — First playlist item allowing ad playback For example, if you want viewer Mary to watch her first ad before the second video in a playlist, you would configure this setting to 2. Mary will see no ads before the first video she watches.
      - `frequency` integer — Regularity of ads within a playlist For example, if `frequency: 3`, ads play before every third playlist item. Use `0` to only play ads on the first playlist item.
      - `timeBetweenAds` integer — Minimum time in seconds that must elapse after displaying an ad in a schedule before playing the next scheduled ad Available only for VAST client.
      - `startOnSeek` 'mid' | 'none' | 'pre' — Setting that defines the ad a returning visitor is served when resuming previously-watched video content Available only for VAST client.
    - `client` 'vast' | 'googima' | 'jwx', required — Ad client that will be used to display advertisements
    - `is_vmap` boolean — VMAP
    - `vpaidmode` 'enabled' | 'disabled' | 'insecure' — Permitted VPAID functionality Possible values: - `insecure`: VPAID ad will load in a friendly iFrame. This allows the ad access to the site via javascript. - `enabled`: VPAID ad is enabled using a cross domain iFrame. VPAID ad cannot access the site. A VPAID ad that depends on friendly iFrame access may not play. - `disabled`: VPAID ad will not play and an error will be returned if VPAID ad is requested.
    - `version` string — Version
    - `dynamicAds` union
      - DynamicAdsPreset
        - `adBreaks` union, required
          - object
            - `pre` DynamicAdsBreak, required
              - …
            - `mid` DynamicAdsBreak
              - …
          - object
            - `pre` DynamicAdsBreak
              - …
            - `mid` DynamicAdsBreak, required
              - …
        - `preset` 'shortFormJwRecommended' | 'midFormGoogleMax' | 'maximized', required
      - DynamicAdsRules
        - `adBreaks` union, required
          - object
            - `pre` DynamicAdsBreak, required
              - …
            - `mid` DynamicAdsBreak
              - …
          - object
            - `pre` DynamicAdsBreak
              - …
            - `mid` DynamicAdsBreak, required
              - …
        - `rules` union, required
          - object
            - `contentToAdRatio` number, required — For every x units of content, you should have 1 unit of ads, i.e. for a value of 5.5, this means for every 5.5 minutes of content, there should be 1 minute of ads.
            - `secondsOfContentBetweenAds` integer — Minimum number of seconds of content that must elapse after ad fill before slotting a new ad break.
            - `secondsOfContentAfterFailedAd` integer — Number of seconds to wait after an ad break that did not fill before next ad break attempt.
            - `forcePreroll` boolean — Whether a preroll ad should be served at the beginning of the video regardless of ad to content ratio.
            - `secondsOfContentBeforeFirstAd` integer — Number of seconds into the session before the first ad break.
            - `endOfContentMidrollExclusionSeconds` integer — Number of seconds from the end of content to stop serving midrolls.
            - `minContentDurationForMidrollSeconds` integer — Minimum duration in seconds for content to allow midrolls.
            - `contentToAdRatioCalculationMethod` 'useContentWatchTime' | 'useContentDuration'
          - object
            - `contentToAdRatio` number — For every x units of content, you should have 1 unit of ads, i.e. for a value of 5.5, this means for every 5.5 minutes of content, there should be 1 minute of ads.
            - `secondsOfContentBetweenAds` integer, required — Minimum number of seconds of content that must elapse after ad fill before slotting a new ad break.
            - `secondsOfContentAfterFailedAd` integer — Number of seconds to wait after an ad break that did not fill before next ad break attempt.
            - `forcePreroll` boolean — Whether a preroll ad should be served at the beginning of the video regardless of ad to content ratio.
            - `secondsOfContentBeforeFirstAd` integer — Number of seconds into the session before the first ad break.
            - `endOfContentMidrollExclusionSeconds` integer — Number of seconds from the end of content to stop serving midrolls.
            - `minContentDurationForMidrollSeconds` integer — Minimum duration in seconds for content to allow midrolls.
            - `contentToAdRatioCalculationMethod` 'useContentWatchTime' | 'useContentDuration'

## Response `201`

Resource successfully created

- AdScheduleResourceRead — Resource for managing the individual advertising schedule of a site
  - `schema` string
  - `id` string — Unique identifier for a resource
  - `created` string — Date and time at which the resource was created
  - `last_modified` string — Date and time at which the resource was most recently modified
  - `type` string — Name of the type of resource.
  - `relationships` object — Ancilliary resources associated to the primary resource being read
  - `metadata` AdScheduleResourceMetadata
    - `name` string — Name of advertising schedule
    - `breaks` object[], required
      - `tags` string[], required — List of ad tag URLs Only one ad tag is allowed for googima (Google IMA) client.
      - `offset` string, required — Location in the video where an ad break occurs Multiple ad breaks cannot share the same offset. Possible values: - `pre` - `post` - Seconds into video - % of video. Available only for VAST client. - Timecode (hh:mm:ss:mmm)
      - `skipoffset` integer — Length of time in seconds a viewer must watch an ad before having the ability to skip the ad Available only for VAST client.
      - `type` 'linear' | 'nonlinear', required — Format of the ad to be served within the ad break Possible values: - `linear`: Video ad that interrupts video content playback - `nonlinear`: Static display ad that overlays a portion of the player and does not interrupt playback. No advertisting cuepoint is shown for this ad break. nonlinear allows an ad banner to display over video content without disrupting the video.
    - `bids` BidsResourceMetadata
      - `settings` BidSettingsResourceMetadata
        - `bidTimeout` integer — Timeout for bid response from when the bid request occurs, in milliseconds
        - `floorPriceCents` integer — Price in cents (CPM) that a bid has to beat in order to win This property must be set when mediationLayerAdServer is set to jwp or jwpdfp. NOTE: Determining the best floor price depends upon various factors. If you need assistance determining the best floor price, please consult with your JWX representative or SSP partner.
        - `mediationLayerAdServer` 'dfp' | 'jwp' | 'jwpdfp' | 'jwpspotx' — Mediation layer that decides which ad runs Possible values: - `dfp`: (IMA) No auction is conducted by the player. All bids are sent to Google Ad Manager (GAM, formerly known as DFP) and rendered as line items that compete against other line items. GAM serves the winning line item. We recommend setting `buckets` to minimize the number of line items that you must set up in GAM. - `jwp`: (VAST/IMA) An auction is conducted by the player. If a winner is selected, the winner's ad is called. If no winner is selected, the fallback tag is called. **You must specify a floor price.** - `jwpdfp`: (IMA) An initial auction is conducted by the player. If a winner is selected, the winner's ad will is called. If no winner is selected, the fallback tag is called to serve. If no winner is selected for any reason, all valid bids are sent to Google Ad Manager (GAM, formerly known as DFP) where the bid values are rendered as line items to compete against other line items. The winning line item is served by GAM. **You must set `floorPriceCents`. We recommend setting `buckets` to minimize the number of line items that you must set up in GAM**. - `jwpspotx`: (VAST) No auction is conducted by the player. The player asks SpotX for a bid and calls the returned ad response regardless of price. This option is equivalent to using JWX mediation with a $.01 floor price. **You must set up [SpotX line items](https://developer.spotxchange.com/content/local/docs/HeaderBidding/lisa.md).**
        - `buckets` object[] — Ranges of bid prices When using buckets, bid prices sent to GAM are rounded down to the closest specified increment. Price buckets are helpful to reduce the number of line items in GAM. Without price buckets, one line item per one-cent increment is required. This property only applies when `dfp` or `jwpdfp` (only for the GAM portion of the mediation) is selected as the `mediationLayerAdServer`.
          - `min` number — Minimum value of a price bucket, in bidding currency
          - `max` number — Maximum value of a price bucket, in bidding currency
          - `increment` number — Nearest increment to which a bid is rounded down, in bidding currency
        - `consentManagement` object — Consent management for EU General Data Protection Regulation (GDPR) and California Consumer Privacy Act (CCPA)
          - `gdpr` object — Consent management module designed to support GDPR More information can be found [here](https://docs.prebid.org/dev-docs/modules/gdprEnforcement.html).
            - `cmpApi` 'iab' | 'static' — CMP interface that is in use
            - `timeout` integer — Length of time (in milliseconds) to allow the CMP to obtain the GDPR consent string
            - `defaultGdprScope` boolean — Defines what the `gdprApplies` flag should be when the CMP doesn’t respond in time or the static data doesn’t supply
            - `rules` object[] — GDPR Enforcement Module which allows the page to define which activities should be enforced at the Prebid.js level and actively enforces those activities based on user consent data Only used with TCF v2.0 More information can be found [here](https://docs.prebid.org/dev-docs/modules/gdprEnforcement.html)
              - …
            - `allowAuctionWithoutConsent` boolean — Determines what will happen if obtaining consent information from the CMP fails; either allow the auction to proceed (`true`) or cancel the auction (`false`). Only used with TCF v1.1
          - `usp` object — Consent management module designed to support the CCPA, referred to as “US Privacy” (USP) More information can be found [here](https://docs.prebid.org/dev-docs/modules/consentManagementUsp.html).
            - `cmpApi` 'iab' | 'static' — CMP interface that is in use
            - `timeout` integer — Length of time (in milliseconds) to allow the USP-API to obtain the CCPA string
      - `bidders` BiddersResourceMetadata, required
        - `name` 'jwdemand' | 'Adtelligent' | 'AppNexus' | 'Axonix' | 'criteo' | 'EMX' | 'improvedigital' | 'IndexExchange' | 'kargo' | 'MediaGrid' | 'MediaNet' | 'OpenX' | 'PubMatic' | 'Rubicon' | 'SmartAdServer' | 'Sonobi' | 'Sovrn' | 'SpotX' | 'SynacorMedia' | 'TheTradeDesk' | 'Unruly' | 'VideoByte' | 'YahooSSP', required — Ad partner from which the bid is received
        - `id` string — Identifier issued by the bidding partner that represents a segment of a publisher's inventory
        - `pubid` string — Identifier issued by an ad partner that represents the publisher
        - `custom_params` CustomParamSchema — User-generated key-value pairs When defining `custom_params`, include all custom parameters that should be associated with the target resource. When updating existing `custom_params`, include all `custom_params` keys with their updated values. Any `custom_params` key-value pair not included within the updated `custom_params` in the request body is [deleted](https://docs.jwplayer.com/platform/docs/stream-faq-how-can-i-delete-a-custom-parameter).
    - `rules` object
      - `startOn` integer — First playlist item allowing ad playback For example, if you want viewer Mary to watch her first ad before the second video in a playlist, you would configure this setting to 2. Mary will see no ads before the first video she watches.
      - `frequency` integer — Regularity of ads within a playlist For example, if `frequency: 3`, ads play before every third playlist item. Use `0` to only play ads on the first playlist item.
      - `timeBetweenAds` integer — Minimum time in seconds that must elapse after displaying an ad in a schedule before playing the next scheduled ad Available only for VAST client.
      - `startOnSeek` 'mid' | 'none' | 'pre' — Setting that defines the ad a returning visitor is served when resuming previously-watched video content Available only for VAST client.
    - `client` 'vast' | 'googima' | 'jwx', required — Ad client that will be used to display advertisements
    - `is_vmap` boolean — VMAP
    - `vpaidmode` 'enabled' | 'disabled' | 'insecure' — Permitted VPAID functionality Possible values: - `insecure`: VPAID ad will load in a friendly iFrame. This allows the ad access to the site via javascript. - `enabled`: VPAID ad is enabled using a cross domain iFrame. VPAID ad cannot access the site. A VPAID ad that depends on friendly iFrame access may not play. - `disabled`: VPAID ad will not play and an error will be returned if VPAID ad is requested.
    - `version` string — Version
    - `dynamicAds` union
      - DynamicAdsPreset
        - `adBreaks` union, required
          - object
            - `pre` DynamicAdsBreak, required
              - …
            - `mid` DynamicAdsBreak
              - …
          - object
            - `pre` DynamicAdsBreak
              - …
            - `mid` DynamicAdsBreak, required
              - …
        - `preset` 'shortFormJwRecommended' | 'midFormGoogleMax' | 'maximized', required
      - DynamicAdsRules
        - `adBreaks` union, required
          - object
            - `pre` DynamicAdsBreak, required
              - …
            - `mid` DynamicAdsBreak
              - …
          - object
            - `pre` DynamicAdsBreak
              - …
            - `mid` DynamicAdsBreak, required
              - …
        - `rules` union, required
          - object
            - `contentToAdRatio` number, required — For every x units of content, you should have 1 unit of ads, i.e. for a value of 5.5, this means for every 5.5 minutes of content, there should be 1 minute of ads.
            - `secondsOfContentBetweenAds` integer — Minimum number of seconds of content that must elapse after ad fill before slotting a new ad break.
            - `secondsOfContentAfterFailedAd` integer — Number of seconds to wait after an ad break that did not fill before next ad break attempt.
            - `forcePreroll` boolean — Whether a preroll ad should be served at the beginning of the video regardless of ad to content ratio.
            - `secondsOfContentBeforeFirstAd` integer — Number of seconds into the session before the first ad break.
            - `endOfContentMidrollExclusionSeconds` integer — Number of seconds from the end of content to stop serving midrolls.
            - `minContentDurationForMidrollSeconds` integer — Minimum duration in seconds for content to allow midrolls.
            - `contentToAdRatioCalculationMethod` 'useContentWatchTime' | 'useContentDuration'
          - object
            - `contentToAdRatio` number — For every x units of content, you should have 1 unit of ads, i.e. for a value of 5.5, this means for every 5.5 minutes of content, there should be 1 minute of ads.
            - `secondsOfContentBetweenAds` integer, required — Minimum number of seconds of content that must elapse after ad fill before slotting a new ad break.
            - `secondsOfContentAfterFailedAd` integer — Number of seconds to wait after an ad break that did not fill before next ad break attempt.
            - `forcePreroll` boolean — Whether a preroll ad should be served at the beginning of the video regardless of ad to content ratio.
            - `secondsOfContentBeforeFirstAd` integer — Number of seconds into the session before the first ad break.
            - `endOfContentMidrollExclusionSeconds` integer — Number of seconds from the end of content to stop serving midrolls.
            - `minContentDurationForMidrollSeconds` integer — Minimum duration in seconds for content to allow midrolls.
            - `contentToAdRatioCalculationMethod` 'useContentWatchTime' | 'useContentDuration'

## Other responses

- `400` — Bad Request The request either lacks certain attributes or contains malformed/invalid attributes.

---

[API](https://skmtc.net/jwplayer/apis/management-api-v2.md) · [All operations](https://skmtc.net/jwplayer/apis/management-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jwplayer/management-api-v2/revisions/180db7cada27/schema)
