v1

latestOpenAPI 3.1.02026-07-261444991.2 MB
Alert

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.

post/alerts/subscription_id/{subscription_id}

Path parameters

subscription_idstring required

Request body

type'usage_exceeded' | 'cost_exceeded' required

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

metric_idstring nullable

The metric to track usage for.

grouping_keysstring[] nullable

The property keys to group cost alerts by. Only applicable for cost_exceeded alerts.

currencystring nullable

The case sensitive currency or custom pricing unit to use for grouped cost alerts. Required when grouping_keys is set.

Response

Created

idstring required

Also referred to as alert_id in this documentation.

created_atstring date-time required

The creation time of the resource in Orb.

enabledboolean required

Whether the alert is enabled or disabled.

currencystring nullable required

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

grouping_keysstring[] nullable

The property keys to group cost alerts by. Only present for cost alerts with grouping enabled.

Example response

{
  "id": "XuxCbt7x9L82yyeF",
  "plan": {
    "id": "m2t5akQeh2obwxeU",
    "external_plan_id": "m2t5akQeh2obwxeU",
    "name": "Example plan"
  },
  "subscription": {
    "id": "VDGsT23osdLb84KD"
  }
}