Get your API key
Sign in to the ENS Ads dashboard and copy your API key. Store it as an environment variable so it is never hardcoded in your source files:Every request you make will include this key in the
Authorization header as a Bearer token. See Authentication for full details.Fetch your first campaigns
Call A successful response returns an array of matching campaigns:Pick the first campaign from
GET /campaigns/fetch with the placement parameter to retrieve campaigns targeted to that slot. The placement value must match one of the predefined placement IDs — header_banner is a good starting point.data to display. Note the id — you will use it in the next two steps.Display the campaign
Render the campaign in your UI using the fields returned by the fetch response:
- Use
titleanddescriptionas the ad copy. - Link to
destinationUrlso the user is taken to the advertiser’s page when they click. - Place the ad in the
header_bannerslot (or whichever placement you requested).
Track an impression
Once the campaign is rendered and visible, call A successful response confirms the event was recorded:
POST /campaigns/impression to record the display event. Pass the same placement, location, and device values you used when fetching.Track one impression per campaign display, not per page load. If you show the same campaign multiple times on a single page, record multiple impressions accordingly.
What’s next
You have completed a full ad delivery cycle. Explore the guides below to go deeper:API reference
Full parameter and response documentation for all three endpoints.
Integration guide
A production-ready walkthrough covering error handling, targeting, and placements.
Error handling
Understand every error response and how to handle it gracefully.
Placements
Browse all supported placement IDs and their descriptions.