> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wisepilot.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get runner outcome stats for an agency

> Returns aggregated outcome statistics for all runners under this agency,
including win rate, deploy rate, dismiss rate, and average lift. Stats
are computed weekly and broken down per-website with agency rollups.




## OpenAPI

````yaml /openapi.yaml get /agency/{agencyId}/runner-stats
openapi: 3.1.0
info:
  title: Content Registry Public API
  version: 1.0.0
  description: >
    AI-powered content management platform API. Provides access to content
    assets,

    generation pipelines, performance metrics, intelligence insights, and
    integrations.


    ## Authentication

    All endpoints require a Bearer token in the `Authorization` header:

    ```

    Authorization: Bearer cr_<40-hex-characters>

    ```

    API keys are created via the admin UI at `/integrations/api-keys`.


    ## Scoping

    Most endpoints require a `website_id`. If your API key has a single website
    scope,

    it is auto-resolved. Otherwise, pass `website_id` as a query or body
    parameter.


    Agency-scoped keys can access any website under their agency via the
    `agency_websites` join.


    ## Rate Limiting

    Per-key hourly rate limiting (default 1,000 req/hr). When exceeded, returns
    `429`

    with a `Retry-After: 3600` header.


    ## Response Envelope

    All responses follow this shape:

    ```json

    { "success": true, "data": { ... }, "meta": { "total": 100, "limit": 50,
    "offset": 0 } }

    ```

    or on error:

    ```json

    { "success": false, "error": "message", "code": "ERROR_CODE" }

    ```


    ## MCP Server

    An MCP (Model Context Protocol) server is available at `/api/v1/mcp` using

    Streamable HTTP transport. It exposes the same 40+ tools as the REST API.
  contact:
    name: Content Registry
  license:
    name: Proprietary
servers:
  - url: https://ai.wisepilot.app/api/v1
    description: Production (WisePilot)
  - url: /api/v1
    description: Relative (same origin)
security:
  - BearerAuth: []
tags:
  - name: Scoping
    description: Website discovery and scope resolution
  - name: Content
    description: Content library — assets, entities, opportunities, search
  - name: Generation
    description: AI-powered content and image generation
  - name: Metrics
    description: Performance analytics across channels
  - name: Intelligence
    description: Revenue intelligence, insights, experiments, learnings
  - name: Integrations
    description: WordPress, GHL, and ad platform connections
  - name: Slack
    description: Slack bot message logging for agency panel
  - name: MCP
    description: Model Context Protocol server endpoint
  - name: Runners
    description: Autonomous skill execution — trigger runs, check status
  - name: Brand
    description: >-
      Visual identity — design tokens, color palettes, image styles, brand
      subjects
  - name: Content Listeners
    description: >-
      External source subscriptions — monitor Reddit, YouTube, RSS, and other
      channels for content opportunities
  - name: Inbox
    description: >-
      Unified action inbox — merged work items and opportunities with AI
      dispatch
  - name: Finance
    description: >-
      Business entity financials — revenue records, cost tracking, MRR, AI
      costs, invoices
  - name: GSC
    description: Google Search Console page and query performance
  - name: GA4
    description: Google Analytics 4 page metrics and tracking events
  - name: Google Ads
    description: Google Ads campaign, keyword, and search term performance
  - name: Meta Ads
    description: Meta Ads campaign performance
  - name: GBP
    description: Google Business Profile — performance, reviews, services, visibility
  - name: Platform Push
    description: Unified multi-platform publish and update actions
  - name: Lifecycle
    description: Asset lifecycle status, advancement, and publish readiness
  - name: Social
    description: Social post creation and scheduling
  - name: Skills
    description: AI skill library — browse and execute skills
  - name: SEO Research
    description: Ahrefs-powered keyword research and SERP analysis
  - name: GHL
    description: GoHighLevel contacts, agents, and knowledge bases
  - name: Chat
    description: Workspace chat sessions and conversation history
  - name: Recommend
    description: AI-prioritized recommended next actions
  - name: Sync
    description: Force refresh of integration data
  - name: Export
    description: Bulk data export — brand knowledge packs
  - name: Entities
    description: Messaging entities — hooks, angles, offers, stories
paths:
  /agency/{agencyId}/runner-stats:
    get:
      tags:
        - Runners
      summary: Get runner outcome stats for an agency
      description: |
        Returns aggregated outcome statistics for all runners under this agency,
        including win rate, deploy rate, dismiss rate, and average lift. Stats
        are computed weekly and broken down per-website with agency rollups.
      operationId: getRunnerOutcomeStats
      parameters:
        - name: agencyId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: period
          in: query
          schema:
            type: string
            enum:
              - 30d
              - 90d
            default: 30d
        - name: runner_name
          in: query
          schema:
            type: string
          description: Filter to a specific runner by name
      responses:
        '200':
          description: Runner outcome stats
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          rollups:
                            type: array
                            items:
                              $ref: '#/components/schemas/RunnerOutcomeStat'
                          perWebsite:
                            type: array
                            items:
                              $ref: '#/components/schemas/RunnerOutcomeStat'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Not a member of this agency
components:
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          const: true
    RunnerOutcomeStat:
      type: object
      description: Aggregated outcome statistics for a runner, per-website or agency rollup
      properties:
        id:
          type: string
          format: uuid
        agencyId:
          type: string
          format: uuid
        runnerName:
          type: string
        skillId:
          type: string
          format: uuid
          nullable: true
        skillVersion:
          type: integer
          nullable: true
        modelId:
          type: string
          nullable: true
        websiteId:
          type: string
          format: uuid
          nullable: true
          description: null for agency rollup rows
        period:
          type: string
          enum:
            - 30d
            - 90d
        proposalsCreated:
          type: integer
        proposalsDeployed:
          type: integer
        proposalsMeasured:
          type: integer
        wins:
          type: integer
        losses:
          type: integer
        inconclusive:
          type: integer
        winRate:
          type: number
          nullable: true
        deployRate:
          type: number
          nullable: true
        avgLift:
          type: number
          nullable: true
        avgEvalScore:
          type: number
          nullable: true
        dismissRate:
          type: number
          nullable: true
        computedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
        code:
          type: string
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error: Invalid API key
            code: INVALID_API_KEY
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key prefixed with `cr_` (e.g. `cr_a1b2c3...`)

````