PinBridge Analytics API

The Analytics API from PinBridge — 3 operation(s) for analytics.

GitHub OpenAPI

Operations 3

GET /v1/analytics/overview Get Analytics Overview #
GET /v1/analytics/pins List Pin Analytics #
POST /v1/analytics/accounts/{account_id}/collect Collect Account Analytics #

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/pinbridge-io:pinbridge-io-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

pinbridge-io-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PinBridge Analytics API
  description: 'Developer-first Pinterest publishing engine with queues, pacing, and webhooks


    ## Error contract


    Every non-2xx JSON response carries a top-level `error` envelope next to the

    legacy `detail` field:


    ```json

    {

    "detail": "...",

    "error": {

    "code": "board_access_denied",

    "message": "Pinterest denied access to this board for the connected account.",

    "remediation": "Refresh the board list and choose a board owned by this account.",

    "request_id": "8c2c1f0e-...",

    "board_id": "1234567890",

    "account_id": "..."

    }

    }

    ```


    `error.code` is stable and safe to branch on; `error.message` is for humans;

    `error.remediation` says what to change; `error.request_id` matches the

    `X-Request-ID` response header for support. Extra keys give machine-readable

    context (`board_id`, `account_id`, `retry_after_seconds`, `required_scope`, ...).

    Validation failures use `code: validation_error` and list field errors under

    `error.errors`.


    ## Publish headroom headers


    Publish-shaped responses (`POST /v1/pins`, `/v1/pins/batch`, `/v1/pins/validate`,

    `/v1/pins/{id}/retry`) carry the remaining monthly quota and Pinterest rate

    headroom: `X-PinBridge-Quota-Limit`, `X-PinBridge-Quota-Used`,

    `X-PinBridge-Quota-Remaining`, `X-Pinterest-RateLimit-Remaining`,

    `X-Pinterest-RateLimit-Capacity`, `X-Pinterest-RateLimit-Refill-Per-Second`.

    On a batch the rate headers describe the first pin''s account and are omitted

    when the batch spans several accounts.


    ## API key scopes


    API keys carry `read`, `write` and `destructive` scopes and an optional Pinterest

    account allow-list. A request outside the key''s grants fails with

    `403 insufficient_scope` or `403 account_not_permitted`.'
  version: 1.93.1
tags:
- name: Analytics
paths:
  /v1/analytics/overview:
    get:
      tags:
      - Analytics
      summary: Get Analytics Overview
      description: 'Account-level Pinterest metrics summed across connected accounts, from stored history.


        Returns totals, the same-length previous period''s totals (for deltas), a daily

        series, and each account''s collection status. Ranges can span up to 366 days

        and reach back past Pinterest''s own 90-day window. Never calls Pinterest.'
      operationId: get_analytics_overview_v1_analytics_overview_get
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          description: Inclusive start (YYYY-MM-DD); default 30 days ago
          title: Start Date
        description: Inclusive start (YYYY-MM-DD); default 30 days ago
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          description: Inclusive end (YYYY-MM-DD); default today
          title: End Date
        description: Inclusive end (YYYY-MM-DD); default today
      - name: account_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          description: Limit to one Pinterest account; default every connected account
          title: Account Id
        description: Limit to one Pinterest account; default every connected account
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsOverviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/HTTPValidationError'
                - $ref: '#/components/schemas/ErrorResponse'
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
  /v1/analytics/pins:
    get:
      tags:
      - Analytics
      summary: List Pin Analytics
      description: 'Published pins ranked by a metric summed over the range, from stored history.


        Only pins with at least one non-zero stored day in the range are listed.

        Never calls Pinterest.'
      operationId: list_pin_analytics_v1_analytics_pins_get
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          description: Inclusive start (YYYY-MM-DD); default 30 days ago
          title: Start Date
        description: Inclusive start (YYYY-MM-DD); default 30 days ago
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          description: Inclusive end (YYYY-MM-DD); default today
          title: End Date
        description: Inclusive end (YYYY-MM-DD); default today
      - name: account_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          description: Limit to one Pinterest account; default every connected account
          title: Account Id
        description: Limit to one Pinterest account; default every connected account
      - name: sort_by
        in: query
        required: false
        schema:
          enum:
          - impression
          - save
          - pin_click
          - outbound_click
          - total_comments
          - total_reactions
          type: string
          description: Metric to rank pins by
          default: impression
          title: Sort By
        description: Metric to rank pins by
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 10
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Offset
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopPinsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/HTTPValidationError'
                - $ref: '#/components/schemas/ErrorResponse'
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
  /v1/analytics/accounts/{account_id}/collect:
    post:
      tags:
      - Analytics
      summary: Collect Account Analytics
      description: 'Collect an account''s analytics now instead of waiting for the nightly run.


        This is a user action, so PinBridge refreshes the account''s Pinterest token

        if needed (the nightly run never does) and queues a sync. A paused account

        resumes, and any missed days (up to 90) are filled in. Limited to once per

        account every 15 minutes.'
      operationId: collect_account_analytics_v1_analytics_accounts__account_id__collect_post
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsCollectResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/HTTPValidationError'
                - $ref: '#/components/schemas/ErrorResponse'
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
components:
  schemas:
    AnalyticsCollectResponse:
      properties:
        account_id:
          type: string
          format: uuid
          title: Account Id
        status:
          type: string
          const: queued
          title: Status
        message:
          type: string
          title: Message
      type: object
      required:
      - account_id
      - status
      - message
      title: AnalyticsCollectResponse
      description: Result of asking PinBridge to collect an account's analytics now.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnalyticsOverviewResponse:
      properties:
        start_date:
          type: string
          format: date
          title: Start Date
        end_date:
          type: string
          format: date
          title: End Date
        previous_start_date:
          type: string
          format: date
          title: Previous Start Date
        previous_end_date:
          type: string
          format: date
          title: Previous End Date
        metrics:
          items:
            type: string
          type: array
          title: Metrics
        totals:
          additionalProperties:
            anyOf:
            - type: number
            - type: integer
            - type: 'null'
          type: object
          title: Totals
        previous_totals:
          anyOf:
          - additionalProperties:
              anyOf:
              - type: number
              - type: integer
              - type: 'null'
            type: object
          - type: 'null'
          title: Previous Totals
          description: Totals for the same-length period just before start_date; null when PinBridge's history does not reach back that far
        daily:
          items:
            $ref: '#/components/schemas/AnalyticsDailyMetric'
          type: array
          title: Daily
        history_start:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: History Start
          description: Earliest stored day across the selected accounts
        data_as_of:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Data As Of
          description: Most recent successful collection across the selected accounts
        accounts:
          items:
            $ref: '#/components/schemas/AnalyticsAccountCollection'
          type: array
          title: Accounts
      type: object
      required:
      - start_date
      - end_date
      - previous_start_date
      - previous_end_date
      - metrics
      - totals
      - daily
      - accounts
      title: AnalyticsOverviewResponse
      description: Account-level metrics summed across the selected accounts, from stored history.
    AnalyticsDailyMetric:
      properties:
        date:
          type: string
          title: Date
        data_status:
          anyOf:
          - type: string
          - type: 'null'
          title: Data Status
        metrics:
          additionalProperties:
            anyOf:
            - type: number
            - type: integer
            - type: 'null'
          type: object
          title: Metrics
      type: object
      required:
      - date
      - metrics
      title: AnalyticsDailyMetric
      description: Metrics for one day.
    AnalyticsAccountCollection:
      properties:
        account_id:
          type: string
          format: uuid
          title: Account Id
        username:
          anyOf:
          - type: string
          - type: 'null'
          title: Username
        display_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Display Name
        status:
          type: string
          enum:
          - collecting
          - in_progress
          - paused
          - reconnect_required
          - retrying
          - pending
          - simulated
          title: Status
          description: 'collecting (updated nightly), in_progress (a collection queued by a connect, reconnect or collect-now has not finished; shown for up to 15 minutes, or up to 60 while its run is still going), paused (the account has not been used recently, so its token is not refreshed; collect now or publish to resume), reconnect_required, retrying (last run failed), pending (first run not done), or simulated (sandbox). New values may be added (in_progress was added in API 1.40): clients must accept a status they do not know, for example by showing `message`.'
        message:
          type: string
          title: Message
          description: A sentence describing the status, suitable for showing to people
        history_start:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: History Start
          description: Earliest day PinBridge has stored for this account
        data_as_of:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Data As Of
          description: When PinBridge last fetched this account's analytics from Pinterest
        last_sync_status:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Sync Status
          description: Raw outcome of the last sync run
        last_error_code:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Error Code
      type: object
      required:
      - account_id
      - status
      - message
      title: AnalyticsAccountCollection
      description: How PinBridge's analytics collection is doing for one connected account.
    PinAnalyticsSummary:
      properties:
        pin_id:
          type: string
          format: uuid
          title: Pin Id
        pinterest_pin_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Pinterest Pin Id
        account_id:
          type: string
          format: uuid
          title: Account Id
        title:
          type: string
          title: Title
        thumbnail_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Thumbnail Url
        link_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Link Url
        media_type:
          type: string
          title: Media Type
        published_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Published At
        totals:
          additionalProperties:
            anyOf:
            - type: number
            - type: integer
            - type: 'null'
          type: object
          title: Totals
      type: object
      required:
      - pin_id
      - pinterest_pin_id
      - account_id
      - title
      - thumbnail_url
      - link_url
      - media_type
      - published_at
      - totals
      title: PinAnalyticsSummary
      description: One pin's metrics summed over the requested range.
    ErrorResponse:
      type: object
      title: ErrorResponse
      properties:
        detail:
          description: Legacy detail payload (string, object, or list).
        error:
          $ref: '#/components/schemas/ErrorEnvelope'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ErrorEnvelope:
      type: object
      title: ErrorEnvelope
      description: Documented error contract carried by every non-2xx response.
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
          description: Human-readable explanation.
        remediation:
          type: string
          nullable: true
          description: What to change to make the request succeed.
        request_id:
          type: string
          nullable: true
          description: Correlates with the X-Request-ID header; quote it to support.
      additionalProperties: true
    TopPinsResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PinAnalyticsSummary'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        sort_by:
          type: string
          title: Sort By
        start_date:
          type: string
          format: date
          title: Start Date
        end_date:
          type: string
          format: date
          title: End Date
      type: object
      required:
      - items
      - total
      - limit
      - offset
      - sort_by
      - start_date
      - end_date
      title: TopPinsResponse
      description: Pins ranked by a stored metric over the requested range.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key created via `/v1/api-keys`.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: 'Auth header: `Authorization: Bearer <jwt-or-api-key>`.'