Skip to main content
lago_id
string<uuid>
required

Unique identifier of the alert, created by Lago.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

lago_organization_id
string<uuid>
required

Unique identifier of the organization, created by Lago.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

external_subscription_id
string
required

The subscription external unique identifier (provided by your own application).

Example:

"sub_1234567890"

lago_wallet_id
null
required

Always null. An alert returned by the subscription endpoints is never attached to a wallet.

wallet_code
null
required

Always null. An alert returned by the subscription endpoints is never attached to a wallet.

billable_metric
object | null
required

The billable metric associated with the alert. Null unless the alert type is based on a billable metric.

alert_type
enum<string>
required

The type of alert.

Available options:
current_usage_amount,
billable_metric_current_usage_amount,
billable_metric_current_usage_units,
lifetime_usage_amount,
billable_metric_lifetime_usage_units
Example:

"billable_metric_current_usage_amount"

code
string
required

Unique code used to identify the alert.

Example:

"storage_threshold_alert"

name
string | null
required

The name of the alert.

Example:

"Storage Usage Alert"

direction
enum<string>
required

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.

Available options:
increasing,
decreasing
Example:

"increasing"

previous_value
string
required

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.

Example:

"1000.0"

last_processed_at
string<date-time> | null
required

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.

Example:

"2025-05-19T10:04:21Z"

thresholds
object[]
required

Array of thresholds associated with the alert.

created_at
string<date-time>
required

The date and time in UTC (ISO 8601) when the alert was created.

Example:

"2025-03-20T10:00:00Z"