Fetch available campaigns
Call A successful response returns a
GET /api/v1/campaigns/fetch with a placement value and any optional targeting parameters. The placement parameter is required — the API will return a 400 error without it. Pass location (ISO 3166-1 alpha-2 country code) and device (mobile, desktop, or tablet) to narrow results to campaigns targeted at your user’s context.data array of campaign objects, each with an id, title, description, category, destinationUrl, and status.Validate campaign targeting
Before rendering, verify that the campaigns returned actually match your user’s current context. Check that the campaign’s
status is "running" and that any location, device, or category constraints align with what you passed in the request. Campaigns returned by the API are already filtered server-side, but validating on your side adds a second layer of assurance and protects against misconfiguration.Always confirm that the campaigns returned match the expected placement. A campaign intended for
sidebar_top should never be rendered in header_banner. Mismatched placements violate advertiser targeting rules and can affect billing accuracy.Display in the correct placement
Render each campaign in the placement slot it was fetched for. ENS Ads supports a range of placement identifiers — for example,
header_banner for a full-width top-of-page banner, article_inline for content embedded within articles, and feed_sponsored for native ads in content feeds. Use the campaign’s destinationUrl as the link target and its title and description for display content.Track impressions
Call A successful response confirms tracking:
POST /api/v1/campaigns/impression as soon as the campaign is visible to the user. Include the campaignId from the fetched campaign object, the placement slot, and the same location and device values used when fetching.