Back to Developers

Demand API

Discover directly connected screens and partner inventory, bid on issued opportunities, or review and buy a native advertiser campaign. Read delivery from the same reporting system.

Machine-readable specAI agents and automated integrations should consume the canonical OpenAPI 3.0 JSON at https://api.trillboards.com/openrtb/v2/openapi.json. A discovery descriptor is also served at /.well-known/dsp-api-discovery.json. LLM agents can fetch https://api.trillboards.com/llms.txt for a flat plain-text summary.

DSP opportunity journey

Link your platform key to a DSP seat, obtain issued opportunities and submit an OpenRTB response. For a planned advertiser campaign, follow the buying journey below.

1. Link the DSP seat

Use your existing platform key. Onboarding links it to the seat without issuing a second secret. New seats start in sandbox; sandbox admission does not enter live selection.

POST /openrtb/v2/onboard
curl --fail-with-body -sS https://api.trillboards.com/openrtb/v2/onboard \
  -H "Authorization: Bearer $TRILLBOARDS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company_name":"Your Company","seat_id":"your_company","contact_email":"developer@your-company.example"}'

2. Read issued opportunities

GET /openrtb/v2/adslots
curl --fail-with-body -sS \
  "https://api.trillboards.com/openrtb/v2/adslots?format=openrtb&source=owned&limit=20" \
  -H "Authorization: Bearer $TRILLBOARDS_API_KEY"

Build the response from the exact issued request and impression IDs, currency and floor. A catalogue row or capacity forecast does not reserve inventory.

3. Submit the response

POST /openrtb/v2/bid
curl -sS -D bid-response.headers https://api.trillboards.com/openrtb/v2/bid \
  -H "Authorization: Bearer $TRILLBOARDS_API_KEY" \
  -H "Content-Type: application/json" -d @bid-response.json

A 200 admits a candidate; 204 is a normal no-bid outcome. Admission is separate from one-use live selection and billable completion. Follow the exact callback and delivery contract.

Continue with the DSP integration guide.

Advertiser buying journey

Use an advertiser OAuth token for https://api.trillboards.com/openrtb/v2/buying. Search and preview, save the campaign, attach artwork, prepare the exact total and open checkout. Read the verified payment and each line’s fulfillment state before treating the campaign as live.

An established direct player, API or validated adserver connection is owned and operated, including a screen owned by another publisher. Registration or an unused tag alone does not establish connection. Catalogue source, connection class and current readiness remain distinct.

The buyer guide includes stable action keys and maintained curl examples. The JavaScript example calls the official advertiser SDK. Use the supplier journey to connect inventory and the Data, market and supply-chain guide for the surrounding interfaces.

Why Trillboards

Audience intelligence

Read measured audience signals where available, with the response’s coverage and freshness.

Proof-of-play

Read canonical completed plays with signed, event-confirmed or partner-reported verification tiers.

Native creative review

Upload artwork into the existing asset and moderation flow, then read its actual review status.

Full reporting pipeline

Per-screen breakdown, time-series trends, fill rate, and CPM analytics via API.

Authentication

DSP routes use the platform key linked to the DSP seat. Advertiser buying uses a distinct advertiser OAuth grant for its exact resource. Public documentation, unsaved buyer preview and buyer inventory search can be read without a credential; a supplied credential is validated. Include the DSP key as a header:

Authentication
# Option 1: x-api-key header
curl -H "x-api-key: tb_dsp_YOUR_KEY" ...

# Option 2: Bearer token
curl -H "Authorization: Bearer tb_dsp_YOUR_KEY" ...

Each API key is issued with a set of scopes(e.g. bid:write, inventory:read, campaigns:write). Routes that require a scope you do not hold return 403 missing_scope with required_scope and granted_scopes in the response, see the endpoint table below for the scope each route requires.

New DSPs start in sandbox mode (100 req/min). Sandbox bids are validated but don't enter the live auction. Sandbox keys pass all scope checks (you can integrate against the full surface immediately). Contact support@trillboards.com to upgrade to production (1,000 req/min).

API Endpoints

DSP control routes and advertiser buying operations are listed below. Scope names apply to the credential for that group. The served OpenAPI contract defines each operation’s current request, response and security requirements; the full Demand reference also includes programmatic interfaces.

Onboarding

MethodEndpointScopeDescription
POST/openrtb/v2/onboardNoneLink an existing platform key to a DSP seat, or register through the supported onboarding flow.

Real-time bidding

MethodEndpointScopeDescription
POST/openrtb/v2/bidbid:writeSubmit OpenRTB 2.6 bid response (cached for waterfall injection).
GET/openrtb/v2/statsstats:read24h performance metrics: bids, wins, CPM, fill, latency.

Inventory discovery

MethodEndpointScopeDescription
GET/openrtb/v2/adslotsinventory:readBrowse screens with live FEIN signals (face count, attention, emotion, VAS).
POST/openrtb/v2/forecastinventory:readEstimate delivery for a budget + targeting tuple.
POST/openrtb/v2/discoverinventory:readSearch canonical inventory by query, geography, source and connection class.
GET/openrtb/v2/screens/:idinventory:readFull screen profile (venue, hours, audience composition, recent CPM).
POST/openrtb/v2/screens/availabilityinventory:readBulk capacity check for a screen set.
POST/openrtb/v2/screens/audienceinventory:readBulk audience profiles for a screen set.

Creatives (AI moderation pipeline)

MethodEndpointScopeDescription
POST/openrtb/v2/creativescampaigns:writeUpload creative by URL or get a presigned upload URL for native review.
GET/openrtb/v2/creativescampaigns:writeList your creatives with moderation status.
GET/openrtb/v2/creatives/:idcampaigns:writeCreative detail: IAB classification, content flags, age rating, brand recognition.
POST/openrtb/v2/creatives/:id/confirmcampaigns:writeConfirm presigned upload completed. Triggers AI moderation.

DSP campaign compatibility

MethodEndpointScopeDescription
POST/openrtb/v2/campaignscampaigns:writeCreate a campaign (approved creative + targeting).
POST/openrtb/v2/campaigns/assigncampaigns:writeLegacy assignment returns its native buying recovery route; use advertiser review and checkout.

Advertiser buying (advertiser OAuth)

MethodEndpointScopeDescription
POST/openrtb/v2/buying/inventory/searchNoneSearch screen and provider catalogues; source and connection class are independent.
POST/openrtb/v2/buying/plans/previewNonePreview without reserving inventory or charging the advertiser.
POST/openrtb/v2/buying/campaignscampaigns:writeSave the native campaign and selections.
POST/openrtb/v2/buying/campaigns/:advertisementId/creativecampaigns:writeImport artwork into native review; replacements can return 202.
POST/openrtb/v2/buying/campaigns/:advertisementId/preparecampaigns:readRead the exact total, currency, selection and readiness.
POST/openrtb/v2/buying/campaigns/:advertisementId/checkoutcheckout:writeCreate checkout for the reviewed selection; native payment verification follows.
GET/openrtb/v2/buying/campaigns/:advertisementIdcampaigns:readRead campaign, creative and per-line fulfillment progress.
GET/openrtb/v2/buying/campaigns/:advertisementId/deliverycampaigns:readRead measurement, reconciliation, pacing and screen performance.
POST/openrtb/v2/buying/campaigns/:advertisementId/rebookcampaigns:read campaigns:writeCreate a new unpaid campaign with fresh dates and pricing.
POST/openrtb/v2/buying/campaigns/:advertisementId/stopcampaigns:writeStop original lines and return any partial or pending outcome.
POST/openrtb/v2/buying/campaigns/:advertisementId/flightcampaigns:writeAmend supported original flights; report applied and pending results.
PATCH/openrtb/v2/buying/campaigns/:advertisementIdcampaigns:writeUpdate name, description or landing page.

Deals (PMP / preferred / guaranteed)

MethodEndpointScopeDescription
GET/openrtb/v2/dealsdeals:readList deals offered to your seat.
GET/openrtb/v2/deals/:dealIddeals:readDeal details, floor, caps, dates.
POST/openrtb/v2/deals/proposecampaigns:writePropose a PMP deal (admin approval required).

Market insights

MethodEndpointScopeDescription
GET/openrtb/v2/market/cpm-benchmarksstats:readPercentile CPM benchmarks by venue type / geography.
GET/openrtb/v2/market/demand-analysisstats:readDemand-side insights, competitive pressure, win-rate context.

Proof-of-play + reporting

MethodEndpointScopeDescription
GET/openrtb/v2/proof-of-playproof:readCanonical completed plays with each record’s actual verification tier.
GET/openrtb/v2/analytics/funnelreports:readIssued prebid opportunities and linked responses, selected starts and completions; read coverage.
GET/openrtb/v2/reports/summaryreports:readAggregated impressions, CPM, fill rate.
GET/openrtb/v2/reports/screensreports:readPer-screen performance breakdown.
GET/openrtb/v2/reports/timeseriesreports:readHourly or daily impression + CPM trends.

Webhooks

MethodEndpointScopeDescription
POST/openrtb/v2/webhookscampaigns:writeRegister a webhook URL.
GET/openrtb/v2/webhookscampaigns:writeList your registered webhooks.
GET/openrtb/v2/webhooks/deliveriescampaigns:writeDelivery log (last 7 days) for debugging.
DELETE/openrtb/v2/webhooks/:idcampaigns:writeRemove a webhook subscription.

Discovery

MethodEndpointScopeDescription
GET/openrtb/v2/openapi.jsonNoneMachine-readable OpenAPI 3.0 spec (cached 5 min). Always discoverable, no auth required.

AMP / Apparatix-style inventory ingestion

Some buyers (Apparatix-style product catalogs, AMP partners, agency tooling) ingest DOOH inventory once an hour by cron-polling /adslots and upserting screens into their own product table. The mapping below shows how the Trillboards response maps to that schema.

Field mapping

Trillboards fieldYour product fieldNotes
screen_idexternal_idStable identifier; safe upsert key.
nameproduct_nameHuman-readable screen name.
addresslocationPostal address.
venue_typeproduct_typeretail / restaurant / gym / transit / office / etc.
slot_duration_secondsad_durationDefault 15s; varies per screen.
floor_price_cpmrate_cardUSD floor CPM for this screen.
vendor (constant)vendorHard-coded to "Trillboards".

Hourly cron, bash

cron entry
# Every hour at minute 5
5 * * * * curl -s -H "x-api-key: $TRILLBOARDS_API_KEY" \
  "https://api.trillboards.com/openrtb/v2/adslots" \
  > /var/lib/your-product/trillboards-adslots.json

Node.js, hourly ingestion job

ingest-trillboards.js
// Pulls /adslots and upserts into a Mongo `products` collection.
// Drop into a cron job, or schedule via your favorite job runner.
const fetch = require('node-fetch');
const { MongoClient } = require('mongodb');

const API_KEY = process.env.TRILLBOARDS_API_KEY;
const MONGO_URL = process.env.MONGO_URL;

async function ingest() {
  const res = await fetch(
    'https://api.trillboards.com/openrtb/v2/adslots',
    { headers: { 'x-api-key': API_KEY } }
  );
  if (!res.ok) throw new Error(`adslots ${res.status}`);
  const body = await res.json();
  const screens = body?.data?.screens ?? [];

  const client = await MongoClient.connect(MONGO_URL);
  const products = client.db().collection('products');

  for (const s of screens) {
    await products.updateOne(
      { external_id: s.screen_id },
      {
        $set: {
          external_id: s.screen_id,
          product_name: s.name,
          location: s.address,
          product_type: s.venue_type,
          ad_duration: s.slot_duration_seconds ?? 15,
          rate_card: s.floor_price_cpm,
          vendor: 'Trillboards',
          updated_at: new Date(),
        },
      },
      { upsert: true }
    );
  }
  await client.close();
  console.log(`upserted ${screens.length} screens`);
}

ingest().catch((e) => { console.error(e); process.exit(1); });

Python, hourly ingestion job

ingest_trillboards.py
# Drop into your scheduler (Airflow, cron, Prefect, etc.).
import os
import requests
from pymongo import MongoClient, UpdateOne
from datetime import datetime, timezone

API_KEY = os.environ['TRILLBOARDS_API_KEY']
MONGO_URL = os.environ['MONGO_URL']

def ingest():
    resp = requests.get(
        'https://api.trillboards.com/openrtb/v2/adslots',
        headers={'x-api-key': API_KEY},
        timeout=30,
    )
    resp.raise_for_status()
    screens = resp.json().get('data', {}).get('screens', [])

    client = MongoClient(MONGO_URL)
    products = client.get_default_database()['products']

    ops = []
    for s in screens:
        ops.append(UpdateOne(
            {'external_id': s['screen_id']},
            {'$set': {
                'external_id':   s['screen_id'],
                'product_name':  s['name'],
                'location':      s.get('address'),
                'product_type':  s.get('venue_type'),
                'ad_duration':   s.get('slot_duration_seconds', 15),
                'rate_card':     s.get('floor_price_cpm'),
                'vendor':        'Trillboards',
                'updated_at':    datetime.now(timezone.utc),
            }},
            upsert=True,
        ))
    if ops:
        products.bulk_write(ops, ordered=False)
    client.close()
    print(f'upserted {len(ops)} screens')

if __name__ == '__main__':
    ingest()

Delta-sync via ?since=<ISO8601> / ?cursor=<token> is rolling out, when available, your job can request only screens updated since the last sync timestamp. Until then, full re-fetch each tick is the supported pattern (the response is gzipped and caches well for hourly polls).

Error Catalog

Every 4xx and 5xx response across /openrtb/v2/*uses one envelope. The error_code field is the machine-parseable contract; error is a human-readable string; request_id correlates to our logs (include it in support emails).

Unified error envelope
{
  "success": false,
  "error": "<human-readable string>",
  "error_code": "<snake_case_code>",
  "request_id": "req_<uuid>",
  // ...optional extras: param, retry_after_seconds,
  //                    required_scope, granted_scopes, nbr (bid only)
}

Retry guidance: 4xx are client errors. Fix the payload, do not retry the same call. 429 is rate-limit. Sleep for retry_after_seconds (or honor the Retry-After header) and retry. 5xx is server-side. Use exponential backoff (1s, 2s, 4s, 8s, max 60s) up to 5 attempts, then surface the request_id in a support ticket.

Authentication / authorization

error_codeHTTPRetryMeaning
authentication_required401neverAPI key missing or DSP context not populated.
not_authorized403neverAPI key resolved but does not own the requested resource.
missing_scope403neverKey lacks the scope required by this route. extras.required_scope names the missing scope; extras.granted_scopes lists what the key has.

Validation (fix the payload, do not retry)

error_codeHTTPRetryMeaning
missing_required_field400neverextras.param names the missing field.
missing_name400neverCreative / campaign upload missing the name field.
missing_content_type400neverCreative upload missing content_type.
missing_creative_id400neverCampaign / assignment missing creative_id.
missing_floor_cpm400neverDeal proposal missing floor_cpm.
invalid_eligible_screens400neverDeal proposal sent an empty eligible_screens. Send null (every screen) or a non-empty list of screen ids.
missing_screen_ids400neverAssignment missing the screen_ids[] array.
missing_asset_url400neverCreative upload missing asset_url or creative_url.
missing_deal_id400neverDeal lookup missing deal_id.
invalid_email400nevercontact_email failed format check on onboarding.
invalid_seat_id400neverseat_id must match ^[a-z0-9_]+$ and be 3-40 chars.
invalid_screen400neverscreen_id does not resolve to a known Trillboards screen.
invalid_budget400neverCampaign budget out of allowed range or wrong type.
invalid_date400neverDate param is not ISO-8601 or violates start < end.
invalid_webhook_url400neverWebhook endpoint must be https:// and not localhost / private RFC1918.
invalid_verification_tier400neverRequested verification tier not enabled for this seat.
invalid_bid_response400neverBid payload failed OpenRTB 2.6 schema validation. extras.nbr carries the no-bid reason code.
invalid_events400neverWebhook subscribe listed events outside the allowlist.

Resource state

error_codeHTTPRetryMeaning
seat_id_already_registered409neverOnboarding with a seat_id that already exists. Reuse the existing key (or pick a different seat_id).
already_exists409neverGeneric conflict on a unique-key insert.
deal_already_exists409neverPOST /deals/propose against an existing deal_id.
not_found404neverResource id not resolvable to anything the seat owns.
creative_not_found404nevercreative_id does not exist or is not owned by this seat.
screen_not_found404neverscreen_id does not exist.
deal_not_found404neverdeal_id does not exist.
webhook_not_found404neverwebhook_id does not exist or is not owned by this seat.

Throttling

error_codeHTTPRetryMeaning
rate_limited429after retry_after_secondsRate limit exceeded. extras.retry_after_seconds carries the cooldown; the Retry-After HTTP header is also set.

Server

error_codeHTTPRetryMeaning
api_key_provisioning_failed500exponential backoffOnboard succeeded at the DB layer but the key minting step failed. Re-call onboard.
internal_error500exponential backoffCaught uncaught exception. Retry once; if persistent, email developers@trillboards.com with the request_id.
unspecified_error500exponential backoffReserved fallback. Treat as internal_error.

FEIN Audience Signals

Trillboards screens run edge AI (FEIN) that provides real-time audience data for planning and measurement across the screen network. These signals are included in the /adslots response under ext.trb.fein.

SignalTypeFreshness
live_face_countinteger10s (edge)
attention_score0-110s (edge)
dominant_emotionstring10s (edge)
vas_7dnumberHourly
crowd_densityinteger10s (edge)
purchase_intentstringPer-utterance (speech)
income_levelenumPer ad opportunity (cloud)
ad_receptivity0-1Per ad opportunity (cloud)

Rate Limits

Per-seat in production; per-IP for unauthenticated /onboard. 429 responses carry retry_after_seconds and a Retry-After header.

GroupRoutesSandboxProduction
Bidding/bid100/min1,000/min
Inventory/adslots, /screens/*, /discover, /forecast, /proof-of-play100/min200/min
Campaigns/creatives, /campaigns, /campaigns/assign, /webhooks100/min100/min
Onboarding/onboard (per IP)5/hr5/hr

DSP rate limits are shown above. Advertiser buying uses authenticated account buckets: 200 reads/min and 100 writes/min, shared across token refresh. Follow returned retry headers. DSP rate limit headers include: RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset.

Need help integrating? Contact developers@trillboards.com