Documentation

Developer documentation
for tags, SDKs and the API

Six pages cover the whole setup. Copy the snippet, paste the file, check the report. When something is account-specific, the page says so.

Quick start

The path by surface

Inventory registered, authorization file published, tag or SDK placed, ad server connected, traffic verified: the same five moves on each surface. Pick yours and the steps adjust.

1Register inventoryCreate the property and each placement under Settings → Inventory. Names like article_top_970x250 stay readable in reports for years.
2Publish ads.txtAdd the line worksly.io, YOUR_ACCOUNT_ID, DIRECT, 1bc3f09e77a2c401 to the file at your domain root.
3Add the bidderReference bidder code worksly in your Prebid.js 8+ build, or let the WordPress plugin place slots from the block editor.
4Wire the ad serverImport the GAM line-item templates for each format and create the hb_pb, hb_bidder and hb_adid key-values.
5Verify and scaleRun the site audit, confirm delivery in the Worksly HB order, then roll the setup out to the rest of your placements.
Before step one
  • Ads.txt access at the domain root
  • GAM order and line-item permissions
  • Prebid.js 8 or newer, if you run a wrapper
Prebid with GAM guide
1Register mobile placementsSizes follow your templates; the 320×50 anchor is the usual first slot. Sticky units must stay dismissible.
2Publish ads.txtThe same worksly.io line, at the root of the domain serving the mobile pages.
3Set consent defaultsConsent Mode v2 flags start denied, your CMP loads next, and the tag comes last.
4Place the tagPlugin or wrapper tag, with mobile sizes declared per slot and refresh kept at least 60 seconds apart.
5Test both consent pathsDeny all purposes in an EEA-profiled browser and confirm requests carry no string, then accept and recheck.
Before step one
  • Ads.txt access at the domain root
  • A CMP registered on the IAB TCF list
  • Placement IDs from the dashboard
Consent setup guide
1Register the CTV appOne app entry under Settings → Inventory, with a placement per ad position in the stream.
2Publish app-ads.txtHost it at your developer domain, matching the store listing.
3Define the podsPod structure and SSAI ad break markers are set per stream, before manifests point anywhere.
4Point manifests at the ad serverSessions receive signed tokens, so each break is attributable in reporting.
5Check pod reportingWatch per-break impressions in the dashboard after the first streams go out.
Before step one
  • A registered CTV app ID
  • App-ads.txt at the developer domain
  • SSAI-capable stream packaging
CTV monetization
1Register the appThe dashboard issues an app ID, and each slot gets a placement ID under Settings → Inventory.
2Install the SDKAdd WorkslySDK through Swift Package Manager. Minimum deployment target: iOS 14.
3Initialize at launchOne call with your app ID, before the first ad request fires.
4Pass consentThe SDK reads your CMP through the standard shared storage, or you pass the string at initialization.
5Verify, then disable test modeTest creatives confirm placement wiring; release builds ship with test mode off.
Before step one
  • App ID and placement IDs from the dashboard
  • Xcode with Swift Package Manager
  • A CMP SDK for EEA and UK traffic
iOS and Android SDK quick start
1Register the appAn app ID for the app, a placement ID per slot, both under Settings → Inventory.
2Add the dependencyAdd com.worksly:sdk to your module build file. Minimum: API 21.
3Initialize in ApplicationThe init call runs in your Application class before any activity requests an ad.
4Grant rewards correctlyThe onRewarded callback fires only when the ad qualifies, so benefits are granted there.
5Prepare the releaseApp-ads.txt published, test traffic verified, test mode off in the store build.
Before step one
  • App ID and placement IDs from the dashboard
  • Gradle project on API 21 or newer
  • Your no-ad fallback path
iOS and Android SDK quick start
Requirements

What each environment needs

Minimum versions and the component you install, in one table. Anything older than these floors needs an upgrade before the tag or SDK goes in.

EnvironmentFloorYou installGuide
Prebid.js8 or newerWrapper build with the worksly bidder modulePrebid + GAM
Google Ad ManagerLine-item permissions in your networkLine-item templates, the three hb_ keys, one dedicated orderPrebid + GAM
AMPCurrent amp-ad runtimeFast Fetch tag per slotIntegrations
WordPressCurrent WordPress releaseWorksly plugin from the directoryGetting started
iOSiOS 14 or newerWorkslySDK via Swift Package Manager or CocoaPodsSDK quick start
AndroidAPI 21 or newercom.worksly:sdk from GradleSDK quick start
UnityBoth native SDKs underneathWorksly Unity package, rewarded and interstitial from one prefabSDK quick start
React NativeBoth native SDKs underneathNative module over iOS and Android, one API for bothSDK quick start
FlutterBoth native SDKs underneathPlugin with widgets for each ad formatSDK quick start

The three SDKs ship in test mode by default: test creatives confirm the wiring, and test traffic stays out of monetization reports until you turn the flag off.

Authentication

API keys and tokens

Reporting calls authenticate with a bearer token you generate in the dashboard. It carries full read access to your reporting, so it lives and moves like a password.

Where a token livesGenerated under Settings → API tokens and sent per request in the Authorization header as Bearer. The API is read-only.
How rotation worksRevoke the current token and issue a new one from the same page, then point your tooling at the new string. A revoked token answers 401 from its next use.
What to never doCommit one to a repository, embed one in client-side code a browser can read, or share a single token between staging and production.
Reporting request with a bearer tokenbash
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"
DashboardAuthorization: Bearerapi.worksly.io/v2
Read-only scope: reporting endpoints answer queries and nothing else.
Reporting API

Error codes and loss reasons

HTTP statuses tell you whether the request itself succeeded, and bid loss reasons tell you why an impression paid nothing. Both are stable, so alerts built on them keep working.

SignalKindMeaningWhat to do
400HTTP statusMalformed parameters, the body names the offending oneFix the named parameter and resend
401HTTP statusMissing or revoked tokenRotate it under Settings → API tokens
429HTTP statusMore than 60 requests per minute on one tokenHonor the Retry-After header instead of a fixed timer
5xxHTTP statusFailed on the Worksly sideRetry with backoff
belowFloorBid loss reasonA bid arrived but fell under your floorRecheck floors after a week of live bid data
insufficientBidBid loss reasonNo bid reached the clearing priceCheck that a GAM line item covers the bid's price bucket
timeoutBid loss reasonThe buyer answered too lateReview the wrapper timeout budget
noDemandBid loss reasonNo eligible buyer was targeted for the impressionWiden eligible demand or expect it in long-tail geos

Loss reason codes mirror the dashboard. Cursors stay valid while the query is unchanged, so paginated pulls reassemble cleanly on your side. Full reference: the Reporting API page.

Help

Ask the engineer
who wrote the page

The people who build the product answer support tickets.