subscriptions
List subscription alerts
This endpoint enables the retrieval of all alerts for a subscription.
get/subscriptions/{external_id}/alerts
Query parameters
subscription_status'pending' | 'active' | 'terminated' | 'canceled'
Example:active
Filter by subscription status. When provided, the subscription is looked up with this status instead of the default active status. Possible values are pending, active, terminated, or canceled.
Response
Subscription alerts
Example response
{
"alerts": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_subscription_id": "sub_1234567890",
"billable_metric": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Storage",
"code": "storage",
"description": "GB of storage used in my application",
"rounding_function": "round",
"rounding_precision": 2,
"created_at": "2022-09-14T16:35:31Z",
"expression": "round((ended_at - started_at) * units)",
"field_name": "gb",
"aggregation_type": "sum_agg",
"weighted_interval": "seconds",
"filters": [
{
"key": "region",
"values": [
"us-east-1"
]
}
]
},
"alert_type": "billable_metric_current_usage_amount",
"code": "storage_threshold_alert",
"name": "Storage Usage Alert",
"direction": "increasing",
"previous_value": 1000,
"last_processed_at": "2025-05-19T10:04:21Z",
"thresholds": [
{
"code": "warn",
"value": "99.0"
}
],
"created_at": "2025-03-20T10:00:00Z"
}
],
"meta": {
"current_page": 2,
"next_page": 3,
"prev_page": 1,
"total_pages": 4,
"total_count": 70
}
}