Configure Ad Replacement
Configures ad splicing behaviour for the zone. Unlike live streams, VoD ad replacement has no independent enable flag - turning ad insertion off entirely is done via Enable/Update Ad Insertion Settings.
curl -X POST "https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion/replacement" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"spliceMode": "segment",
"insertionMode": "ssai",
"gapFillerEnabled": "N"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion/replacement"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"spliceMode": "segment",
"insertionMode": "ssai",
"gapFillerEnabled": "N"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion/replacement", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"spliceMode": "segment",
"insertionMode": "ssai",
"gapFillerEnabled": "N"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"spliceMode": "segment",
"insertionMode": "ssai",
"gapFillerEnabled": "N"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/zones/vod/push/42/adinsertion/replacement", 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/push/42/adinsertion/replacement')
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 = '{
"spliceMode": "segment",
"insertionMode": "ssai",
"gapFillerEnabled": "N"
}'
response = http.request(request)
puts response.body
{
"statusCode": 200,
"id": 18,
"tenantId": 103,
"name": "5-103-push-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:28:13.000Z",
"source": {
"id": 33,
"tenantId": 103,
"type": "asset-catalog",
"name": "5-103-push-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
}
},
"insertionMode": "ssai",
"result": "success"
}
/zones/vod/push/{zoneid}/adinsertion/replacementTarget server for requests. Edit to use your own host.
API key (sent in header)
Zone ID
The media type of the request body
Ad splice boundary alignment. keyframe requires the Advanced Features entitlement; without it the zone is limited to segment.
Server-side ad insertion (ssai) or server-guided ad insertion (sgai, beta).
Whether to show a slate/gap-filler asset when a break is underfilled.
Slate/gap-filler asset URL. Required, and only sent, when gapFillerEnabled is Y.
1 tops off an underfilled break with the gap filler even when some real ads served; 0 only uses it on a total no-fill.
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
Ad splice boundary alignment. keyframe requires the Advanced Features entitlement; without it the zone is limited to segment.
segmentkeyframeServer-side ad insertion (ssai) or server-guided ad insertion (sgai, beta).
ssaisgaiWhether to show a slate/gap-filler asset when a break is underfilled.
YNSlate/gap-filler asset URL. Required, and only sent, when gapFillerEnabled is Y.
https://cdn.5centscdn.com/slates/default.mp41 tops off an underfilled break with the gap filler even when some real ads served; 0 only uses it on a total no-fill.
10Responses
successerror