API: Episode Cuepoints

The Episode Cuepoint object

Cuepoints are specific points in time within you episode at which audio ADs can be injected. Please be aware that setting cuepoints on a episode is not enough to get ADs injected, since you also need to enable ADs and Monetization capabitilies to your account and show.

Property Type Description
timecode Numeric The position, in milliseconds, relative to the beginning of the audio file, at which the ADs should be injected
ads_max_count Numeric The maximum number of ADs that should be injected at this cuepoint

Retrieving an Episode’s Cuepoints

GET /v2/episodes/EPISODE-ID/cuepoints

Authenticated: yes. Owner: yes

This API returns the full list of Cuepoints for the given Episode. The cuepoint list is sorted chronologically, from first to last timecode. This API needs to be authenticated with the episode’s author credentials.

Example

curl -H "Authorization: Bearer OAUTH-TOKEN" https://api.spreaker.com/v2/episodes/1/cuepoints
{
    "response": {
        "cuepoints": [{
            "timecode": 1000,
            "ads_max_count": 1
        }, {
            "timecode": 2000,
            "ads_max_count": 2
        }]
    }
}

Updating an Episode’s Cuepoints

POST /v2/episodes/EPISODE-ID/cuepoints

Authenticated: yes. Owner: yes

Replace all episode’s cuepoints with the input ones. This API needs to be authenticated with the episode’s author credentials, and requires the cuepoints parameter. To delete all cuepoints you can call this API with cuepoints=[] or use the Delete Episode’s Cuepoints API.

The cuepoints parameter should be a JSON-encoded array of timecoded items, where each item should have the following properties:

Property Required Description
timecode yes The position, in milliseconds, relative to the beginning of the audio file, at which the ADs should be injected
ads_max_count yes The maximum number of ADs that should be injected at this cuepoint

Example

CUEPOINTS=`echo '[
    { "timecode": "1000", "ads_max_count": 1 },
    { "timecode": "2000", "ads_max_count": 2 }
]' | json -g -0`
curl -X POST -H "Authorization: Bearer OAUTH-TOKEN" -F "cuepoints=$CUEPOINTS" https://api.spreaker.com/v2/episodes/1/cuepoints

Deleting All of the Episode’s Cuepoints

DELETE /v2/episodes/EPISODE-ID/cuepoints

Authenticated: yes. Owner: yes

Deletes all the cuepoints for the given episode. This API needs to be authenticated with the episode’s author credentials.

Example

curl -X DELETE -H "Authorization: Bearer OAUTH-TOKEN" https://api.spreaker.com/v2/episodes/1/cuepoints