An alert defines a threshold rule for a metered feature within a subscription. When the usage of a metered feature crosses the configured threshold, Chargebee triggers a webhook notification, enabling you to take action such as notifying the customer, upgrading the plan, or blocking further usage.
Common examples of alerts include:
- Notifying a customer when they have consumed 90% of their monthly API call quota.
- Alerting your operations team when a customer's storage usage exceeds an absolute limit.
- Triggering an automated upgrade workflow when usage crosses a defined threshold.
The alert resource represents configuration only. To check the current runtime state of an alert for a subscription (whether it is within_limit or in_alarm), use the Alert Status endpoints.
Sample AlertJSON
API Index URL
Alerts attributes
The identifier of the metered feature that this alert monitors.
The identifier of the subscription this alert is scoped to. Present only for subscription-scoped alerts; null for global alerts.
Whether the alert is currently active. A disabled alert is not evaluated against usage data.
The alert is active and will trigger when the threshold is breached.
The alert is inactive and will not trigger, regardless of usage.