Skip to main content
The Ad Configuration controls how ad slots are inserted into your feed responses. When ads are enabled, the server automatically interleaves ad_slot items between your content based on these settings. The SDK receives ad slots as part of the feed and handles rendering. Both endpoints require a secret key only — portal JWTs are not accepted.

The ad config object


Attributes

Placement

boolean
default:false
Master switch. When false, no ad slots are injected into the feed.
integer
default:5
Number of content items between consecutive ad slots after the first ad.
integer
default:3
Position of the first ad slot, counted in content items. A value of 3 means the first ad appears after the third content item.
integer
default:3
Maximum number of ad slots injected per feed page.

Ad source

string | null
VAST/VMAP ad tag URL. Passed through to the SDK in each ad slot so the client-side ad player can request creatives from your ad server.
string | null
Ad unit identifier from your ad platform (e.g., Google Ad Manager, AppLovin). When nativeAdUnitId is set, native ad slots use that value instead.

Skip behavior

string
default:"skippable_after"
Controls whether users can skip ads. Passed through to the SDK — set it to whatever your ad rendering layer expects (e.g., "skippable_after", "non_skippable", "always_skippable").
integer
default:5
Seconds the user must watch before a skip button appears. Only relevant when skipPolicy allows skipping.

Targeting

object
default:"{}"
Key-value pairs passed through in every ad slot’s targeting field. Use this for default targeting signals (content category, audience segment, etc.).

Native ads

These fields configure native ad rendering. When nativeEnabled is true, ad slots include adFormat: "native" and a nativeAssetKeys object mapping your ad platform’s response keys to the fields the SDK expects.
boolean
default:false
When true, ad slots are served as native ads instead of VAST video ads.
string | null
Identifier for your native ad format template.
string | null
Ad unit ID used specifically for native ad slots. Overrides adUnitId for native ads.
string
default:"video_url"
Key in your native ad response containing the video creative URL.
string
default:"headline"
Key for the ad headline text.
string
default:"cta_text"
Key for the call-to-action button text.
string
default:"sponsor_name"
Key for the sponsor/advertiser name.
string
default:"sponsor_logo"
Key for the sponsor logo image URL.

How ads appear in the feed

When enabled is true, the server inserts ad_slot items into feed responses. The placement algorithm:
  1. First ad — inserted after position firstAdOffset
  2. Recurring — another ad every frequency content items
  3. Page cap — no more than maxPerPage per page

Ad slot shape

Each ad slot in the feed contains everything the client needs to request and render an ad:
When nativeEnabled is true, ad slots include native-specific fields:
When enabled is false, no ad slots appear in the feed. You can update other config fields while ads are disabled — they take effect when you re-enable.