Ad InsertionConfigure Ad Replacement

Configure Ad Replacement

Custom Plan 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"
}'
{
  "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"
}
POST
/zones/vod/push/{zoneid}/adinsertion/replacement
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
spliceModestring

Ad splice boundary alignment. keyframe requires the Advanced Features entitlement; without it the zone is limited to segment.

Options: segment, keyframe
insertionModestring

Server-side ad insertion (ssai) or server-guided ad insertion (sgai, beta).

Options: ssai, sgai
gapFillerEnabledstring

Whether to show a slate/gap-filler asset when a break is underfilled.

Options: Y, N
gapFillerUrlstring

Slate/gap-filler asset URL. Required, and only sent, when gapFillerEnabled is Y.

gapFillerFillAlwaysstring

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.

Options: 1, 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
spliceModestring

Ad splice boundary alignment. keyframe requires the Advanced Features entitlement; without it the zone is limited to segment.

Allowed values:segmentkeyframe
insertionModestring

Server-side ad insertion (ssai) or server-guided ad insertion (sgai, beta).

Allowed values:ssaisgai
gapFillerEnabledstring

Whether to show a slate/gap-filler asset when a break is underfilled.

Allowed values:YN
gapFillerUrlstring

Slate/gap-filler asset URL. Required, and only sent, when gapFillerEnabled is Y.

Example:
https://cdn.5centscdn.com/slates/default.mp4
gapFillerFillAlwaysstring

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.

Allowed values:10

Responses

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