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

# Event feed and signal alerts

> Send new issues, regressed issues, and anomalies to Slack, email, and webhooks, and poll every project event from an always-on agent.

Squasher sends five kinds of events: incidents, monitor state, new issues, regressed issues, and
anomalies. An agent can receive them in two ways:

* **Push.** Add a webhook destination and a route that lists the events. Squasher posts each event
  to your HTTPS endpoint and signs it.
* **Poll.** Read the event feed with a cursor. Use it when your agent has no public endpoint.

Both ways use the same event `id` and `type`. If you use both, drop an `id` that you already
handled.

## Event types

| Type | When |
| - | - |
| `issue.created` | A new issue (error group) appears. |
| `issue.regressed` | A resolved issue happens again. |
| `anomaly.detected` | The hourly scan finds a service or log anomaly. |
| `security_finding.detected` | A new security finding has severity `high` or `critical`. |
| `action.pending` | A response action waits for a person to approve or deny it. |
| `monitor.down` / `monitor.up` | A monitor or heartbeat opens or resolves its incident. |
| `incident.opened` / `incident.resolved` | Any other incident opens or resolves. |
| `incident.acknowledged`, `incident.status_changed`, others | The incident lifecycle events of the [Notifications API](https://docs.squasher.ai/api-reference/alerts.md). |

## Route issues and anomalies

A route receives `issue_created`, `issue_regressed`, and `anomaly_detected` only when its
`conditions.events` lists them. The default route never receives them. These events go to Slack,
email, and webhook destinations; other destination types skip them. Owners and admins get new and
regressed issues in their inbox and by email without a route; see
[Issue alerts](https://docs.squasher.ai/features/alerts.md#issue-alerts).

```bash theme={null}
squasher notifications routes create --project <project_id> --name "Issues and anomalies" \
  --destination <slack_destination_id> --destination <webhook_destination_id> \
  --input '{"conditions":{"events":["issue_created","issue_regressed","anomaly_detected"]}}'
```

One Slack or email destination gets at most 10 issue alerts in a rolling hour. The tenth alert says
that alerts pause. It also skips a regression of an issue that it alerted in the last 30 minutes.
Webhooks and the event feed get every event, and anomaly alerts have no limit.

`conditions.severities` filters issues by level (`error`, `fatal`, `warning`) and anomalies by severity
(`warning`, `error`). `conditions.environments` filters both by environment.

A route receives `security_finding_detected` and `action_proposal_pending` only when its
`conditions.events` lists them. `conditions.severities` filters security findings by severity
(`high`, `critical`) and pending actions by risk (`low`, `medium`, `high`). Each pending action
waits for a person: nothing runs until an owner or admin approves it.

When the Squasher Agent finishes its automatic triage of an issue or a security finding, it posts
the result as a reply to the Slack alert of that issue or finding. Mention the Squasher app in that thread to ask a follow-up question or
to ask it to open a fix pull request.

## Webhook body of an issue or anomaly

```json theme={null}
{
  "id": "evt_48230",
  "type": "issue.created",
  "event": "issue_created",
  "incident_id": null,
  "project_id": "22222222-2222-4222-8222-222222222222",
  "title": "TypeError: Cannot read properties of undefined (reading 'id')",
  "severity": null,
  "sent_at": "2026-11-11T18:20:04.112Z",
  "data": {
    "subject_id": "33333333-3333-4333-8333-333333333333",
    "level": "error",
    "environment": "production",
    "service": "checkout-api",
    "event_count": 1,
    "occurred_at": "2026-11-11T18:20:01.000Z",
    "release": "checkout-api@2.14.0",
    "summary": null,
    "url": "https://app.squasher.ai/acme/checkout/issues/33333333-3333-4333-8333-333333333333"
  }
}
```

`data.subject_id` is the issue id for `issue.*`, the finding id for `anomaly.detected` and
`security_finding.detected`, and the action id for `action.pending`. `data.release` is the `service.version`
of the event that opened or reopened the issue, or `null`.
Verify the signature as described in [Headers and signatures](https://docs.squasher.ai/api-reference/alerts.md#headers-and-signatures).

## Poll the event feed

`GET /v1/projects/{project_id}/notifications/events` (`notifications.listEvents`, scope
`notifications:read`) returns events in order, oldest first.

| Query | Meaning |
| - | - |
| `cursor` | Return events after this event id. Pass `next_cursor` of the last page. |
| `since` | Return events at or after this RFC 3339 time. Use it for the first call. |
| `types` | Comma-separated event types, for example `issue.created,monitor.down`. |
| `limit` | Rows to read, 1 to 200. The default is 50. |

```json theme={null}
{
  "data": [
    {
      "id": "evt_48230",
      "type": "issue.created",
      "occurred_at": "2026-11-11T18:20:04.101Z",
      "project_id": "22222222-2222-4222-8222-222222222222",
      "data": {
        "subject_id": "33333333-3333-4333-8333-333333333333",
        "title": "TypeError: …",
        "level": "error"
      }
    }
  ],
  "next_cursor": "evt_48230",
  "has_more": false
}
```

* Store `next_cursor` after you handle a page, and send it on the next call. The cursor moves past
  every row it read, also rows that are not public events, so a page can be empty while
  `has_more` is `true`.
* When `has_more` is `false`, wait before the next call. 15 to 60 seconds is enough.
* The feed shows an event about 5 seconds after it happens. This delay keeps the order complete.

### From a terminal or an agent

```bash theme={null}
# One page
squasher notifications events --project <project_id> --since 2026-11-11T00:00:00Z

# Follow: print each new event as one JSON line, poll every 15 seconds
squasher notifications events --project <project_id> --follow --types issue.created,issue.regressed,monitor.down
```

`--follow` never stops. A long-running agent (for example Claude Code with a background monitor
or OpenClaw) can read its output line by line and start an investigation for each event. Keep
the last `id` that you handled, and start again with `--cursor <id>` after a restart.

From TypeScript, `client.notifications.listEvents({ cursor, types })` calls the same endpoint.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.