> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happyuptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alert log

Audit every alert delivery — request, response, attempts, and replay.

# Alert log

Every dispatch attempt — Slack, webhook, email, PagerDuty, etc. — is logged with its request body (webhooks), response code, response snippet, attempt count, and final status.

## List

GET `/alerts/log`

Query params:

| Param | Meaning |
| --- | --- |
| `monitor_id` | Filter by monitor |
| `status` | `sent`, `pending`, `failed`, `suppressed` |

```json
{
  "alerts": [
    {
      "id": "log_abc",
      "channel_id": "ch_webhook_ops",
      "channel_type": "webhook",
      "channel_name": "Ops bus",
      "event_type": "monitor.down",
      "status": "sent",
      "attempts": 1,
      "response_code": 200,
      "delivery_id": "whd_8k3nP2oQ1xR7vL9m",
      "sent_at": "2026-04-22T20:01:23Z",
      "created_at": "2026-04-22T20:01:23Z"
    }
  ]
}
```

## Inspect one

GET `/alerts/log/:id`

Returns the full row including `request_body` (webhook payload as sent) and `response_snippet` (first 2 KB of the response body).

## Replay a webhook delivery

POST `/alerts/log/:id/retry` — **scope:** `write`

Re-sends the original signed request body. The replay keeps the same `delivery_id` (safe against downstream idempotency checks) and adds `X-Happyuptime-Delivery-Retry: true`. A fresh `alert_log` row is inserted with `delivery_id = replay_of:<original_id>`.

Restrictions:

- Only webhook channels are replayable — managed integrations (Slack, PagerDuty, etc.) do not store replayable bodies.
- The original `request_body` must still be present (deliveries older than 30 days may be pruned).

```json
{
  "replayed_log_id": "log_def",
  "success": true,
  "response_code": 200,
  "error": null
}
```

## 30-day stats

GET `/alerts/log/stats`

```json
{
  "stats": { "total": 1247, "sent": 1198, "failed": 32, "suppressed": 17 }
}
```