All docs
Publishers & advertisersUpdated November 18, 2026

Reporting API

Query revenue, impressions, eCPM and fill rate by deal, placement, geo and device over HTTPS, with pagination and rate limits.

The Reporting API gives you the dashboard’s numbers in your own tooling: revenue, impressions, eCPM and fill rate, grouped by deal, placement, geo, device, or any combination, with bid-loss reasons for diagnosis. It is a read-only HTTPS API authenticated with a bearer token.

Authentication

Each request carries a bearer token in the Authorization header. Generate tokens in the dashboard under Settings → API tokens, and treat them like credentials: they carry full read access to your reporting. Tokens can be revoked and rotated from the same page.

curl -s "https://api.worksly.io/v2/report?from=2026-11-01&to=2026-11-07&groupBy=deal,placement&metrics=revenue,impressions,ecpm,fillRate" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Query parameters

Parameter Values Notes
from, to YYYY-MM-DD dates Inclusive range, your account’s reporting timezone
groupBy deal, placement, geo, device Comma-separated; any combination; omit for totals only
metrics revenue, impressions, ecpm, fillRate, bidLossReasons Comma-separated; at least one required
limit 1–1000 Rows per response, default 100
cursor Opaque string From pagination.nextCursor in the previous response

bidLossReasons behaves like the dashboard: it attaches the top loss reasons and their impression counts to each grouped row, so a deal-level row comes back with the reasons bids were lost on that deal. Reason codes mirror the dashboard and are stable strings, safe to chart over time. The most common are belowFloor (a bid arrived but fell under your floor), insufficientBid (no bid reached the clearing price), timeout (the buyer answered too late) and noDemand (no eligible buyer was targeted for the impression).

Version 2 is the current API. Version 1 endpoints keep responding through mid-2027, then they are retired.

Response format

The API returns JSON. A response for the query above:

{
  "data": [
    {
      "date": "2026-11-03",
      "deal": "WS-PMP-Q4-044",
      "placement": "article_top_970x250",
      "revenue": 4821.77,
      "impressions": 612409,
      "ecpm": 7.87,
      "fillRate": 0.92
    }
  ],
  "pagination": {
    "nextCursor": "eyJkIjoxNzYxNDg0ODAwfQ",
    "hasMore": true
  }
}

Fields match the dashboard’s definitions: revenue in your account currency, ecpm per thousand impressions, fillRate as a decimal from 0 to 1. The grouping keys echo back in each row, so paginated pages reassemble cleanly on your side. When groupBy includes bidLossReasons-relevant dimensions, rows carry a bidLoss object with reason codes and impression counts.

Pagination

Result sets larger than limit come back with hasMore: true and a nextCursor. Pass the cursor back as a query parameter until hasMore is false:

curl -s "https://api.worksly.io/v2/report?from=2026-11-01&to=2026-11-07&groupBy=deal,placement,geo,device&metrics=revenue,impressions,ecpm&limit=1000&cursor=eyJkIjoxNzYxNDg0ODAwfQ" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

A simple loop in any language: request page one, read nextCursor, repeat while hasMore. Cursors remain valid while the underlying query is unchanged; if you change the parameters, start over from page one.

Rate limits

The API allows 60 requests per minute per token. Exceeding it returns HTTP 429 with a Retry-After header giving the seconds until the next request will be accepted. Honor that header. The dashboard and CSV export remain available at any volume, so use the API for automation-sized jobs and the export for one-off pulls.

Recipes

Two queries cover most needs:

  1. Weekly deal review: groupBy=deal&metrics=revenue,impressions,ecpm,fillRate,bidLossReasons over the trailing week, one row per deal with its loss profile attached.
  2. Placement health check: groupBy=placement,device&metrics=ecpm,fillRate over 30 days, the same slices the ad layout handbook asks you to review per placement.

Errors follow standard codes: 400 for malformed parameters (the body names the offending one), 401 for a missing or revoked token, 429 for rate limiting, and 5xx for our side. Retry those with backoff.

Deal and placement names in the examples are illustrative. The values that appear in your responses are the deal and placement names configured in your account under Settings → Inventory, so keep those names stable if you build tooling against the API.

Was this page helpful?It goes straight to the engineer who wrote it.
Suggest an edit
Next step

Start monetizing
with Worksly

Once the tag is live, the reports start filling in with the first impressions.