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

# Update a budget alert



## OpenAPI

````yaml /api-reference/openapi.json put /alerts-v2/budgetAlerts/{budgetAlertId}
openapi: 3.0.0
info:
  title: Costory
  version: '1.0'
  description: API Documentation
servers:
  - url: ''
    description: Production server
security: []
paths:
  /alerts-v2/budgetAlerts/{budgetAlertId}:
    put:
      tags:
        - Alerts V2
      summary: Update a budget alert
      operationId: updateBudgetAlertV2
      parameters:
        - schema:
            type: string
          required: true
          name: budgetAlertId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                parentBudgetId:
                  type: string
                conditionType:
                  type: string
                  enum:
                    - ACTUAL_SPEND
                    - FORECASTED_EOM
                  default: ACTUAL_SPEND
                selectedVirtualDimensionValues:
                  type: array
                  items:
                    type: string
                  minItems: 1
                thresholds:
                  type: array
                  items:
                    type: object
                    properties:
                      severityLevel:
                        type: string
                        enum:
                          - INFO
                          - WARNING
                          - RED
                      value:
                        type: number
                        minimum: 0
                        maximum: 100
                    required:
                      - severityLevel
                      - value
                  minItems: 1
                  maxItems: 3
                notification:
                  oneOf:
                    - type: object
                      properties:
                        notificationChannel:
                          type: string
                          enum:
                            - SLACK
                        slackChannelId:
                          type: string
                          minLength: 1
                      required:
                        - notificationChannel
                        - slackChannelId
                    - type: object
                      properties:
                        notificationChannel:
                          type: string
                          enum:
                            - TEAMS
                        teamsChannelId:
                          type: string
                          minLength: 1
                      required:
                        - notificationChannel
                        - teamsChannelId
                    - type: object
                      properties:
                        notificationChannel:
                          type: string
                          enum:
                            - EMAIL
                        emails:
                          type: array
                          items:
                            type: string
                            format: email
                          minItems: 1
                        shouldNotifyLineOwners:
                          type: boolean
                          default: false
                      required:
                        - notificationChannel
                        - emails
              required:
                - name
                - parentBudgetId
                - selectedVirtualDimensionValues
                - thresholds
                - notification
            example:
              name: Platform team monthly budget burn
              parentBudgetId: cm7q2g4w90001w3e8b9x4k2pn
              conditionType: FORECASTED_EOM
              selectedVirtualDimensionValues:
                - Platform
                - Shared infrastructure
              thresholds:
                - severityLevel: RED
                  value: 100
                - severityLevel: WARNING
                  value: 90
                - severityLevel: INFO
                  value: 75
              notification:
                notificationChannel: SLACK
                slackChannelId: C06FINOPS42
      responses:
        '200':
          description: Budget alert updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BudgetAlert'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Budget or alert is not accessible to the caller
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertError'
      security:
        - bearerAuth: []
components:
  schemas:
    BudgetAlert:
      type: object
      properties:
        id:
          type: string
        organizationId:
          type: string
        createdAt:
          type: string
          nullable: true
          format: date-time
        createdById:
          type: string
        archivedAt:
          type: string
          nullable: true
          format: date-time
        snoozedUntil:
          type: string
          nullable: true
          format: date-time
        name:
          type: string
        selectedVirtualDimensionValues:
          type: array
          items:
            type: string
        notificationChannel:
          type: string
          enum:
            - EMAIL
            - SLACK
            - TEAMS
        emails:
          type: array
          items:
            type: string
            format: email
        shouldNotifyLineOwners:
          type: boolean
        slackChannelId:
          type: string
          nullable: true
        teamsChannelId:
          type: string
          nullable: true
        conditionType:
          type: string
          enum:
            - ACTUAL_SPEND
            - FORECASTED_EOM
        parentBudgetId:
          type: string
      required:
        - id
        - organizationId
        - createdAt
        - createdById
        - archivedAt
        - snoozedUntil
        - name
        - selectedVirtualDimensionValues
        - notificationChannel
        - emails
        - shouldNotifyLineOwners
        - slackChannelId
        - teamsChannelId
        - conditionType
        - parentBudgetId
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          description: Unauthorized error message
      required:
        - error
    AlertError:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or Clerk ak_* API key
      description: >-
        Send `Authorization: Bearer <credential>` using either a Clerk session
        JWT or a Clerk API key (`ak_*`). API keys may identify a user (`user_*`)
        or organization (`org_*`) principal and are generated in the Clerk
        Dashboard under API keys.

````