Appearance
Ads & promotions
Mounted under /v1. Responses are { data, meta }; errors are Problem Details. Money is { amountMinor, currency } (input: integer; output: string). "Manage" means the advertiser is the caller's own, or the caller holds ads:manage on its creator profile (studio team); "view" also accepts stats:read.
Advertisers
| Method | Path | Auth | Body | Response | Errors |
|---|---|---|---|---|---|
| POST | /ads/advertisers | user | profileId?, displayName, legalName?, taxId?, countryCode?, websiteUrl?, industry? | 201 Advertiser | ADS_ADVERTISER_EXISTS, FORBIDDEN |
| GET | /ads/advertisers | user | — | Advertiser[] (created by caller) | — |
One advertiser per person (kind: user) and one per creator profile (kind: profile).
Campaigns
| Method | Path | Auth | Body / query | Response | Errors |
|---|---|---|---|---|---|
| POST | /ads/campaigns | manage | advertiserId, name, objective (awareness, streams, followers, ticket_sales, mart_sales), bidModel (cpm, cpc), bid, budgetTotal, budgetDaily, startsAt, endsAt, frequencyCap (1–100, def 3), frequencyWindowHours (1–720, def 24), placements[], targeting { countries[], genreIds[], ageRanges[], devices[], plans[] } | 201 Campaign | ADS_CURRENCY_MISMATCH, ADS_BUDGET_INVALID, ADS_SCHEDULE_INVALID, ADS_ADVERTISER_NOT_FOUND, ADS_ADVERTISER_SUSPENDED |
| GET | /ads/campaigns | user | advertiserId?, status?, cursor?, limit? | Campaign page | ADS_ADVERTISER_NOT_FOUND |
| GET | /ads/campaigns/:id | view | — | Campaign | ADS_CAMPAIGN_NOT_FOUND |
| PATCH | /ads/campaigns/:id | manage, draft | any create field except advertiserId | Campaign | ADS_CAMPAIGN_LOCKED, ADS_CAMPAIGN_ALREADY_FUNDED (budget change after funding) |
| POST | /ads/campaigns/:id/creatives | manage, draft | kind, headline, body?, callToAction, landingUrl?, mediaAssetId?, durationMs? (≤ 30000), width?, height?, altText?, targetType?, targetId? | 201 Campaign | ADS_CREATIVE_INVALID, ADS_CREATIVE_PLACEMENT_MISMATCH, ADS_TARGET_NOT_PROMOTABLE |
| DELETE | /ads/campaigns/:id/creatives/:creativeId | manage, draft | — | Campaign | ADS_CREATIVE_NOT_FOUND |
| POST | /ads/campaigns/:id/fund | manage, draft, Idempotency-Key | method (wallet, card, bank_transfer) | 201 { paymentId, status, checkoutUrl } | ADS_CAMPAIGN_ALREADY_FUNDED, IDEMPOTENCY_* |
| POST | /ads/campaigns/:id/submit | manage | — | Campaign (pending_review) | ADS_CREATIVE_REQUIRED, ADS_CAMPAIGN_NOT_FUNDED, ADS_INVALID_TRANSITION |
| POST | /ads/campaigns/:id/withdraw | manage | — | Campaign (draft) | ADS_INVALID_TRANSITION |
| POST | /ads/campaigns/:id/pause · /resume · /end | manage | — | Campaign | ADS_INVALID_TRANSITION, ADS_SCHEDULE_INVALID |
| GET | /ads/campaigns/:id/report | view | from, to (YYYY-MM-DD, ≤ 366 days) | Report | ADS_REPORT_RANGE_INVALID |
| GET | /ads/profiles/:profileId/report | stats:read | from, to | Report (all the profile's campaigns) | FORBIDDEN |
Lifecycle: draft → pending_review → active ⇄ paused → completed, pending_review → rejected (staff) or → draft (withdraw). The sweep completes campaigns past endsAt or out of budget. Two hours after a campaign ends (or is rejected), it settles: spend is booked and the unspent budget is credited to the payer's wallet.
Placements: home_banner, sponsored_track, sponsored_playlist_slot, preview_preroll, live_discovery, search_top. Creative kinds: banner_image, audio_spot, video (need mediaAssetId) and sponsored_track, sponsored_playlist, sponsored_live, sponsored_product (need targetType + targetId the advertiser owns). Each creative must fit one of the campaign's placements.
Report: { from, to, totals { impressions, clicks, ctr, spend[] }, days[{ day, impressions, clicks, reach, spend }], placements[], countries[] }. Days are UTC; a day can appear once per currency.
Promotions
| Method | Path | Auth | Body | Response | Errors |
|---|---|---|---|---|---|
| POST | /ads/boosts | ads:manage on profile | profileId, releaseId, budgetTotal, days (1–90), startsAt?, countries[], objective (streams, followers) | 201 Campaign | ADS_RELEASE_NOT_FOUND, ADS_RELEASE_NOT_PUBLISHED |
A boost is a CPM campaign on sponsored_track, home_banner and search_top, targeted at the release's genres, with a sponsored-track creative for its lead track. Fund it like any campaign; once paid it goes to review on its own.
Delivery (guest allowed)
| Method | Path | Auth | Body | Response | Errors |
|---|---|---|---|---|---|
| POST | /ads/decisions | optional, 120/min | placement, device, countryCode?, genreIds[] | { ad: null | { token, campaignId, placement, creative, expiresAt } } | — |
| POST | /ads/impressions | optional, 240/min | token | 202 | ADS_TOKEN_INVALID, ADS_TOKEN_EXPIRED (1 h) |
| POST | /ads/clicks | optional, 60/min | token | 202 | ADS_TOKEN_INVALID, ADS_TOKEN_EXPIRED (24 h) |
The token is signed and bound to the listener it was served to. Impressions and clicks are counted once per decision. Ad-free listeners never get home_banner or preview_preroll.
Staff (ads:approve)
| Method | Path | Body / query | Response |
|---|---|---|---|
| GET | /staff/ads/campaigns | status (def pending_review), cursor?, limit? | Campaign page, oldest first |
| POST | /staff/ads/campaigns/:id/approve | — | { status: "ok" } |
| POST | /staff/ads/campaigns/:id/reject | reason | { status: "ok" } |
Events
ads.campaign.status_changed, ads.campaign.funded, ads.campaign.settled.
Account privacy
| Event | Behaviour |
|---|---|
identity.user.deleted | Open campaigns (pending_review, active, paused) move to completed (system); the settlement sweep refunds unspent budget. Ad events lose user_id; the advertiser is suspended and renamed, legal/tax details kept as financial records. |
identity.user.deactivated | Active campaigns are paused by the system and recorded in ad_deactivation_holds. |
identity.user.reactivated | Only the held campaigns resume, unless past endsAt. |
| Data export | Section ads: advertisers and campaigns. |
The state machine lets system pause/resume (account status only) and complete from pending_review.
Staff console (ads:approve)
| Method | Path | Body | Response | Errors |
|---|---|---|---|---|
| GET | /v1/staff/ads/campaigns/:id | — | { campaign (with creatives, targeting, funded/spent/refunded), advertiser, report (last 30 days: impressions, clicks, spend by day) } | ADS_CAMPAIGN_NOT_FOUND, ADS_ADVERTISER_NOT_FOUND |
| POST | /v1/staff/ads/advertisers/:id/suspend | { reason } | { status: "ok", campaignsPaused } — every active campaign is paused in the same transaction; audited | ADS_ADVERTISER_NOT_FOUND |
| POST | /v1/staff/ads/advertisers/:id/unsuspend | { reason } | { status: "ok", campaignsPaused: 0 } — campaigns stay paused until the advertiser resumes them; audited | ADS_ADVERTISER_NOT_FOUND |
A suspended advertiser's own actions return ADS_ADVERTISER_SUSPENDED.
Batched impressions
POST /ads/impressions/batch { tokens: string[1..50] } answers 202 { accepted }; stale or invalid tokens are skipped.
Promote and My Ads
| Method | Path | Notes |
|---|---|---|
| GET | /ads/settings?currency=NGN | { currency, isAvailable, boostCpm, minBudget, budgetPresets[], maxDays, defaultDays } from the staff setting ads.boost |
| POST | /ads/quotes | { budgetTotal, days, countries?, objective?, profileId?, releaseId? } gives { cpm, dailyBudget, estimatedImpressions { low, high }, estimatedReach { low, high }, minBudget, maxDays } |
| GET | /ads/placements | [{ placement, label, description, creativeKinds[], interruptive }] |
| POST | /ads/campaigns/:id/discard | Draft only (ADS_CAMPAIGN_NOT_DRAFT): ends it and returns what was paid to the wallet straight away |
| DELETE | /ads/campaigns/:id | An unpaid draft with no payment waiting (ADS_CAMPAIGN_ALREADY_FUNDED, ADS_CAMPAIGN_LOCKED) |
| POST | /ads/campaigns/:id/duplicate | A new unpaid draft with the same setup and creatives, as long as the original, starting now |
- Boosts refuse a currency with no CPM (
ADS_CURRENCY_UNAVAILABLE), a budget under the minimum (ADS_BUDGET_TOO_SMALL) and a length overmaxDays(ADS_BOOST_TOO_LONG).ads.expectedCtrranks cost-per-click bids. - Campaign views carry
stats { impressions, clicks, reach, ctr }(lifetime, rollups lag up to 15 minutes),promoted { type, id, title, subtitle, imageUrl } | nullfor boosts, andpreview { title, subtitle, imageUrl }on each creative. POST /ads/decisionscreatives carryimageUrl(the banner, or the promoted item's artwork) andpreview. Video spots have no playback URL yet.fundneeds theads-policydocument accepted, for every campaign. On iPhone, card and bank transfer followwallet.iosHostedCheckout.ads(off by default: wallet only).- Upload creatives with
purpose: "ad_creative": audio and video at most 30 seconds, images at least 600 px on the short side and between 1:2 and 2:1. - When a campaign settles, the payer gets
ads.campaign.settledwith what went back to the wallet.