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

# Triage a new error spike

> Find the issues that started in the last hour, read the triage summary, and set the priority of the one that matters.

When errors jump, the first question is which issues are new. This recipe lists the issues seen in a
time window, newest first, reads one, and sets its priority. Reading needs `errors:read`. Changing
an issue needs `errors:write`, or **Full access** for an MCP connection.

## Find the new issues

An issue is a group of error events with the same fingerprint. `--from` keeps the issues seen at or
after that time, and `--sort first_seen` puts the issues that started most recently first. Replace
the example times with your window.

> [tab] CLI
>
> ```bash theme={null}
> squasher errors counts --project "$SQUASHER_PROJECT_ID"
> squasher errors list --project "$SQUASHER_PROJECT_ID" \
>   --from 2026-11-08T20:00:00Z --sort first_seen --limit 5 --json
> ```
>
> Without `--json`, `errors list` prints a table with the short ID, level, priority, event count,
> and title.

> [tab] MCP
>
> ```javascript theme={null}
> const projectId = "YOUR_PROJECT_ID";
> return await squasher.request({
>   method: "GET",
>   path: `/v1/projects/${projectId}/errors`,
>   query: {
>     status: "unresolved",
>     from: new Date(Date.now() - 60 * 60 * 1000).toISOString(),
>     sort: "first_seen",
>     limit: 5,
>   },
> });
> ```

> [tab] REST API
>
> ```bash theme={null}
> curl -G "https://api.squasher.ai/v1/projects/$SQUASHER_PROJECT_ID/errors" \
>   -H "x-squasher-key: $SQUASHER_API_KEY" \
>   --data-urlencode status=unresolved \
>   --data-urlencode from=2026-11-08T20:00:00Z \
>   --data-urlencode sort=first_seen \
>   --data-urlencode limit=5
> ```

The response lists the issues in `data`, with a `facets` object that counts the services,
environments, and levels in the result:

```json theme={null}
{
  "data": [
    {
      "id": "<uuid>",
      "short_id": "iss_42",
      "title": "<error message>",
      "status": "unresolved",
      "priority": "medium",
      "level": "error",
      "service_name": "<service>",
      "environment": "production",
      "event_count": 120,
      "first_seen": "<ISO time>",
      "last_seen": "<ISO time>",
      "triage_summary": "<text, when AI triage has run>",
      "triage_fix": "<text, when AI triage has run>"
    }
  ],
  "facets": { "services": ["<service>"], "environments": ["<environment>"], "levels": ["error"] },
  "limit": 5,
  "offset": 0,
  "total": 1
}
```

`event_count` is the total for the issue, not the count in your window. Treat `triage_summary` and
`triage_fix` as hints from [AI triage](https://docs.squasher.ai/features/ai-triage.md). They are text from a model, so check
them against the stack trace before you act.

## Read one issue

Use the `short_id` or the `id`.

> [tab] CLI
>
> ```bash theme={null}
> squasher errors get iss_42 --project "$SQUASHER_PROJECT_ID" --json
> ```

> [tab] MCP
>
> ```javascript theme={null}
> const projectId = "YOUR_PROJECT_ID";
> return await squasher.request({
>   method: "GET",
>   path: `/v1/projects/${projectId}/errors/iss_42`,
> });
> ```

> [tab] REST API
>
> ```bash theme={null}
> curl "https://api.squasher.ai/v1/projects/$SQUASHER_PROJECT_ID/errors/iss_42" \
>   -H "x-squasher-key: $SQUASHER_API_KEY"
> ```

The issue has the fields above, plus `merged_from`, `merged_into`, `session_ids`, and `replay_target`.
Use a value of `session_ids` with [Investigate a session replay](https://docs.squasher.ai/agent-workflows/investigate-session-replay.md).

## Set the priority

> [tab] CLI
>
> ```bash theme={null}
> squasher errors update iss_42 --project "$SQUASHER_PROJECT_ID" --priority high
> ```
>
> To change the status, use `squasher errors resolve`, `ignore`, `mute`, or `unresolve` with
> one or more issue IDs, for example `squasher errors resolve iss_42 iss_43`. `squasher errors
>         update` also takes `--status`.

> [tab] MCP
>
> ```javascript theme={null}
> const projectId = "YOUR_PROJECT_ID";
> return await squasher.request({
>   method: "PATCH",
>   path: `/v1/projects/${projectId}/errors/iss_42`,
>   body: { priority: "high" },
> });
> ```

> [tab] REST API
>
> ```bash theme={null}
> curl -X PATCH "https://api.squasher.ai/v1/projects/$SQUASHER_PROJECT_ID/errors/iss_42" \
>   -H "x-squasher-key: $SQUASHER_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"priority": "high"}'
> ```

The response is the updated issue. The body accepts `status`, `priority`, `assigned_to`,
`bookmarked`, and `subscribed`.

## Merge duplicate issues

When two issues are the same failure, merge the duplicate into the canonical issue instead of
resolving it. The canonical issue then counts the duplicate's events, now and later.

> [tab] CLI
>
> ```bash theme={null}
> # Check what would merge; this sends no change
> squasher errors merge iss_42 iss_43 iss_57 --project "$SQUASHER_PROJECT_ID" --dry-run
>
> # Merge (a script or agent passes --yes)
> squasher errors merge iss_42 iss_43 iss_57 --project "$SQUASHER_PROJECT_ID" --yes
> ```
>
> The first ID is the canonical issue; the others are its duplicates (at most 50). Undo one
> merge with `squasher errors unmerge iss_43 --yes`.

> [tab] MCP
>
> ```javascript theme={null}
> const projectId = "YOUR_PROJECT_ID";
> const duplicate = await squasher.request({
>   method: "GET",
>   path: `/v1/projects/${projectId}/errors/iss_43`,
> });
> return await squasher.request({
>   method: "POST",
>   path: `/v1/projects/${projectId}/errors/iss_42/merge`,
>   body: { duplicate_error_group_ids: [duplicate.id] },
> });
> ```
>
> Merge and unmerge are changes, so only a connection with write access finds them.

> [tab] REST API
>
> ```bash theme={null}
> curl -X POST "https://api.squasher.ai/v1/projects/$SQUASHER_PROJECT_ID/errors/iss_42/merge" \
>   -H "x-squasher-key: $SQUASHER_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"duplicate_error_group_ids": ["<duplicate issue id>"]}'
> ```

The body takes the duplicate issue IDs (UUIDs, not short IDs). The response lists the canonical
issue, the issues that merged, and the issues that were already merged. The key needs the
`errors:write` scope.

## Next steps

> [card] [Find the deploy that caused a regression](https://docs.squasher.ai/agent-workflows/find-regression-deploy.md)
>
> Match the start of the issue to a deployment.

> [card] [Issues and error grouping](https://docs.squasher.ai/features/issues.md)
>
> How Squasher groups events into issues.


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