Skip to main content

Create subscription alert

This endpoint is used to create alerts at the subscription level.

Subscription level alerts can be one of two types: usage_exceeded or cost_exceeded. A usage_exceeded alert is scoped to a particular metric and is triggered when the usage of that metric exceeds predefined thresholds during the current billing cycle. A cost_exceeded alert is triggered when the total amount due during the current billing cycle surpasses predefined thresholds. cost_exceeded alerts do not include burndown of pre-purchase credits. Each subscription can have one cost_exceeded alert and one usage_exceeded alert per metric that is a part of the subscription. Alerts are triggered based on usage or cost conditions met during the current billing cycle.

Path Parameters
    subscription_id string required
Request Body
    type string required

    Possible values: [usage_exceeded, cost_exceeded, credit_balance_depleted, credit_balance_dropped, credit_balance_recovered]

    The type of alert to create. This must be a valid alert type.

    thresholds object[] required

    The thresholds that define the values at which the alert will be triggered.

  • Array [
  • value number required

    The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and cost alerts, the alert will fire at or above this value.

  • ]
  • metric_id string nullable

    The metric to track usage for.

Responses

Created

Response Headers

    Schema
      id string required

      Also referred to as alert_id in this documentation.

      type string required

      Possible values: [usage_exceeded, cost_exceeded, credit_balance_depleted, credit_balance_dropped, credit_balance_recovered]

      The type of alert. This must be a valid alert type.

      created_at date-time required

      The creation time of the resource in Orb.

      enabled boolean required

      Whether the alert is enabled or disabled.

      thresholds object[] nullable required

      The thresholds that define the conditions under which the alert will be triggered.

    • Array [
    • value number required

      The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and cost alerts, the alert will fire at or above this value.

    • ]
    • customer object nullable required

      The customer the alert applies to.

      property name* string nullable
      plan object nullable required

      The plan the alert applies to.

      property name* string nullable
      subscription object nullable required

      The subscription the alert applies to.

      property name* string nullable
      metric object nullable required

      The metric the alert applies to.

      property name* string nullable
      currency string nullable required

      The name of the currency the credit balance or invoice cost is denominated in.

    Loading...