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

# Update Campaign

> Update a campaign's fields.



## OpenAPI

````yaml put /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}:
    put:
      tags:
        - Campaigns
      summary: Update Campaign
      description: Update a campaign's fields.
      operationId: update_campaign_opportunity_campaign__campaign_id__put
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CampaignUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        platformId:
          anyOf:
            - type: string
            - type: 'null'
          title: Platformid
        isActive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isactive
        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
      type: object
      title: CampaignUpdate
    CampaignSummary:
      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
      type: object
      required:
        - id
        - name
        - locationId
      title: CampaignSummary
    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
    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

````