Ad InsertionAdd Ad Break Schedule

Add Ad Break Schedule

Custom Plan Adds a new ad break slot to the zone's timeline. At most one preroll, one postroll, and one midrollinterval are allowed; midroll and midrollinterval are mutually exclusive. There is no separate list endpoint - the saved roster is returned in the zone's ad insertion settings (see Enable/Update Ad Insertion Settings).

curl -X POST "https://api.5centscdn.com/v2/zones/vod/pull/42/adinsertion/schedule" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "_METHOD": "PUT",
  "type": "midroll",
  "maxDurationS": 30,
  "offset": 300
}'
{
  "statusCode": 200,
  "id": 18,
  "tenantId": 103,
  "name": "5-103-pull-5611-adinsertion",
  "hash": "3d27526ed69afdff653283e6148f3477",
  "type": "ad-insertion",
  "url": "https://adinsertion.5centscdn.com/3d27526ed69afdff653283e6148f3477/",
  "state": "enabled",
  "creationDate": "2026-07-30T11:20:21.000Z",
  "updateDate": "2026-09-23T04:44:44.000Z",
  "source": {
    "id": 33,
    "tenantId": 103,
    "type": "asset-catalog",
    "name": "5-103-pull-5611-assetcatalog",
    "url": "https://fm-sg-ovh01.cdnized.com/",
    "format": "HLS",
    "origin": {
      "customHeaders": [
        {
          "name": "X-Api-Key",
          "value": "Bearer abc123"
        }
      ]
    }
  },
  "enableAdTranscoding": true,
  "transcodingProfile": {
    "id": 2287,
    "name": "3B-L2-30fps-128kbps-44.1kHz"
  },
  "serverSideAdTracking": {
    "enable": false,
    "checkAdMediaSegmentAvailability": false
  },
  "vodAdBreakPolicy": {
    "adServer": {
      "id": 36
    },
    "spliceMode": "segment",
    "preRoll": {
      "maxDurationS": 30,
      "minAdLengthS": 10
    },
    "midRolls": [
      {
        "offsetS": 300,
        "maxDurationS": 30
      }
    ]
  },
  "insertionMode": "ssai",
  "result": "success"
}
POST
/zones/vod/pull/{zoneid}/adinsertion/schedule
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
_METHODstring
Required

HTTP method override for this request. Always set to PUT to add a new schedule.

typestring
Required

Ad break slot type. Immutable after creation. At most one preroll, one postroll, and one midrollinterval per zone; midroll and midrollinterval are mutually exclusive.

Options: preroll, midroll, postroll, midrollinterval
maxDurationSinteger
Required

Ad break duration in seconds.

Min: 1 • Max: 3600
offsetinteger

Playback offset in seconds from the start of the asset. Required for midroll; no two midroll slots on the same zone may share an offset.

Min: 0
intervalSinteger

Interval in seconds between recurring mid-roll breaks. Required for midrollinterval. Send alongside intervalSeconds with the same value.

intervalSecondsinteger

Alias of intervalS, sent alongside it for compatibility. Required for midrollinterval.

maxBreaksinteger

Maximum number of recurring breaks to generate. midrollinterval only. 0 or omitted means unlimited.

Min: 0
breakIdstring

Correlation id, or id-prefix for midrollinterval (defaults to mid).

maxAdsinteger

Per-break pod-size cap.

Min: 0
fillCeilingSinteger

Per-break overshoot ceiling, seconds.

Min: 0
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

zoneidinteger
Required

Zone ID

Example:
42

Body

application/json
_METHODstring
Required

HTTP method override for this request. Always set to PUT to add a new schedule.

Example:
PUT
typestring
Required

Ad break slot type. Immutable after creation. At most one preroll, one postroll, and one midrollinterval per zone; midroll and midrollinterval are mutually exclusive.

Allowed values:prerollmidrollpostrollmidrollinterval
maxDurationSinteger
Required

Ad break duration in seconds.

Example:
30
offsetinteger

Playback offset in seconds from the start of the asset. Required for midroll; no two midroll slots on the same zone may share an offset.

Example:
300
intervalSinteger

Interval in seconds between recurring mid-roll breaks. Required for midrollinterval. Send alongside intervalSeconds with the same value.

Example:
600
intervalSecondsinteger

Alias of intervalS, sent alongside it for compatibility. Required for midrollinterval.

Example:
600
maxBreaksinteger

Maximum number of recurring breaks to generate. midrollinterval only. 0 or omitted means unlimited.

breakIdstring

Correlation id, or id-prefix for midrollinterval (defaults to mid).

maxAdsinteger

Per-break pod-size cap.

fillCeilingSinteger

Per-break overshoot ceiling, seconds.

Responses

statusCodeinteger
idinteger
tenantIdinteger
namestring
hashstring
typestring
urlstring
statestring
creationDatestring
updateDatestring
sourceobject
enableAdTranscodingboolean
transcodingProfileobject
serverSideAdTrackingobject
vodAdBreakPolicyobject
insertionModestring
resultstring
Allowed values:successerror