Developers

API & OpenRTB Documentation

Endpoints below match the live MS ADS NETWORK SSP codebase. Impressions and clicks are queued, fraud-checked, then written to ad_stats only after verification.

OpenRTB 2.5 RTB Fraud Protection Verified traffic

Authentication

OpenRTB bid endpoints accept an API key when OPENRTB_API_KEY is configured on the server:

If no key is configured, requests are accepted (optional IP allow-list may still apply). Publisher dashboard uses session auth at /publisher/*.

OpenRTB Bid Endpoints

All POST paths share the same handler. GET returns endpoint info (browser-friendly).

POST https://msadsnetwork.com/api/openrtb/bid

Primary JSON OpenRTB bid request. Aliases:

  • POST https://msadsnetwork.com/openrtb/bidrequest
  • POST https://msadsnetwork.com/openrtb/v2/bid
  • POST https://msadsnetwork.com/api/openrtb/v2/bid

Example bid request

POST /api/openrtb/bid HTTP/1.1
Host: msadsnetwork.com
Content-Type: application/json
X-Api-Key: YOUR_OPENRTB_API_KEY

{
  "id": "bid-req-001",
  "imp": [{
    "id": "1",
    "banner": { "w": 300, "h": 250 },
    "bidfloor": 0.10,
    "bidfloorcur": "USD"
  }],
  "site": { "domain": "example.com", "page": "https://example.com/article" },
  "device": { "ua": "Mozilla/5.0", "ip": "203.0.113.10" },
  "at": 1,
  "tmax": 120
}

Example responses

Winning bid (simplified) or no-bid with nbr. Invalid body → HTTP 400 with nbr: 2. Bad API key → HTTP 401.

{
  "id": "bid-req-001",
  "seatbid": [{
    "bid": [{
      "id": "bid-1",
      "impid": "1",
      "price": 1.25,
      "adm": "<!-- creative markup -->",
      "nurl": "https://msadsnetwork.com/..."
    }]
  }],
  "cur": "USD"
}

Ad serving & tracking (SSP tags)

GET https://msadsnetwork.com/serve-ad/{code}

Serve creative for an ad unit code. Fraudulent traffic is rejected before auction.

GET https://msadsnetwork.com/track-impression/{ad_unit_code}

1×1 pixel. Queues impression → traffic:verify cron → verified ad_stats only.

Query: price (CPM), auction_id

GET https://msadsnetwork.com/track-click/{ad_unit_code}

Click redirect. Fraud / click-bomb checks run first; valid events go to verification queue.

Query: redirect, price, auction_id

GET https://msadsnetwork.com/api/ad/fetch

JSON ad fetch helper used by some client integrations.

GET https://msadsnetwork.com/api/ad-units/{code}/prebid-config

Prebid.js configuration for an ad unit code.

Publisher SDK API (prefix /api)

POST /api/ad/request — request creative (publisher_id, url, placement, device…)
POST /api/ad/impression — SDK impression beacon
POST /api/ad/click — SDK click beacon

Mobile app API

POST /api/v1/app/ad-request
POST /api/v1/app/impression · /click · /reward
GET /api/v1/app/config/{app_id}

DSP reporting API

Throttled partner reporting under /api/dsp/reports/*:

/performance /inventory /daily /realtime /export

Traffic verification pipeline

  1. Event recorded in verification queue (not counted as revenue yet).
  2. Checks: IP blocklist, bot UA, frequency / identical-event patterns, click referrer, device type, FraudDetectionService score.
  3. Cron traffic:verify (via /msads-cron-traffic.php) moves valid events into ad_stats / clicks.
  4. Rejected events stay out of publisher earnings dashboards.

Need OpenRTB credentials?

Contact support or use the DSP portal for partner access.