Trillboards Audience Segments API

Custom audience segment targeting for programmatic campaigns. Create segments based on demographics, venue type, geography, and audience behavior. Match segments to screens and generate targeted VAST tags. **Requires Enterprise tier.**

GitHub OpenAPI

Operations 8

POST /audience/segments Create audience segment #
GET /audience/segments List audience segments #
GET /audience/segments/{segmentId} Get audience segment #
PATCH /audience/segments/{segmentId} Update audience segment #
DELETE /audience/segments/{segmentId} Delete audience segment #
POST /audience/segments/{segmentId}/match Match screens to segment #
POST /audience/segments/{segmentId}/reach Estimate segment reach #
POST /audience/segments/{segmentId}/vast-tag Generate VAST tag for segment #

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-audience-segments-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-audience-segments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trillboards Partner Audience Segments 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: Audience Segments
  description: 'Custom audience segment targeting for programmatic campaigns.


    Create segments based on demographics, venue type, geography, and audience behavior.

    Match segments to screens and generate targeted VAST tags.


    **Requires Enterprise tier.**'
  x-beta: true
paths:
  /audience/segments:
    post:
      tags:
      - Audience Segments
      summary: Create audience segment
      description: 'Creates a custom audience segment based on rules (demographics, venue type, geography, etc.).

        **Requires Enterprise tier.**'
      operationId: createAudienceSegment
      x-beta: true
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - rules
              properties:
                name:
                  type: string
                  description: Segment name
                  example: High-Income Urban Millennials
                description:
                  type: string
                rules:
                  type: array
                  items:
                    type: object
                    required:
                    - field
                    - operator
                    - value
                    properties:
                      field:
                        type: string
                        description: Rule field (e.g., venue_type, country, city, state)
                      operator:
                        type: string
                        description: Comparison operator (e.g., eq, neq, in, gt, lt)
                      value:
                        description: Rule value
      responses:
        '201':
          description: Segment created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceSegment'
        '400':
          description: Validation error (missing name, invalid rules)
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
        '409':
          description: Duplicate segment name
        '429':
          description: Segment limit exceeded
    get:
      tags:
      - Audience Segments
      summary: List audience segments
      description: 'Returns all audience segments for the partner.

        **Requires Enterprise tier.**'
      operationId: listAudienceSegments
      x-beta: true
      security:
      - BearerAuth: []
      responses:
        '200':
          description: Segment list
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AudienceSegment'
                  total_count:
                    type: integer
                  has_more:
                    type: boolean
                  request_id:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
  /audience/segments/{segmentId}:
    get:
      tags:
      - Audience Segments
      summary: Get audience segment
      description: 'Returns a single audience segment by ID.

        **Requires Enterprise tier.**'
      operationId: getAudienceSegment
      x-beta: true
      security:
      - BearerAuth: []
      parameters:
      - name: segmentId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Segment details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceSegment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
        '404':
          description: Segment not found
    patch:
      tags:
      - Audience Segments
      summary: Update audience segment
      description: 'Partially updates an audience segment. All fields are optional.

        **Requires Enterprise tier.**'
      operationId: updateAudienceSegment
      x-beta: true
      security:
      - BearerAuth: []
      parameters:
      - name: segmentId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                      operator:
                        type: string
                      value: {}
                is_active:
                  type: boolean
      responses:
        '200':
          description: Segment updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceSegment'
        '400':
          description: Validation error
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
        '404':
          description: Segment not found
        '409':
          description: Duplicate segment name
    delete:
      tags:
      - Audience Segments
      summary: Delete audience segment
      description: 'Permanently deletes an audience segment.

        **Requires Enterprise tier.**'
      operationId: deleteAudienceSegment
      x-beta: true
      security:
      - BearerAuth: []
      parameters:
      - name: segmentId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Segment deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: audience_segment
                  id:
                    type: string
                  deleted:
                    type: boolean
                    example: true
                  request_id:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
        '404':
          description: Segment not found
  /audience/segments/{segmentId}/match:
    post:
      tags:
      - Audience Segments
      summary: Match screens to segment
      description: 'Finds screens whose audience matches the segment rules.

        **Requires Enterprise tier.**'
      operationId: matchAudienceSegment
      x-beta: true
      security:
      - BearerAuth: []
      parameters:
      - name: segmentId
        in: path
        required: true
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
          maximum: 100
      - name: own_screens_only
        in: query
        schema:
          type: string
          enum:
          - 'true'
          - 'false'
          default: 'false'
        description: Only match screens owned by this partner
      responses:
        '200':
          description: Matching screens
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: audience_segment
                  segment_id:
                    type: string
                  segment_name:
                    type: string
                  matched_count:
                    type: integer
                  own_screens_only:
                    type: boolean
                  matches:
                    type: array
                    items:
                      type: object
                  request_id:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
        '404':
          description: Segment not found
  /audience/segments/{segmentId}/reach:
    post:
      tags:
      - Audience Segments
      summary: Estimate segment reach
      description: 'Estimates the potential reach of a segment including matched screens,

        projected daily impressions, and estimated revenue.

        **Requires Enterprise tier.**'
      operationId: estimateSegmentReach
      x-beta: true
      security:
      - BearerAuth: []
      parameters:
      - name: segmentId
        in: path
        required: true
        schema:
          type: string
      - name: own_screens_only
        in: query
        schema:
          type: string
          enum:
          - 'true'
          - 'false'
          default: 'false'
      responses:
        '200':
          description: Reach estimation
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: segment_reach
                  segment_id:
                    type: string
                  segment_name:
                    type: string
                  matched_screens:
                    type: integer
                  online_screens:
                    type: integer
                  estimated_daily_impressions:
                    type: integer
                  estimated_daily_cpm:
                    type: number
                  estimated_daily_revenue:
                    type: number
                  venue_breakdown:
                    type: object
                    additionalProperties:
                      type: integer
                  country_breakdown:
                    type: object
                    additionalProperties:
                      type: integer
                  has_historical_data:
                    type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
        '404':
          description: Segment not found
  /audience/segments/{segmentId}/vast-tag:
    post:
      tags:
      - Audience Segments
      summary: Generate VAST tag for segment
      description: 'Generates a VAST tag URL targeting screens that match the segment rules.

        **Requires Enterprise tier.**'
      operationId: generateSegmentVastTag
      x-beta: true
      security:
      - BearerAuth: []
      parameters:
      - name: segmentId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - creative_url
              properties:
                creative_url:
                  type: string
                  format: uri
                  description: Video creative URL
                duration:
                  type: integer
                  minimum: 5
                  maximum: 120
                  default: 15
                  description: Video duration in seconds
                click_through:
                  type: string
                  format: uri
                  description: Click-through landing page URL
                own_screens_only:
                  type: boolean
                  default: false
      responses:
        '200':
          description: VAST tag generated
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: segment_vast_tag
                  segment_id:
                    type: string
                  segment_name:
                    type: string
                  vast_tag_url:
                    type: string
                    format: uri
                  targeted_screens:
                    type: integer
                  screen_ids:
                    type: array
                    items:
                      type: string
                  cust_params:
                    type: array
                    items:
                      type: string
                  creative:
                    type: object
                    properties:
                      url:
                        type: string
                      duration:
                        type: integer
                      click_through:
                        type:
                        - string
                        - 'null'
        '400':
          description: Missing creative_url
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: Requires Enterprise tier
        '404':
          description: Segment not found
components:
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            message: API key required
    PaymentRequired:
      description: Free tier exhausted — add a payment method to continue
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    example: Free tier exhausted for data_api. Add a payment method to continue.
                  code:
                    type: string
                    enum:
                    - payment_required
                  type:
                    type: string
                    enum:
                    - billing_error
                  product:
                    type: string
                    description: Product that exhausted its free tier
                    enum:
                    - data_api
                    - proof_of_play
                    - attribution
                    - data_marketplace
                  usage:
                    type: object
                    properties:
                      current:
                        type: integer
                        description: Current usage count this billing period
                        example: 12000
                      free_limit:
                        type: integer
                        description: Free tier limit per month
                        example: 10000
                      exceeded_by:
                        type: integer
                        description: How many units over the free limit
                        example: 2000
                  pricing:
                    type:
                    - object
                    - 'null'
                    description: Graduated pricing tiers for this product
                  billing_setup_url:
                    type: string
                    example: /v1/partner/billing/setup
                  pricing_url:
                    type: string
                    example: /v1/partner/pricing
                  help:
                    type: string
                    example: POST /v1/partner/billing/setup with a Stripe payment method token to enable pay-per-use billing.
              request_id:
                type: string
                example: req_abc123
  schemas:
    AudienceSegment:
      type: object
      properties:
        object:
          type: string
          example: audience_segment
        id:
          type: string
        name:
          type: string
        description:
          type: string
        rules:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              operator:
                type: string
              value: {}
        is_active:
          type: boolean
        last_matched_count:
          type: integer
        last_matched_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        request_id:
          type: string
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        error:
          type: string
  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.

        '