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

> Get a campaign's detail, including its posts and opportunity/conversion counts.



## OpenAPI

````yaml get /opportunity/campaign/{campaign_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /opportunity/campaign/{campaign_id}:
    get:
      tags:
        - Campaigns
      summary: Get Campaign
      description: >-
        Get a campaign's detail, including its posts and opportunity/conversion
        counts.
      operationId: get_campaign_opportunity_campaign__campaign_id__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
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            title: Campaign Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CampaignDetail:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        platformId:
          anyOf:
            - type: string
            - type: 'null'
          title: Platformid
        platformAssetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Platformassetid
        externalCampaignId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalcampaignid
        externalResourceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalresourcename
        externalName:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalname
        externalStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalstatus
        externalCurrency:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalcurrency
        externalDailyBudgetCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Externaldailybudgetcents
        externalLifetimeBudgetCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Externallifetimebudgetcents
        externalLastSeenAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Externallastseenat
        externalLastSyncedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Externallastsyncedat
        externalStaleAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Externalstaleat
        externalSyncError:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalsyncerror
        locationId:
          type: string
          title: Locationid
        isActive:
          type: boolean
          title: Isactive
          default: true
        startDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startdate
        endDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Enddate
        budgetCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Budgetcents
        pipelineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Pipelineid
        webhook:
          anyOf:
            - $ref: '#/components/schemas/CampaignWebhookSummary'
            - type: 'null'
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
        opportunityCount:
          type: integer
          title: Opportunitycount
          default: 0
        convertedCount:
          type: integer
          title: Convertedcount
          default: 0
        posts:
          items:
            $ref: '#/components/schemas/CampaignPostSummary'
          type: array
          title: Posts
        promotions:
          items: {}
          type: array
          title: Promotions
      type: object
      required:
        - id
        - name
        - locationId
      title: CampaignDetail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CampaignWebhookSummary:
      properties:
        webhookKey:
          type: string
          title: Webhookkey
        webhookUrl:
          type: string
          title: Webhookurl
        redirectUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Redirecturl
      type: object
      required:
        - webhookKey
        - webhookUrl
      title: CampaignWebhookSummary
    CampaignPostSummary:
      properties:
        id:
          type: string
          title: Id
        campaignId:
          type: string
          title: Campaignid
        platformId:
          anyOf:
            - type: string
            - type: 'null'
          title: Platformid
        postType:
          $ref: '#/components/schemas/CampaignPostType'
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        caption:
          anyOf:
            - type: string
            - type: 'null'
          title: Caption
        ctaText:
          anyOf:
            - type: string
            - type: 'null'
          title: Ctatext
        ctaUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Ctaurl
        scheduledDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scheduleddate
        publishedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Publisheddate
        externalPostId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalpostid
        externalPostUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalposturl
        status:
          $ref: '#/components/schemas/CampaignPostStatus'
          default: DRAFT
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        creatorId:
          type: string
          title: Creatorid
        creatorName:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorname
        media:
          items:
            $ref: '#/components/schemas/CampaignMediaSummary'
          type: array
          title: Media
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
      type: object
      required:
        - id
        - campaignId
        - postType
        - creatorId
      title: CampaignPostSummary
    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
    CampaignPostType:
      type: string
      enum:
        - SOCIAL_POST
        - AD
        - EMAIL
        - BLOG
        - LANDING_PAGE
      title: CampaignPostType
    CampaignPostStatus:
      type: string
      enum:
        - DRAFT
        - SCHEDULED
        - PUBLISHED
        - PAUSED
        - ARCHIVED
      title: CampaignPostStatus
    CampaignMediaSummary:
      properties:
        id:
          type: string
          title: Id
        postId:
          type: string
          title: Postid
        mediaType:
          $ref: '#/components/schemas/CampaignMediaType'
        gcsPath:
          type: string
          title: Gcspath
        fileName:
          type: string
          title: Filename
        fileSizeBytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Filesizebytes
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
        durationSeconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Durationseconds
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
        thumbnailGcsPath:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnailgcspath
        displayOrder:
          type: integer
          title: Displayorder
          default: 0
        altText:
          anyOf:
            - type: string
            - type: 'null'
          title: Alttext
        signedUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Signedurl
      type: object
      required:
        - id
        - postId
        - mediaType
        - gcsPath
        - fileName
      title: CampaignMediaSummary
    CampaignMediaType:
      type: string
      enum:
        - IMAGE
        - VIDEO
        - DOCUMENT
      title: CampaignMediaType

````