Trillboards Impressions API

Impression tracking

GitHub OpenAPI

Operations 4

GET /impression Record impression (pixel) #
POST /impression Record impression (POST) #
POST /openrtb/v1/complete Record ad completion (custom players) #
POST /impressions/batch Batch record impressions #

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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trillboards-com:trillboards-com-impressions-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

trillboards-com-impressions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trillboards Partner Impressions 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: Impressions
  description: Impression tracking
paths:
  /impression:
    get:
      tags:
      - Impressions
      summary: Record impression (pixel)
      description: 'Record a single impression. Can be called as a tracking pixel (1x1 image load).


        Both GET and POST methods are supported for flexibility.

        Duplicate `impid` + `adid` submissions are ignored (idempotent).


        **Optional Signature Verification**

        Provide signature headers to verify impressions:

        ```

        X-Trillboards-API-Key: trb_partner_xxxxx

        X-Trillboards-Timestamp:

        X-Trillboards-Signature: sha256=

        ```

        Signature payload:

        ```

        {timestamp}.{adid}.{impid}.{did}.{sid}.{aid}

        ```

        Signature = HMAC-SHA256(api_key, payload)'
      operationId: recordImpressionGet
      parameters:
      - name: X-Trillboards-API-Key
        in: header
        description: Partner API key for optional signature verification
        schema:
          type: string
      - name: X-Trillboards-Timestamp
        in: header
        description: Unix timestamp for signature verification
        schema:
          type: integer
      - name: X-Trillboards-Signature
        in: header
        description: HMAC signature for optional verification
        schema:
          type: string
      - name: adid
        in: query
        required: true
        description: Advertisement ID
        schema:
          type: string
      - name: impid
        in: query
        required: true
        description: Unique impression ID
        schema:
          type: string
      - name: did
        in: query
        description: Device ID, fingerprint, or external device ID
        schema:
          type: string
      - name: sid
        in: query
        description: Screen ID (optional, for analytics linkage)
        schema:
          type: string
      - name: aid
        in: query
        description: Allocation ID
        schema:
          type: string
      - name: duration
        in: query
        description: View duration in seconds
        schema:
          type: integer
      - name: completed
        in: query
        description: Whether ad was fully viewed
        schema:
          type: boolean
      - name: display_mode
        in: query
        description: Display mode context (fullscreen, l-bar, pip)
        schema:
          type: string
          enum:
          - fullscreen
          - l-bar
          - pip
      - name: display_area_ratio
        in: query
        description: Screen area ratio used by ad (0.0 to 1.0)
        schema:
          type: number
      - name: lbar_size
        in: query
        description: L-bar size percentage (0-100)
        schema:
          type: number
      - name: lbar_position
        in: query
        description: L-bar position
        schema:
          type: string
          enum:
          - bottom
          - right
      - name: lbar_slot_index
        in: query
        description: L-bar slot index (0-based)
        schema:
          type: integer
      - name: lbar_slot_count
        in: query
        description: Total L-bar slots in rotation
        schema:
          type: integer
      - name: sig
        in: query
        description: HMAC signature (optional, for signed impressions)
        schema:
          type: string
      - name: sig_ts
        in: query
        description: Signature timestamp in unix seconds
        schema:
          type: integer
      responses:
        '200':
          description: Impression recorded
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  duplicate:
                    type: boolean
    post:
      tags:
      - Impressions
      summary: Record impression (POST)
      operationId: recordImpressionPost
      parameters:
      - name: X-Trillboards-API-Key
        in: header
        description: Partner API key for optional signature verification
        schema:
          type: string
      - name: X-Trillboards-Timestamp
        in: header
        description: Unix timestamp for signature verification
        schema:
          type: integer
      - name: X-Trillboards-Signature
        in: header
        description: HMAC signature for optional verification
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - adid
              - impid
              properties:
                adid:
                  type: string
                impid:
                  type: string
                did:
                  type: string
                sid:
                  type: string
                aid:
                  type: string
                duration:
                  type: integer
                completed:
                  type: boolean
                display_mode:
                  type: string
                  enum:
                  - fullscreen
                  - l-bar
                  - pip
                display_area_ratio:
                  type: number
                lbar_size:
                  type: number
                lbar_position:
                  type: string
                  enum:
                  - bottom
                  - right
                lbar_slot_index:
                  type: integer
                lbar_slot_count:
                  type: integer
                sig:
                  type: string
                sig_ts:
                  type: integer
      responses:
        '200':
          description: Impression recorded
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  duplicate:
                    type: boolean
  /openrtb/v1/complete:
    post:
      tags:
      - Impressions
      summary: Record ad completion (custom players)
      description: 'Report that an ad played to completion. Designed for **custom player integrations**

        that don''t use the IMA SDK (which auto-fires VAST tracking URLs).


        This writes a `complete` event to the event tracking pipeline, which the daily

        earnings aggregation cron picks up to calculate revenue. Without this call,

        impressions are recorded but earnings won''t be attributed.


        ### When to use this endpoint


        Use this if your integration:

        - Calls `/openrtb/v1/impression` and `/openrtb/v1/heartbeat` directly

        - Does NOT use the IMA SDK or Google DAI

        - Plays VAST ads to completion but doesn''t fire the VAST `` URL


        ### Deduplication


        Events are deduplicated by `(impressionId, screenId)` within a 60-second window.

        If no `impressionId` is provided, one is generated automatically.'
      operationId: recordAdComplete
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - screenId
              - adId
              properties:
                screenId:
                  type: string
                  description: Screen mongo ID
                  example: 69a076ad2ccbba67a5ba1c1e
                adId:
                  type: string
                  description: Advertisement or creative ID (from VAST response)
                  example: ima_24idno
                impressionId:
                  type: string
                  description: Impression ID for correlation with `/impression` call. Auto-generated if omitted.
                  example: imp_abc123
                duration:
                  type: number
                  description: Ad duration in seconds
                  example: 30
                deviceId:
                  type: string
                  description: Device identifier (falls back to request IP if omitted)
      responses:
        '200':
          description: Completion tracked
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Ad completion tracked successfully
                  impressionId:
                    type: string
                    description: The impression ID used (provided or auto-generated)
                    example: imp_abc123
              examples:
                success:
                  value:
                    success: true
                    message: Ad completion tracked successfully
                    impressionId: imp_abc123
                deduplicated:
                  value:
                    success: true
                    message: Complete event deduplicated
                    givt:
                      flags:
                      - duplicate
        '400':
          description: Missing required parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required parameters: screenId and adId are required'
        '500':
          $ref: '#/components/responses/InternalError'
  /impressions/batch:
    post:
      tags:
      - Impressions
      summary: Batch record impressions
      description: 'Record multiple impressions at once. Useful for syncing offline impressions.


        Maximum 100 impressions per request.

        Signed impressions can include `sig` and `sig_ts` per impression (see `/impression` signature format).'
      operationId: recordImpressionsBatch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - impressions
              properties:
                impressions:
                  type: array
                  maxItems: 100
                  items:
                    type: object
                    required:
                    - adid
                    - impid
                    properties:
                      adid:
                        type: string
                      impid:
                        type: string
                      did:
                        type: string
                      sid:
                        type: string
                      aid:
                        type: string
                      duration:
                        type: integer
                      completed:
                        type: boolean
                      display_mode:
                        type: string
                        enum:
                        - fullscreen
                        - l-bar
                        - pip
                      display_area_ratio:
                        type: number
                      lbar_size:
                        type: number
                      lbar_position:
                        type: string
                        enum:
                        - bottom
                        - right
                      lbar_slot_index:
                        type: integer
                      lbar_slot_count:
                        type: integer
                      sig:
                        type: string
                      sig_ts:
                        type: integer
                      timestamp:
                        type: string
                        format: date-time
                      device_fingerprint:
                        type: string
      responses:
        '200':
          description: Batch processed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      recorded:
                        type: integer
                      failed:
                        type: integer
                      skipped:
                        type: integer
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            impid:
                              type: string
                            error:
                              type: string
components:
  responses:
    InternalError:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
  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.

        '