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

# Sync Campaign Delivery



## OpenAPI

````yaml post /opportunity/analytics/campaign/{campaign_id}/delivery/sync
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/{campaign_id}/delivery/sync:
    post:
      tags:
        - Growth Analytics
      summary: Sync Campaign Delivery
      operationId: >-
        sync_campaign_delivery_opportunity_analytics_campaign__campaign_id__delivery_sync_post
      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
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            title: Campaign Id
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
            description: Inclusive start date (YYYY-MM-DD)
            title: Start Date
          description: Inclusive start date (YYYY-MM-DD)
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
            description: Inclusive end date (YYYY-MM-DD)
            title: End Date
          description: Inclusive end date (YYYY-MM-DD)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignPerformanceSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CampaignPerformanceSummary:
      properties:
        dataStatus:
          $ref: '#/components/schemas/CampaignDeliveryStatus'
        provider:
          anyOf:
            - $ref: '#/components/schemas/PlatformType'
            - type: 'null'
        providerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Providername
        metricCoverage:
          items:
            type: string
          type: array
          title: Metriccoverage
        lastAttemptedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Lastattemptedat
        lastSyncedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Lastsyncedat
        coverageStart:
          anyOf:
            - type: string
            - type: 'null'
          title: Coveragestart
        coverageEnd:
          anyOf:
            - type: string
            - type: 'null'
          title: Coverageend
        lastError:
          anyOf:
            - type: string
            - type: 'null'
          title: Lasterror
        providerUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Providerurl
        isStale:
          type: boolean
          title: Isstale
          default: false
        dateRangeStart:
          type: string
          title: Daterangestart
        dateRangeEnd:
          type: string
          title: Daterangeend
        totalImpressions:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalimpressions
        totalClicks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalclicks
        totalInteractions:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalinteractions
        totalReach:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalreach
        frequency:
          anyOf:
            - type: number
            - type: 'null'
          title: Frequency
        totalSpendCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalspendcents
        totalConversions:
          anyOf:
            - type: number
            - type: 'null'
          title: Totalconversions
        totalLeadsGenerated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalleadsgenerated
        totalVideoViews:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalvideoviews
        ctr:
          anyOf:
            - type: number
            - type: 'null'
          title: Ctr
        cpcCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cpccents
        cpmCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cpmcents
        daily:
          items:
            $ref: '#/components/schemas/CampaignMetricSnapshotSummary'
          type: array
          title: Daily
      type: object
      required:
        - dataStatus
        - dateRangeStart
        - dateRangeEnd
      title: CampaignPerformanceSummary
      description: Provider delivery plus Decoda spend for a campaign.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CampaignDeliveryStatus:
      type: string
      enum:
        - AVAILABLE
        - LIMITED
        - UNAVAILABLE
        - NOT_VALIDATED
      title: CampaignDeliveryStatus
      description: Provider-delivery availability for one linked campaign.
    PlatformType:
      type: string
      enum:
        - GOOGLE_ADS
        - META_ADS
        - WEB_FORM
        - CUSTOM
      title: PlatformType
    CampaignMetricSnapshotSummary:
      properties:
        id:
          type: string
          title: Id
        campaignId:
          type: string
          title: Campaignid
        date:
          type: string
          title: Date
        impressions:
          anyOf:
            - type: integer
            - type: 'null'
          title: Impressions
        clicks:
          anyOf:
            - type: integer
            - type: 'null'
          title: Clicks
        interactions:
          anyOf:
            - type: integer
            - type: 'null'
          title: Interactions
        reach:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reach
        frequency:
          anyOf:
            - type: number
            - type: 'null'
          title: Frequency
        spendCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Spendcents
        conversions:
          anyOf:
            - type: number
            - type: 'null'
          title: Conversions
        leadsGenerated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Leadsgenerated
        videoViews:
          anyOf:
            - type: integer
            - type: 'null'
          title: Videoviews
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        metricCoverage:
          items:
            type: string
          type: array
          title: Metriccoverage
      type: object
      required:
        - id
        - campaignId
        - date
      title: CampaignMetricSnapshotSummary
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````