Ad InsertionEnable Ad Insertion

Enable Ad Insertion

Creates (or updates) the ad insertion record for the pull stream. Requires the service to have Advanced Features enabled and an available ad insertion slot.

curl -X PUT "https://api.5centscdn.com/v2/streams/pull/123/adinsertion" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "enabled": "Y",
  "policy": 1,
  "provider": "Google Ad Manager",
  "defaultDuration": 30
}'
{
  "result": "success"
}
PUT
/streams/pull/{streamid}/adinsertion
PUT
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)

path
streamidinteger
Required

Numeric stream ID.

Content-Typestring
Required

The media type of the request body

Options: application/json
enabledstring
Required

Enable or disable ad insertion on the stream.

Options: Y, N
policyinteger
Required

Ad insertion policy: 1 is Provider-based, 2 is No provider.

Options: 1, 2
providerstring

Required when policy is 1. Provider identifier.

defaultDurationinteger

Default ad break duration in seconds.

Min: 10 • Max: 180
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

streamidinteger
Required

Numeric stream ID.

Body

application/json
enabledstring
Required

Enable or disable ad insertion on the stream.

Allowed values:YN
policyinteger
Required

Ad insertion policy: 1 is Provider-based, 2 is No provider.

Allowed values:12
providerstring

Required when policy is 1. Provider identifier.

defaultDurationinteger

Default ad break duration in seconds.

Responses

resultstring
Required

Status of the API response.

Allowed values:successerror
messagestring

Human-readable message describing the result.