Developers

Reporting API

Every NexusAd member can mint scoped, read-only API keys and pipe their delivery, earnings and creative performance into spreadsheets, BI tools or their own dashboards. No paid tier, no approval queue.

Key-based auth

Send your key as a bearer token. Keys are hashed at rest and shown only once.

Read-only scopes

Grant exactly what a tool needs. Missing scopes return 403, never partial writes.

Full request log

Every call is recorded with status and latency in your console and in ops oversight.

Authentication

Create a key in your publisher console under API access, then send it in the Authorization header. Keys can be given an expiry and revoked at any moment; a revoked or expired key returns 403.

cURL

curl -H "Authorization: Bearer nxa_1a2b3c4d.YOUR_SECRET" \
  https://ad-network.wondercraft.dev/api/public/v1/reports

JavaScript

const res = await fetch("/api/public/v1/reports", {
  headers: { Authorization: `Bearer ${process.env.NEXUSAD_API_KEY}` },
});
if (!res.ok) throw new Error(await res.text());
const report = await res.json();

Endpoints

MethodPathScopeReturns
GET/api/public/v1/reportsreports.readRolling 30-day delivery totals, per-creative views/clicks/CTR, optional balance and sites.

Example response

{
  "account": { "display_name": "Nova Media", "credits": 18420 },
  "window": { "days": 30, "since": "2026-08-01T00:00:00.000Z" },
  "delivery": {
    "views_spent_30d": 12840,
    "views_earned_30d": 19755,
    "net_30d": 6915
  },
  "creatives": [
    { "id": "…", "title": "Launch banner", "size": "728x90",
      "status": "active", "views": 8120, "clicks": 96, "ctr": "1.182" }
  ],
  "generated_at": "2026-08-31T09:12:44.010Z"
}

Scopes

  • reports.read

    Read reporting

    Delivery, earnings and creative performance totals.

  • sites.read

    Read publisher sites

    Your registered sites and their verification state.

  • credits.read

    Read credit balance

    Current balance and recent credit movements.

Limits and good manners

  • Up to 10 active keys per account — revoke rather than accumulate.
  • Reporting figures are cached-free but change as delivery happens; polling more than once a minute adds nothing.
  • Keys are personal credentials. Never embed one in browser code or a public repository.
  • Suspicious traffic can be revoked by network operations without notice.