> ## 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.

# Ad campaign overview

> Ad campaign overview with 30-day rollup metrics. Uses pre-computed columns,
not a date range. Spend is converted from micros to dollars.




## OpenAPI

````yaml /openapi.yaml get /metrics/ads/campaigns
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:
  /metrics/ads/campaigns:
    get:
      tags:
        - Metrics
      summary: Ad campaign overview
      description: >
        Ad campaign overview with 30-day rollup metrics. Uses pre-computed
        columns,

        not a date range. Spend is converted from micros to dollars.
      operationId: getAdCampaignOverview
      parameters:
        - $ref: '#/components/parameters/WebsiteId'
        - name: platform
          in: query
          description: Filter by ad platform
          schema:
            type: string
            enum:
              - google
              - meta
        - name: status
          in: query
          description: Filter by campaign status
          schema:
            type: string
      responses:
        '200':
          description: Campaign overview
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/AdCampaignOverview'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    WebsiteId:
      name: website_id
      in: query
      description: Website ID. Auto-resolved if key has single website scope.
      schema:
        type: string
        format: uuid
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          const: true
    AdCampaignOverview:
      type: object
      properties:
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/AdCampaignOverviewItem'
        totals:
          type: object
          properties:
            totalCampaigns:
              type: integer
            totalImpressions:
              type: integer
            totalClicks:
              type: integer
            totalSpend:
              type: number
            totalConversions:
              type: integer
    AdCampaignOverviewItem:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        platform:
          type: string
        status:
          type: string
          nullable: true
        objective:
          type: string
          nullable: true
        impressions30d:
          type: integer
        clicks30d:
          type: integer
        spend30d:
          type: number
          description: Dollars (converted from micros)
        conversions30d:
          type: integer
        reach30d:
          type: integer
        currency:
          type: string
    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...`)

````