Ad InsertionUpdate Ad Insertion Settings

Update Ad Insertion Settings

Updates the ad insertion record for the pull stream. The record must already exist (i.e. ad insertion must have been enabled with PUT first).

curl -X POST "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": 45
}'
{
  "result": "success"
}
POST
/streams/pull/{streamid}/adinsertion
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)

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.