{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_subscription_id": "sub_1234567890",
"lago_wallet_id": null,
"wallet_code": null,
"billable_metric": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Storage",
"code": "storage",
"recurring": false,
"created_at": "2022-09-14T16:35:31Z",
"aggregation_type": "sum_agg",
"filters": [
{
"key": "region",
"values": [
"us-east-1"
]
}
],
"description": "GB of storage used in my application",
"rounding_function": "round",
"rounding_precision": 2,
"expression": "round((event.properties.ended_at - event.properties.started_at) * event.properties.units)",
"field_name": "gb",
"weighted_interval": "seconds"
},
"alert_type": "billable_metric_current_usage_amount",
"code": "storage_threshold_alert",
"name": "Storage Usage Alert",
"direction": "increasing",
"previous_value": "1000.0",
"last_processed_at": "2025-05-19T10:04:21Z",
"thresholds": [
{
"code": "warn",
"recurring": false,
"value": "99.0"
}
],
"created_at": "2025-03-20T10:00:00Z"
}The alert object
This object represents an alert to monitor your subscriptions’ usage and billing by firing notifications when certain conditions are met.
Unique identifier of the alert, created by Lago.
"1a901a90-1a90-1a90-1a90-1a901a901a90"
Unique identifier of the organization, created by Lago.
"1a901a90-1a90-1a90-1a90-1a901a901a90"
The subscription external unique identifier (provided by your own application).
"sub_1234567890"
Always null. An alert returned by the subscription endpoints is never attached to a wallet.
Always null. An alert returned by the subscription endpoints is never attached to a wallet.
The billable metric associated with the alert. Null unless the alert type is based on a billable metric.
Show child attributes
Show child attributes
The type of alert.
current_usage_amount, billable_metric_current_usage_amount, billable_metric_current_usage_units, lifetime_usage_amount, billable_metric_lifetime_usage_units "billable_metric_current_usage_amount"
Unique code used to identify the alert.
"storage_threshold_alert"
The name of the alert.
"Storage Usage Alert"
Indicates whether the alert is triggered when the monitored metric goes above or below the threshold. Lago sets it from the alert type and you cannot change it. A subscription alert is always increasing.
increasing, decreasing "increasing"
When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds. Returned as a string formatted as a BigDecimal.
"1000.0"
The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
"2025-05-19T10:04:21Z"
Array of thresholds associated with the alert.
Show child attributes
Show child attributes
The date and time in UTC (ISO 8601) when the alert was created.
"2025-03-20T10:00:00Z"