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

# Upsert billing notification config



## OpenAPI

````yaml patch /v2/billing/notifications/config
openapi: 3.0.0
info:
  title: Topograph
  description: The Topograph API
  version: '0.1'
  contact: {}
servers:
  - url: https://api.topograph.co
security:
  - x-api-key: []
tags: []
paths:
  /v2/billing/notifications/config:
    patch:
      tags:
        - Billing Notifications
      summary: Upsert billing notification config
      operationId: BillingNotificationsController_updateConfig_v2
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBillingNotificationConfigDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolvedBillingNotificationConfigDto'
      security:
        - x-api-key: []
components:
  schemas:
    UpdateBillingNotificationConfigDto:
      type: object
      properties:
        lowBalanceEnabled:
          type: boolean
          description: >-
            Master toggle for low-balance notifications. Defaults to false on
            new accounts (strictly opt-in).
          example: true
        lowBalanceEmailEnabled:
          type: boolean
          description: >-
            Route low-balance notifications via email. Applied when
            lowBalanceEnabled is true.
          example: true
        lowBalanceWebhookEnabled:
          type: boolean
          description: >-
            Route low-balance notifications via webhook. Applied when
            lowBalanceEnabled is true.
          example: true
        lowBalanceTiers:
          description: >-
            Ordered list of low-balance tiers. Each tier fires once when the
            account balance drops at or below its `cents` threshold. Tier names
            must be unique.
          minItems: 1
          maxItems: 10
          type: array
          items:
            $ref: '#/components/schemas/LowBalanceTierDto'
        globalHighUsageEnabled:
          type: boolean
          description: >-
            Master toggle for global (account-aggregate) high-usage
            notifications. Defaults to false on new accounts.
          example: false
        globalHighUsageEmailEnabled:
          type: boolean
          description: Route global high-usage notifications via email.
          example: true
        globalHighUsageWebhookEnabled:
          type: boolean
          description: Route global high-usage notifications via webhook.
          example: true
        globalHighUsagePeriodMinutes:
          type: number
          description: >-
            Rolling window, in minutes, used to sum account-aggregate spend when
            evaluating global high-usage tiers. Min 5 (5 minutes), max 43200 (30
            days).
          example: 1440
          minimum: 5
          maximum: 43200
        globalHighUsageTiers:
          description: >-
            Global high-usage tiers. Fires when the sum of spend across ALL
            workspaces (plus the account-wide bucket) over the rolling window
            meets-or-exceeds `cents`.
          minItems: 1
          maxItems: 5
          type: array
          items:
            $ref: '#/components/schemas/HighUsageTierDto'
        highUsageEnabled:
          type: boolean
          description: >-
            Master toggle for per-workspace high-usage notifications. These
            thresholds are applied individually to each workspace; a workspace
            can override them via the workspace-override endpoint.
          example: false
        highUsageEmailEnabled:
          type: boolean
          description: Route per-workspace high-usage notifications via email.
          example: true
        highUsageWebhookEnabled:
          type: boolean
          description: Route per-workspace high-usage notifications via webhook.
          example: true
        highUsagePeriodMinutes:
          type: number
          description: >-
            Rolling window, in minutes, used to sum per-workspace spend when
            evaluating high-usage tiers. Min 5, max 43200.
          example: 1440
          minimum: 5
          maximum: 43200
        highUsageTiers:
          description: >-
            Per-workspace high-usage tiers. Fires when a single workspace's
            spend over the rolling window meets-or-exceeds `cents`.
          minItems: 1
          maxItems: 5
          type: array
          items:
            $ref: '#/components/schemas/HighUsageTierDto'
        autoTopupNotificationsEnabled:
          type: boolean
          description: >-
            Master toggle for auto-topup outcome notifications (succeeded /
            failed). Distinct from Account.autoTopupEnabled, which controls the
            charge itself. Defaults to false on new accounts.
          example: false
        autoTopupEmailEnabled:
          type: boolean
          description: Route auto-topup outcome notifications via email.
          example: true
        autoTopupWebhookEnabled:
          type: boolean
          description: Route auto-topup outcome notifications via webhook.
          example: true
    ResolvedBillingNotificationConfigDto:
      type: object
      properties:
        lowBalanceEnabled:
          type: boolean
          description: Master toggle for low-balance notifications.
          example: false
        lowBalanceEmailEnabled:
          type: boolean
          description: Route low-balance notifications via email.
          example: true
        lowBalanceWebhookEnabled:
          type: boolean
          description: Route low-balance notifications via webhook.
          example: true
        lowBalanceTiers:
          description: Resolved low-balance tiers.
          type: array
          items:
            $ref: '#/components/schemas/LowBalanceTierDto'
        globalHighUsageEnabled:
          type: boolean
          description: >-
            Master toggle for global (account-aggregate) high-usage
            notifications.
          example: false
        globalHighUsageEmailEnabled:
          type: boolean
          description: Route global high-usage notifications via email.
          example: true
        globalHighUsageWebhookEnabled:
          type: boolean
          description: Route global high-usage notifications via webhook.
          example: true
        globalHighUsagePeriodMinutes:
          type: number
          description: Rolling window, in minutes, for global high-usage evaluation.
          example: 1440
        globalHighUsageTiers:
          description: Resolved global high-usage tiers.
          type: array
          items:
            $ref: '#/components/schemas/HighUsageTierDto'
        highUsageEnabled:
          type: boolean
          description: Master toggle for per-workspace high-usage notifications.
          example: false
        highUsageEmailEnabled:
          type: boolean
          description: Route per-workspace high-usage notifications via email.
          example: true
        highUsageWebhookEnabled:
          type: boolean
          description: Route per-workspace high-usage notifications via webhook.
          example: true
        highUsagePeriodMinutes:
          type: number
          description: Rolling window, in minutes, for per-workspace high-usage evaluation.
          example: 1440
        highUsageTiers:
          description: >-
            Resolved per-workspace high-usage tiers (applied as defaults to
            every workspace).
          type: array
          items:
            $ref: '#/components/schemas/HighUsageTierDto'
        autoTopupNotificationsEnabled:
          type: boolean
          description: Master toggle for auto-topup outcome notifications.
          example: false
        autoTopupEmailEnabled:
          type: boolean
          description: Route auto-topup notifications via email.
          example: true
        autoTopupWebhookEnabled:
          type: boolean
          description: Route auto-topup notifications via webhook.
          example: true
      required:
        - lowBalanceEnabled
        - lowBalanceEmailEnabled
        - lowBalanceWebhookEnabled
        - lowBalanceTiers
        - globalHighUsageEnabled
        - globalHighUsageEmailEnabled
        - globalHighUsageWebhookEnabled
        - globalHighUsagePeriodMinutes
        - globalHighUsageTiers
        - highUsageEnabled
        - highUsageEmailEnabled
        - highUsageWebhookEnabled
        - highUsagePeriodMinutes
        - highUsageTiers
        - autoTopupNotificationsEnabled
        - autoTopupEmailEnabled
        - autoTopupWebhookEnabled
    LowBalanceTierDto:
      type: object
      properties:
        tier:
          type: string
          description: Severity tier name. Must be unique within the array.
          enum:
            - warning
            - critical
            - depleted
          example: warning
        cents:
          type: number
          description: >-
            Threshold in cents (integer, same currency as the account). A
            notification fires when the account balance drops at or below this
            value.
          example: 100000
          minimum: 0
      required:
        - tier
        - cents
    HighUsageTierDto:
      type: object
      properties:
        tier:
          type: string
          description: Severity tier name. Must be unique within the array.
          enum:
            - warning
            - critical
          example: warning
        cents:
          type: number
          description: >-
            Spend threshold in cents over the rolling period. A notification
            fires when the rolling-period spend is at or above this value.
          example: 100000
          minimum: 0
      required:
        - tier
        - cents
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````