Add Ad Break Schedule
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
}'
import requests
import json
url = "https://api.5centscdn.com/v2/zones/vod/pull/42/adinsertion/schedule"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"_METHOD": "PUT",
"type": "midroll",
"maxDurationS": 30,
"offset": 300
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/zones/vod/pull/42/adinsertion/schedule", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"_METHOD": "PUT",
"type": "midroll",
"maxDurationS": 30,
"offset": 300
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"_METHOD": "PUT",
"type": "midroll",
"maxDurationS": 30,
"offset": 300
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/zones/vod/pull/42/adinsertion/schedule", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/zones/vod/pull/42/adinsertion/schedule')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"_METHOD": "PUT",
"type": "midroll",
"maxDurationS": 30,
"offset": 300
}'
response = http.request(request)
puts response.body
{
"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"
}
/zones/vod/pull/{zoneid}/adinsertion/scheduleTarget server for requests. Edit to use your own host.
API key (sent in header)
Zone ID
The media type of the request body
HTTP method override for this request. Always set to PUT to add a new schedule.
Ad break slot type. Immutable after creation. At most one preroll, one postroll, and one midrollinterval per zone; midroll and midrollinterval are mutually exclusive.
Ad break duration in seconds.
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.
Interval in seconds between recurring mid-roll breaks. Required for midrollinterval. Send alongside intervalSeconds with the same value.
Alias of intervalS, sent alongside it for compatibility. Required for midrollinterval.
Maximum number of recurring breaks to generate. midrollinterval only. 0 or omitted means unlimited.
Correlation id, or id-prefix for midrollinterval (defaults to mid).
Per-break pod-size cap.
Per-break overshoot ceiling, seconds.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Body
HTTP method override for this request. Always set to PUT to add a new schedule.
PUTAd break slot type. Immutable after creation. At most one preroll, one postroll, and one midrollinterval per zone; midroll and midrollinterval are mutually exclusive.
prerollmidrollpostrollmidrollintervalPlayback offset in seconds from the start of the asset. Required for midroll; no two midroll slots on the same zone may share an offset.
300Interval in seconds between recurring mid-roll breaks. Required for midrollinterval. Send alongside intervalSeconds with the same value.
600Alias of intervalS, sent alongside it for compatibility. Required for midrollinterval.
600Maximum number of recurring breaks to generate. midrollinterval only. 0 or omitted means unlimited.
Correlation id, or id-prefix for midrollinterval (defaults to mid).
Per-break pod-size cap.
Per-break overshoot ceiling, seconds.
Responses
successerror