Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/trillboards-com:trillboards-com-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: Trillboards Partner Analytics API
version: 1.1.0
description: 'API for partner integrations with Trillboards digital advertising platform.
Use this API to integrate ads into your vending machines, kiosks, digital signage,
and other display devices. Partners receive competitive revenue share on all impressions.
## Authentication
Most endpoints require API key authentication using Bearer token:
```
Authorization: Bearer trb_partner_xxxxx
```
API keys are generated during partner registration and should be stored securely.
## Rate Limits
All endpoints return rate limit headers:
- `X-RateLimit-Limit`: Maximum requests allowed per window
- `X-RateLimit-Remaining`: Requests remaining in current window
- `X-RateLimit-Reset`: Unix timestamp when window resets
- `RateLimit-Policy`: IETF draft-7 format policy string
Rate limits by endpoint type:
| Endpoint Type | Limit | Window |
|--------------|-------|--------|
| Registration | 5 | 1 hour |
| Authenticated API | 1000 | 1 minute |
| Ad serving | 100 | 1 minute |
| Impressions | 500 | 1 minute |
| Programmatic events | 300 | 1 minute |
| Batch impressions | 100 | 1 minute |
| Heartbeat | 60 | 1 minute |
| Venue intelligence | 100 | 1 minute |
| Audience intelligence | 100 | 1 minute |
| Bulk device operations | 20 | 1 minute |
Exceeding rate limits returns HTTP 429 with a `Retry-After` header.
## Quick Start
**Option A: New Partner Registration**
1. Register as a partner via `POST /register` (returns API key)
2. Register your devices
3. Load the `embed_url` in your device''s WebView or use `/device/{id}/ads` in custom UI
4. Impressions are tracked automatically
**Option B: Existing Earner Upgrade**
If you already have a Trillboards earner account:
1. Call `POST https://api.trillboards.com/v2/earner/upgrade-to-partner` with your user JWT
2. Receive your Partner API key (one-time display - save it!)
3. Your existing screens remain visible alongside new API-registered screens
## SDK
Install the official TypeScript SDK for type-safe integration:
```
npm install @trillboards/ads-sdk
```
The SDK provides 4 entry points:
- `@trillboards/ads-sdk` — Core browser SDK with ad player, events, and caching
- `@trillboards/ads-sdk/react` — React hooks and components (TrillboardsProvider, TrillboardsAdSlot)
- `@trillboards/ads-sdk/react-native` — React Native WebView wrapper
- `@trillboards/ads-sdk/server` — Node.js PartnerClient with audience, analytics, auctions, creatives
Full documentation: https://trillboards.com/developers/partner-sdk'
contact:
name: Trillboards Developer Support
email: developers@trillboards.com
url: https://trillboards.com/developers
license:
name: Proprietary
url: https://trillboards.com/terms-of-service
servers:
- url: https://api.trillboards.com/v1/partner
description: Production API
- url: http://localhost:4004/v1/partner
description: Local development
tags:
- name: Analytics
description: Analytics and reporting
paths:
/analytics:
get:
tags:
- Analytics
summary: Get partner analytics
operationId: getAnalytics
security:
- BearerAuth: []
parameters:
- name: start_date
in: query
schema:
type: string
format: date
- name: end_date
in: query
schema:
type: string
format: date
responses:
'200':
description: Analytics data
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
partner:
type: object
properties:
total_devices:
type: integer
active_devices:
type: integer
total_impressions:
type: integer
total_revenue_cents:
type: integer
pending_payout_cents:
type: integer
devices_by_status:
type: array
items:
type: object
impressions_by_day:
type: array
items:
type: object
properties:
_id:
type: string
description: Date (YYYY-MM-DD)
impressions:
type: integer
period:
type: object
properties:
start:
type: string
format: date-time
end:
type: string
format: date-time
/screens/{screenId}/audience-metrics:
get:
tags:
- Analytics
summary: Get real-time audience metrics
description: 'Get real-time audience metrics for a screen including face detection,
attention tracking, and demographic signals from the Troveworks AI pipeline.'
operationId: getAudienceMetrics
security:
- BearerAuth: []
parameters:
- name: screenId
in: path
required: true
schema:
type: string
- name: period
in: query
description: Time period for metrics
schema:
type: string
enum:
- 1h
- 6h
- 24h
default: 1h
- name: include_history
in: query
description: Include historical data points
schema:
type: boolean
default: false
responses:
'200':
description: Audience metrics retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceMetricsResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/audience-export:
get:
tags:
- Analytics
summary: Export audience data
description: 'Export aggregated audience data for multiple screens.
Supports JSON and CSV formats.'
operationId: exportAudienceData
security:
- BearerAuth: []
parameters:
- name: screen_ids
in: query
required: true
description: Comma-separated screen IDs (max 50)
schema:
type: string
- name: start_date
in: query
description: Start date (ISO 8601)
schema:
type: string
format: date
- name: end_date
in: query
description: End date (ISO 8601)
schema:
type: string
format: date
- name: format
in: query
description: Export format
schema:
type: string
enum:
- json
- csv
default: json
- name: aggregation
in: query
description: Data aggregation level
schema:
type: string
enum:
- hourly
- daily
- weekly
default: daily
responses:
'200':
description: Audience data exported
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceExportResponse'
text/csv:
schema:
type: string
description: CSV formatted data
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/screens/{screenId}/demographics:
get:
tags:
- Analytics
summary: Get screen demographics
description: 'Get demographic summary for a screen including age distribution,
gender split, income profile, and lifestyle segments.'
operationId: getScreenDemographics
security:
- BearerAuth: []
parameters:
- name: screenId
in: path
required: true
schema:
type: string
- name: period
in: query
description: Time period
schema:
type: string
enum:
- 24h
- 7d
- 30d
default: 7d
responses:
'200':
description: Demographics retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/DemographicsResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/audience-analytics:
get:
tags:
- Analytics
summary: Get partner-wide audience analytics
description: 'Get aggregated audience analytics across all partner screens.
Provides overview of impressions, active screens, and audience metrics.'
operationId: getAudienceAnalytics
security:
- BearerAuth: []
parameters:
- name: period
in: query
description: Time period
schema:
type: string
enum:
- 24h
- 7d
- 30d
default: 7d
responses:
'200':
description: Analytics retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceAnalyticsResponse'
'401':
$ref: '#/components/responses/Unauthorized'
components:
schemas:
AudienceAnalyticsResponse:
type: object
properties:
success:
type: boolean
request_id:
type: string
data:
type: object
properties:
period:
type: string
overview:
type: object
properties:
total_screens:
type: integer
active_screens:
type: integer
total_impressions:
type: integer
avg_impressions_per_screen:
type: integer
audience:
type: object
properties:
avg_face_count:
type: number
avg_attention:
type: number
screens_with_data:
type: integer
trends:
type: object
properties:
impressions_trend:
type: string
enum:
- increasing
- stable
- decreasing
audience_trend:
type: string
enum:
- increasing
- stable
- decreasing
timestamp:
type: string
format: date-time
Error:
type: object
properties:
success:
type: boolean
example: false
message:
type: string
error:
type: string
AudienceExportResponse:
type: object
properties:
success:
type: boolean
request_id:
type: string
data:
type: array
items:
type: object
properties:
screen_id:
type: string
screen_name:
type: string
location:
type: string
country:
type: string
period:
type: object
properties:
start:
type: string
format: date-time
end:
type: string
format: date-time
impressions:
type: integer
audience:
type: object
properties:
avg_face_count:
type: number
avg_attention:
type: number
demographics:
type: object
income_profile:
type: object
lifestyle_segments:
type: array
items:
type: string
summary:
type: object
properties:
total_screens:
type: integer
total_impressions:
type: integer
period:
type: object
aggregation:
type: string
DemographicsResponse:
type: object
properties:
success:
type: boolean
request_id:
type: string
data:
type: object
properties:
screen_id:
type: string
screen_name:
type: string
period:
type: string
demographics:
type: object
properties:
age_distribution:
type: object
properties:
18-25:
type: number
26-35:
type: number
36-50:
type: number
50+:
type: number
gender_split:
type: object
properties:
male:
type: number
female:
type: number
income_profile:
type: object
properties:
low:
type: number
medium:
type: number
high:
type: number
premium:
type: number
lifestyle_segments:
type: array
items:
type: string
group_composition:
type: object
properties:
solo:
type: number
couples:
type: number
families:
type: number
friends:
type: number
work_groups:
type: number
data_quality:
type: object
properties:
sample_size:
type: integer
confidence:
type: number
timestamp:
type: string
format: date-time
AudienceMetricsResponse:
type: object
properties:
success:
type: boolean
request_id:
type: string
data:
type: object
properties:
screen_id:
type: string
screen_name:
type: string
live:
type: object
properties:
avgFaceCount:
type: number
description: Average faces detected
maxFaces:
type: integer
description: Maximum faces detected in period
avgAttention:
type: number
description: Average attention score (0-1)
incomeLevel:
type: string
enum:
- unknown
- low
- medium
- high
- premium
mood:
type: string
screenEngagement:
type: string
aggregated:
type: object
properties:
incomeProfile:
type: object
properties:
low:
type: number
medium:
type: number
high:
type: number
premium:
type: number
groupComposition:
type: object
avgFaceCount:
type: number
avgAttention:
type: number
avgDwellMs:
type: number
history:
type: array
items:
type: object
period:
type: string
timestamp:
type: string
format: date-time
responses:
Unauthorized:
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
message: API key required
BadRequest:
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
message: Missing required fields
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
message: Device not found
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: 'API key authentication. Include your API key as a Bearer token:
```
Authorization: Bearer trb_partner_xxxxx
```
'
UserJWT:
type: http
scheme: bearer
description: 'User JWT authentication for earner-to-partner upgrade.
Used only for the `/v2/earner/upgrade-to-partner` endpoint.
This is the same JWT token used for the Earner Portal.
'