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

# Get Campaign Metrics

> Per-campaign metrics: opportunity count, conversions, CPA, ROI.

Spend and budget come from the Phase-2 source-of-truth tables
(`campaign_spend_ledger`, `campaign_budget`) via
`CampaignMetricsService` — platform-agnostic, so Meta / Google /
TikTok / own-channel spend all roll up the same way.



## OpenAPI

````yaml get /opportunity/analytics/campaign-metrics
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /opportunity/analytics/campaign-metrics:
    get:
      tags:
        - Growth Analytics
      summary: Get Campaign Metrics
      description: |-
        Per-campaign metrics: opportunity count, conversions, CPA, ROI.

        Spend and budget come from the Phase-2 source-of-truth tables
        (`campaign_spend_ledger`, `campaign_budget`) via
        `CampaignMetricsService` — platform-agnostic, so Meta / Google /
        TikTok / own-channel spend all roll up the same way.
      operationId: get_campaign_metrics_opportunity_analytics_campaign_metrics_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignMetricsResponse'
components:
  schemas:
    CampaignMetricsResponse:
      properties:
        campaigns:
          items:
            $ref: '#/components/schemas/CampaignMetric'
          type: array
          title: Campaigns
      type: object
      title: CampaignMetricsResponse
    CampaignMetric:
      properties:
        campaignId:
          type: string
          title: Campaignid
        campaignName:
          type: string
          title: Campaignname
        isActive:
          type: boolean
          title: Isactive
          default: true
        budgetCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Budgetcents
        spendCents:
          type: integer
          title: Spendcents
          default: 0
        opportunityCount:
          type: integer
          title: Opportunitycount
          default: 0
        convertedCount:
          type: integer
          title: Convertedcount
          default: 0
        cpaCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cpacents
        revenueCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Revenuecents
        avgLtvCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Avgltvcents
        roiPercent:
          anyOf:
            - type: number
            - type: 'null'
          title: Roipercent
      type: object
      required:
        - campaignId
        - campaignName
      title: CampaignMetric

````