The Alert object 

Billing
Alerts
The Alert object

Attributes

  • idstring

    Unique identifier for the object.

  • objectstring

    String representing the object’s type. Objects of the same type share the same value.

  • alert_typeenum

    Defines the type of the alert.

    Possible enum values
    usage_threshold

    Use usage_threshold if you intend for an alert to fire when a usage threshold on a meter is crossed.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • statusnullable enum

    Status of the alert. This can be active, inactive or archived.

  • titlestring

    Title of the alert.

  • usage_thresholdnullable object

    Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.

    • usage_threshold.filtersnullable array of objects

      The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.

      • usage_threshold.filters.customernullable stringExpandable

        Limit the scope of the alert to this customer ID

    • usage_threshold.gteinteger

      The value at which this alert will trigger.

    • usage_threshold.meterstringExpandable

      The Billing Meter ID whose usage is monitored.

    • usage_threshold.recurrenceenum

      Defines how the alert will behave.

      Possible enum values
      one_time

      Use one_time if you intend for an alert to only fire once in the lifetime of a customer.

The Alert object
{
"id": "alrt_12345",
"object": "billing.alert",
"title": "API Request usage alert",
"livemode": true,
"alert_type": "usage_threshold",
"usage_threshold": {
"gte": 10000,
"meter": "mtr_12345",
"recurrence": "one_time"
},
"status": "active"
}