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

> Update an existing campaign budget's caps, amount, or active state.



## OpenAPI

````yaml put /opportunity/campaign/{campaign_id}/budgets/{budget_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}/budgets/{budget_id}:
    put:
      tags:
        - Campaigns
      summary: Update Campaign Budget
      description: Update an existing campaign budget's caps, amount, or active state.
      operationId: >-
        update_campaign_budget_opportunity_campaign__campaign_id__budgets__budget_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
        - name: budget_id
          in: path
          required: true
          schema:
            type: string
            title: Budget Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignBudgetUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignBudgetSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CampaignBudgetUpdate:
      properties:
        amountCents:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Amountcents
        hardCapCents:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Hardcapcents
        softCapPct:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 1
            - type: 'null'
          title: Softcappct
        alertsAtPct:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Alertsatpct
        isActive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isactive
      type: object
      title: CampaignBudgetUpdate
    CampaignBudgetSummary:
      properties:
        id:
          type: string
          title: Id
        campaignId:
          type: string
          title: Campaignid
        period:
          $ref: '#/components/schemas/BudgetPeriod'
        amountCents:
          type: integer
          title: Amountcents
        hardCapCents:
          type: integer
          title: Hardcapcents
        softCapPct:
          type: integer
          title: Softcappct
          default: 90
        alertsAtPct:
          items:
            type: integer
          type: array
          title: Alertsatpct
        isActive:
          type: boolean
          title: Isactive
          default: true
        spendToDateCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Spendtodatecents
        pctSpent:
          anyOf:
            - type: number
            - type: 'null'
          title: Pctspent
      type: object
      required:
        - id
        - campaignId
        - period
        - amountCents
        - hardCapCents
      title: CampaignBudgetSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BudgetPeriod:
      type: string
      enum:
        - DAILY
        - MONTHLY
        - LIFETIME
      title: BudgetPeriod
      description: Budget rollover window. Lifetime never resets.
    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

````