Trillboards Webhooks API

Webhook subscriptions for real-time event notifications

GitHub OpenAPI

Operations 6

POST /webhooks Create webhook subscription #
GET /webhooks List webhooks #
PATCH /webhooks/{webhookId} Update webhook #
DELETE /webhooks/{webhookId} Delete webhook #
POST /webhooks/{webhookId}/test Test webhook #
GET /webhooks/{webhookId}/deliveries Get delivery history #

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-webhooks-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-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trillboards Partner Webhooks 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: Webhooks
  description: Webhook subscriptions for real-time event notifications
paths:
  /webhooks:
    post:
      tags:
      - Webhooks
      summary: Create webhook subscription
      description: 'Subscribe to webhook events. Webhooks deliver real-time notifications

        when events occur on your devices.


        **Available Events:**

        - `device.online` - Device comes online after being offline

        - `device.offline` - Device goes offline (no heartbeat for 5+ minutes)

        - `impression.recorded` - Ad impression recorded on a device

        - `campaign.allocated` - New campaign allocated to a device

        - `payout.processed` - Revenue payout processed

        - `programmatic.ad_started` - Programmatic ad started

        - `programmatic.ad_ended` - Programmatic ad ended

        - `programmatic.no_fill` - Programmatic no-fill response

        - `programmatic.error` - Programmatic error


        **Security:**

        - HTTPS required in production

        - HMAC-SHA256 signature verification

        - Secret shown only once in response - store it securely!


        **Signature Verification:**

        ```

        signature = HMAC-SHA256(webhook_secret, timestamp + "." + JSON.stringify(payload))

        ```

        Verify against `X-Trillboards-Signature` header (prefixed with `sha256=`).'
      operationId: createWebhook
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - url
              - events
              properties:
                url:
                  type: string
                  format: uri
                  description: Webhook endpoint URL (HTTPS required in production)
                  example: https://example.com/webhooks/trillboards
                events:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    enum:
                    - device.online
                    - device.offline
                    - impression.recorded
                    - campaign.allocated
                    - payout.processed
                    - programmatic.ad_started
                    - programmatic.ad_ended
                    - programmatic.no_fill
                    - programmatic.error
                  description: Events to subscribe to
                  example:
                  - device.online
                  - device.offline
                  - impression.recorded
      responses:
        '201':
          description: Webhook created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      webhook_id:
                        type: string
                        example: wh_m4k7x9_a1b2c3d4e5f6
                      url:
                        type: string
                      events:
                        type: array
                        items:
                          type: string
                      secret:
                        type: string
                        description: Webhook signing secret (shown only once!)
                        example: whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
                      status:
                        type: string
                        enum:
                        - active
                        - inactive
              example:
                success: true
                message: Webhook created. Save the secret - it won't be shown again!
                data:
                  webhook_id: wh_m4k7x9_a1b2c3d4e5f6
                  url: https://example.com/webhooks/trillboards
                  events:
                  - device.online
                  - device.offline
                  secret: whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
                  status: active
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    get:
      tags:
      - Webhooks
      summary: List webhooks
      description: Get all webhook subscriptions for your account.
      operationId: listWebhooks
      security:
      - BearerAuth: []
      responses:
        '200':
          description: Webhooks list
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      webhooks:
                        type: array
                        items:
                          $ref: '#/components/schemas/Webhook'
              example:
                success: true
                data:
                  webhooks:
                  - webhook_id: wh_m4k7x9_a1b2c3d4e5f6
                    url: https://example.com/webhooks/trillboards
                    events:
                    - device.online
                    - device.offline
                    status: active
                    success_count: 42
                    failure_count: 2
                    last_triggered_at: '2026-01-01T02:30:00.000Z'
                    created_at: '2025-12-01T00:00:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /webhooks/{webhookId}:
    patch:
      tags:
      - Webhooks
      summary: Update webhook
      description: Update webhook URL, events, or status.
      operationId: updateWebhook
      security:
      - BearerAuth: []
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                events:
                  type: array
                  items:
                    type: string
                    enum:
                    - device.online
                    - device.offline
                    - impression.recorded
                    - campaign.allocated
                    - payout.processed
                    - programmatic.ad_started
                    - programmatic.ad_ended
                    - programmatic.no_fill
                    - programmatic.error
                status:
                  type: string
                  enum:
                  - active
                  - inactive
      responses:
        '200':
          description: Webhook updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    $ref: '#/components/schemas/Webhook'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
      - Webhooks
      summary: Delete webhook
      description: Remove a webhook subscription.
      operationId: deleteWebhook
      security:
      - BearerAuth: []
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Webhook deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    example: Webhook deleted
        '404':
          $ref: '#/components/responses/NotFound'
  /webhooks/{webhookId}/test:
    post:
      tags:
      - Webhooks
      summary: Test webhook
      description: 'Send a test event to verify your webhook endpoint is working.

        The test event uses the `test` event type with a sample payload.'
      operationId: testWebhook
      security:
      - BearerAuth: []
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Test result
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      status:
                        type: integer
                      response_time_ms:
                        type: integer
                      error:
                        type: string
              example:
                success: true
                message: Test webhook sent successfully
                data:
                  status: 200
                  response_time_ms: 142
                  error: null
        '404':
          $ref: '#/components/responses/NotFound'
  /webhooks/{webhookId}/deliveries:
    get:
      tags:
      - Webhooks
      summary: Get delivery history
      description: Get recent webhook delivery attempts for debugging.
      operationId: getWebhookDeliveries
      security:
      - BearerAuth: []
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
          maximum: 100
      responses:
        '200':
          description: Delivery history
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      deliveries:
                        type: array
                        items:
                          $ref: '#/components/schemas/WebhookDelivery'
              example:
                success: true
                data:
                  deliveries:
                  - id: 507f1f77bcf86cd799439011
                    event_type: device.online
                    status: success
                    http_status: 200
                    response_time_ms: 142
                    attempted_at: '2026-01-01T02:30:00.000Z'
                    delivered_at: '2026-01-01T02:30:00.142Z'
                  - id: 507f1f77bcf86cd799439012
                    event_type: impression.recorded
                    status: failed
                    http_status: 500
                    response_time_ms: 5012
                    error_message: Connection timeout
                    attempted_at: '2026-01-01T02:25:00.000Z'
                    retry_count: 2
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        error:
          type: string
    WebhookDelivery:
      type: object
      properties:
        id:
          type: string
          description: Delivery record ID
        event_type:
          type: string
          description: Event that triggered this delivery
        status:
          type: string
          enum:
          - pending
          - success
          - failed
          - retrying
          description: Delivery status
        http_status:
          type: integer
          description: HTTP status code from endpoint
        response_time_ms:
          type: integer
          description: Response time in milliseconds
        error_message:
          type: string
          description: Error message if failed
        retry_count:
          type: integer
          description: Number of retry attempts
        attempted_at:
          type: string
          format: date-time
          description: When delivery was first attempted
        delivered_at:
          type: string
          format: date-time
          description: When delivery succeeded
    Webhook:
      type: object
      properties:
        webhook_id:
          type: string
          description: Unique webhook identifier
          example: wh_m4k7x9_a1b2c3d4e5f6
        url:
          type: string
          format: uri
          description: Webhook endpoint URL
          example: https://example.com/webhooks/trillboards
        events:
          type: array
          items:
            type: string
            enum:
            - device.online
            - device.offline
            - impression.recorded
            - campaign.allocated
            - payout.processed
          description: Subscribed event types
        status:
          type: string
          enum:
          - active
          - inactive
          description: Webhook status
        success_count:
          type: integer
          description: Total successful deliveries
        failure_count:
          type: integer
          description: Total failed deliveries
        last_triggered_at:
          type: string
          format: date-time
          description: Last time webhook was triggered
        created_at:
          type: string
          format: date-time
          description: When webhook was created
  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.

        '