---
title: "A new alert was triggered"
method: POST
path: "alert_triggered"
---

# A new alert was triggered

`POST alert_triggered` (webhook)

One or more thresholds defined in the alert were crossed

## Headers

- `X-Lago-Signature` string, required
- `X-Lago-Signature-Algorithm` 'jwt' | 'hmac', required
- `X-Lago-Unique-Key` string, uuid, required

## Payload

- object
  - `webhook_type` 'alert.triggered', required
  - `object_type` 'triggered_alert', required
  - `organization_id` string, uuid, required: Unique identifier of the organization, created by Lago.
  - `triggered_alert` TriggeredAlertObject, required
    - `lago_id` string, uuid, required: Unique identifier of the triggered alert, created by Lago.
    - `lago_organization_id` string, uuid, required: Unique identifier of the organization, created by Lago.
    - `lago_alert_id` string, uuid, required: Unique identifier of the alert, created by Lago.
    - `lago_subscription_id` string, uuid, nullable, required: Unique identifier of the subscription, created by Lago. Null when the alert is attached to a wallet.
    - `external_subscription_id` string, nullable, required: The subscription external unique identifier (provided by your own application). Null when the alert is attached to a wallet.
    - `lago_wallet_id` string, uuid, nullable, required: Unique identifier of the wallet, created by Lago. Null when the alert is attached to a subscription.
    - `external_customer_id` string, required: The customer external unique identifier (provided by your own application).
    - `billable_metric_code` string, nullable, required: The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
    - `alert_type` 'current_usage_amount' | 'billable_metric_current_usage_amount' | 'billable_metric_current_usage_units' | 'lifetime_usage_amount' | 'billable_metric_lifetime_usage_units' | 'wallet_balance_amount' | 'wallet_credits_balance' | 'wallet_ongoing_balance_amount' | 'wallet_credits_ongoing_balance', required: The type of alert triggered.
    - `alert_code` string, required: Unique code used to identify the alert triggered.
    - `alert_name` string, nullable, required: The name of the alert triggered.
    - `current_value` string, required: When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds crossed since the previous value. Returned as a string formatted as a BigDecimal.
    - `previous_value` string, required: During the previous run, this value was retrieved. Returned as a string formatted as a BigDecimal.
    - `triggered_at` string, date-time, required: The date and time in UTC (ISO 8601) when the system triggered the alert.
    - `crossed_thresholds` AlertCrossedThresholdObject[], required: The threshold lines crossed since the previous check. Every recurring line crossed in that interval is present, so one recurring threshold can appear several times.
      - `code` string, nullable, required: Code identifying the threshold inside the alert. Null when the threshold has no code.
      - `value` string, required: The value of the threshold line, formatted as a BigDecimal. The unit depends on the alert type: `billable_metric_current_usage_units` and `billable_metric_lifetime_usage_units` are expressed in units, `wallet_credits_balance` and `wallet_credits_ongoing_balance` in credits, and all other types in cents.
      - `recurring` boolean, required: True when the line comes from the recurring threshold of the alert. A recurring threshold produces one line per step, so several lines can share the same code.

## Acknowledgement `200`

Return a 200 status to indicate that the data was received successfully

---

[API](https://skmtc.dev/getlago/apis/lago-api-documentation.md) - [All operations](https://skmtc.dev/getlago/apis/lago-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/getlago/apis/lago-api-documentation/revisions/b216574b9612?raw)
