Trillboards Batch Tracking API

High-volume impression tracking with cryptographic proof generation. Designed for partners with 10,000+ screens who need efficient batch reporting. Each impression receives an Ed25519 signature for third-party verification.

GitHub OpenAPI

Operations 2

POST /tracking/batch Record batch impressions with proof generation #
GET /tracking/.well-known/public-key Get public key for proof verification #

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-batch-tracking-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-batch-tracking-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trillboards Partner Batch Tracking 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: Batch Tracking
  description: 'High-volume impression tracking with cryptographic proof generation.


    Designed for partners with 10,000+ screens who need efficient batch reporting.

    Each impression receives an Ed25519 signature for third-party verification.'
paths:
  /tracking/batch:
    post:
      tags:
      - Batch Tracking
      summary: Record batch impressions with proof generation
      description: 'High-volume endpoint for reporting multiple impressions in a single request.


        **Features:**

        - Process up to 100 impressions per batch

        - Ed25519 cryptographic proof for each impression

        - Duplicate detection (impressions with same impression_id + ad_id are ignored)

        - Optional audience metrics (face count, attention)


        **Batching Strategy:**

        - Buffer impressions client-side

        - Flush every 1-5 minutes or when buffer reaches 100

        - Handle failures with local retry queue


        **Proof Verification:**

        Each proof can be independently verified using the public key from `/tracking/.well-known/public-key`.'
      operationId: recordTrackingBatch
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - impressions
              properties:
                impressions:
                  type: array
                  maxItems: 100
                  items:
                    type: object
                    required:
                    - device_id
                    - ad_id
                    properties:
                      device_id:
                        type: string
                        description: Partner's device identifier
                        example: PARTNER-DEVICE-001
                      ad_id:
                        type: string
                        description: Ad identifier from VAST response
                        example: ima_1706745600_abc123
                      event:
                        type: string
                        enum:
                        - start
                        - complete
                        - error
                        - firstQuartile
                        - midpoint
                        - thirdQuartile
                        default: complete
                        description: VAST event type
                      timestamp:
                        type: string
                        format: date-time
                        description: When the event occurred (defaults to now)
                        example: '2026-01-31T10:00:00Z'
                      duration_ms:
                        type: integer
                        description: Video duration played in milliseconds
                        example: 15000
                      impression_id:
                        type: string
                        description: Optional client-generated ID (auto-generated if not provided)
                        example: imp_client_abc123
                      audience:
                        type: object
                        description: Optional audience metrics
                        properties:
                          face_count:
                            type: integer
                            description: Number of viewers detected
                            example: 3
                          attention:
                            type: number
                            format: float
                            minimum: 0
                            maximum: 1
                            description: Attention score (0-1)
                            example: 0.87
                          dwell_time_ms:
                            type: integer
                            description: How long viewers were present
                            example: 45000
            example:
              impressions:
              - device_id: PARTNER-DEVICE-001
                ad_id: ima_1706745600_abc123
                event: complete
                timestamp: '2026-01-31T10:00:00Z'
                duration_ms: 15000
                audience:
                  face_count: 3
                  attention: 0.87
              - device_id: PARTNER-DEVICE-002
                ad_id: ima_1706745600_def456
                event: complete
                timestamp: '2026-01-31T10:00:05Z'
                duration_ms: 30000
      responses:
        '200':
          description: Batch processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      processed:
                        type: integer
                        description: Number of impressions successfully recorded
                        example: 100
                      failed:
                        type: integer
                        description: Number of impressions that failed validation
                        example: 0
                      duplicates:
                        type: integer
                        description: Number of duplicate impressions skipped
                        example: 0
                      proofs:
                        type: array
                        description: Cryptographic proofs for each processed impression
                        items:
                          type: object
                          properties:
                            impression_id:
                              type: string
                              example: imp_1706745600_a1b2c3
                            signature:
                              type: string
                              description: Ed25519 signature (or SHA256 fallback)
                              example: ed25519=7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d...
                            public_key_id:
                              type: string
                              example: pk_v2_001
                      errors:
                        type: array
                        description: Details of failed impressions (max 10 shown)
                        items:
                          type: object
                          properties:
                            impression_id:
                              type: string
                            error:
                              type: string
                      processing_time_ms:
                        type: integer
                        description: Time to process the batch
                        example: 45
              example:
                success: true
                data:
                  processed: 2
                  failed: 0
                  duplicates: 0
                  proofs:
                  - impression_id: imp_1706745600_a1b2c3
                    signature: ed25519=7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b
                    public_key_id: pk_v2_001
                  - impression_id: imp_1706745605_d4e5f6
                    signature: ed25519=8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c
                    public_key_id: pk_v2_001
                  errors: []
                  processing_time_ms: 45
        '400':
          description: Invalid request (empty array, too many impressions, etc.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                empty_array:
                  value:
                    success: false
                    message: impressions array cannot be empty
                too_many:
                  value:
                    success: false
                    message: Maximum 100 impressions per batch
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /tracking/.well-known/public-key:
    get:
      tags:
      - Batch Tracking
      summary: Get public key for proof verification
      description: 'Returns the Ed25519 public key used to sign impression proofs.


        **No authentication required.** This is a public endpoint to enable third-party verification.


        **Verification Process:**

        1. Fetch public key from this endpoint

        2. Reconstruct canonical payload: `v2.{timestamp}.{adId}.{impressionId}.{screenId}.{deviceId}`

        3. Verify Ed25519 signature using the public key


        See `/tracking/batch` response for signature format.'
      operationId: getTrackingPublicKey
      responses:
        '200':
          description: Public key information
          headers:
            Cache-Control:
              description: Caching directive (24 hours)
              schema:
                type: string
                example: public, max-age=86400
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      publicKey:
                        type:
                        - string
                        - 'null'
                        description: Hex-encoded Ed25519 public key (null if using HMAC fallback)
                        example: 7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b
                      algorithm:
                        type: string
                        enum:
                        - ed25519
                        - sha256
                        description: Signature algorithm (ed25519 for public key, sha256 for HMAC fallback)
                        example: ed25519
                      version:
                        type: string
                        example: v2
                      keyId:
                        type: string
                        description: Key identifier for rotation support
                        example: pk_v2_001
                      verificationUrl:
                        type: string
                        example: https://api.trillboards.com/v1/partner/tracking/verify
                      documentation:
                        type: string
                        example: https://api.trillboards.com/docs/proof-of-play
              example:
                success: true
                data:
                  publicKey: 7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b
                  algorithm: ed25519
                  version: v2
                  keyId: pk_v2_001
                  verificationUrl: https://api.trillboards.com/v1/partner/tracking/verify
                  documentation: https://api.trillboards.com/docs/proof-of-play
components:
  responses:
    TooManyRequests:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          description: Seconds to wait before retrying
          schema:
            type: integer
            example: 60
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                example: API rate limit exceeded. Maximum 200 requests per minute.
              retryAfter:
                type: integer
                example: 60
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: API key required
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        error:
          type: string
  headers:
    X-RateLimit-Remaining:
      description: The number of requests remaining in the current time window
      schema:
        type: integer
        example: 199
    X-RateLimit-Limit:
      description: The maximum number of requests allowed in the current time window
      schema:
        type: integer
        example: 200
    X-RateLimit-Reset:
      description: Unix timestamp when the rate limit window resets
      schema:
        type: integer
        example: 1704067260
  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.

        '