{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paypal/json-schema/paypal-alert-update-input-schema.json",
  "title": "AlertUpdateInput",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paypal-alerts-api-openapi.yml#/components/schemas/AlertUpdateInput",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "The unique code to identify the alert."
    },
    "metric_code": {
      "type": "string",
      "description": "The code of the metric associated with the alert. Only for alerts based on a metric."
    },
    "name": {
      "type": "string",
      "description": "The name of the alert."
    },
    "thresholds": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AlertThreshold"
      },
      "description": "List of thresholds that will trigger this alert. At least one threshold is required."
    }
  },
  "$defs": {
    "AlertThreshold": {
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Identifier for this threshold. Used to distinguish between different thresholds."
        },
        "value": {
          "type": "string",
          "pattern": "^[0-9]+\\.?[0-9]*$",
          "description": "A value that should trigger this alert. Must be a positive numeric string that can include a decimal point."
        },
        "recurring": {
          "type": "boolean",
          "description": "When true, enables retriggering of alerts at specified intervals after the last non-recurring threshold is exceeded. For example, with non-recurring thresholds at 500 and 1000, and a recurring threshold of 200, alerts will fire at 500, 1000, then every 200 thereafter (1200, 1400, etc.). Only one recurring threshold permitted per alert."
        }
      }
    }
  }
}