Idempotency Supported
Creates a new alert configuration for a metered feature. The alert can be global or subscription-scoped depending on whether subscription_id is provided.
Note: Creating an alert defines the threshold rule only. After an alert is created, Chargebee begins evaluating it as new usage events are ingested for the associated metered feature. Alert statuses are created and updated during Alert evaluation. The runtime evaluation state for each subscription is available via the Alert Status endpoints.
Prerequisites & Constraints
- The
metered_feature_idmust reference an existing metered feature configured on your site. typemust beusage_exceeded.- For
filter_conditions, onlyplan_price_idis supported as thefield, with operatorequalsornot_equals.
Sample Request
Sample Result[JSON]
URL Format
POST https://[site].chargebee.com/api/v2/alerts
Input Parameters
The identifier of the metered feature that this alert should monitor.
The identifier of the subscription to scope this alert to. If omitted, the alert is created as a global alert. If provided, filter_conditions must not be set.
Returns
Alert object
Resource object representing alert