A usage alert watches one telemetry, and fires usage_alert.triggered when a customer's usage in a month reaches its level. It can't change once created: archive it and create another.
Attributes
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier, starting alrt_. |
object | string | Always usage_alert. |
livemode | boolean | true in live mode. |
title | string | For your team. |
telemetry | string | The telemetry it watches. |
threshold | string | The level that fires it, in the telemetry's units. |
customer | string or null | One customer, or null for each customer on its own. |
recurrence | enum | once per customer, or monthly. |
status | enum | active, inactive or archived. |
created | timestamp | When it was created. |
Example
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/usage_alerts | Watch a telemetry for a level of usage. |
GET /v1/usage_alerts/{id} | Get a usage alert by its ID. |
POST /v1/usage_alerts/{id}/deactivate | Stop checking it. Usage meanwhile isn't caught up later. |
POST /v1/usage_alerts/{id}/reactivate | Check it again, from the next usage. |
POST /v1/usage_alerts/{id}/archive | Stop an alert for good. |
GET /v1/usage_alerts | List your usage alerts. |