---
title: "An alert was resolved"
method: POST
path: "alert_resolved"
---

# An alert was resolved

`POST alert_resolved` (webhook)

One or more thresholds that had triggered the alert are no longer in alarm.

Only thresholds with `resolved` in their `notify_on` are announced, and only when Lago recorded an alarm for their code. A threshold that was already in alarm when it was created or opted in is recorded silently, so its first recovery is announced without an earlier `alert.triggered`. Pairing is by threshold code: a threshold replaced by another one with the same code resolves the alarm the first one raised.

## 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.resolved', required
  - `object_type` 'resolved_alert', required
  - `organization_id` string, uuid, required: Unique identifier of the organization, created by Lago.
  - `resolved_alert` ResolvedAlertObject, required
    - `lago_id` string, uuid, required: Unique identifier of the resolution, 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 the resolved alert.
    - `alert_code` string, required: Unique code used to identify the alert.
    - `alert_name` string, nullable, required: The name of the alert.
    - `current_value` string, required: The value checked when the alert was resolved. For a resolution caused by an alert update, it is the last value checked before the update. Returned as a string formatted as a BigDecimal.
    - `previous_value` string, required: The value checked during the previous run. Returned as a string formatted as a BigDecimal.
    - `recovered_thresholds` AlertCrossedThresholdObject[], required: The threshold lines that are no longer in alarm and are announced by this resolution. Recurring thresholds never resolve and are never listed.
      - `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.
    - `in_alarm_thresholds` string[], required: Every threshold of the alert still in alarm after this resolution, whether or not it asked for resolutions, named by its code, or by its value when it has no code. The first line of a recurring threshold is included when it is in alarm. The list is empty exactly when `fully_resolved` is true.
    - `fully_resolved` boolean, required: True when no threshold of the alert is in alarm anymore. A consumer that releases a block only when nothing is in alarm can rely on it.
    - `reason` 'recovered' | 'threshold_updated' | 'threshold_removed', required: Why the alarm was resolved: - `recovered`: the checked value moved back to the safe side of the thresholds. - `threshold_updated`: an update of the alert moved the thresholds, so they are no longer in alarm at the last checked value. Nothing changed in the usage or the balance. - `threshold_removed`: an update of the alert removed the thresholds.
    - `resolved_at` string, date-time, required: The date and time in UTC (ISO 8601) when Lago resolved the alert.

## 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)
