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

# Error groups API

> Query and inspect grouped errors for a Squasher project.

Use the error groups API to list, filter, and inspect the grouped issues for a project.

## List error groups

```text theme={null}
GET https://api.squasher.ai/v1/projects/{project_id}/errors
```

Common query parameters:

* `from` - optional ISO 8601 start timestamp
* `to` - optional ISO 8601 end timestamp
* `status` - one of `unresolved`, `resolved`, `ignored`, `muted`, or `all`
* `priority` - one of `low`, `medium`, `high`, or `critical`
* `level` - severity level filter
* `service` - `service.name` filter
* `environment` - deployment environment filter
* `q` - substring search across title, type, fingerprint, service, and environment
* `limit`
* `offset`
* `sort` - one of `last_seen`, `first_seen`, `event_count`, or `priority`

Example:

```text theme={null}
GET https://api.squasher.ai/v1/projects/{project_id}/errors?status=unresolved&from=2026-04-01T00:00:00Z&to=2026-04-03T00:00:00Z
```

List responses include each group's `priority`, `bookmarked`, `subscribed`, `service_name`, and `environment` when known, plus `facets` arrays for service, environment, and level filter dropdowns. Each group also exposes `assigned_to` and `ai_assigned`; when `ai_assigned` is `true` and `assigned_to` is `null` the Squasher agent currently owns the group (auto-triage assignment).

## Get one error group

```text theme={null}
GET https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}
```

The response can include the group title, fingerprint, priority, bookmark and subscription state for the current user, event counts, timestamps, current AI triage fields, `merged_into` when the group is an active duplicate, and `merged_from` for active duplicates merged into this canonical group.

Optional query parameters:

* `include_replay` - set to `false` to skip replay linkage when you only need the core group fields
* `from` - optional ISO 8601 start timestamp for replay linkage lookup
* `to` - optional ISO 8601 end timestamp for replay linkage lookup

## Update workflow metadata

```text theme={null}
PATCH https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}
```

JSON body:

```json theme={null}
{
  "assigned_to": null,
  "priority": "high",
  "bookmarked": true,
  "subscribed": true,
  "status": "resolved"
}
```

Use `assigned_to` to assign or clear an owner. Setting `assigned_to` also clears the response field `ai_assigned`, signalling that a human has taken over from the Squasher agent. Use `status` to move the error group through `unresolved`, `resolved`, `ignored`, or `muted`. Use `priority` to set triage urgency. Use `bookmarked` and `subscribed` to update the current user's saved and notification state; those two fields require an OAuth user session and are rejected for API-key-only requests. Include at least one field in the body.

CLI:

```bash theme={null}
squasher errors update --project <project_id> <error_group_id> --status resolved
squasher errors update --project <project_id> <error_group_id> --priority critical
squasher errors update --project <project_id> <error_group_id> --assigned-to <user_id>
squasher errors update --project <project_id> <error_group_id> --clear-assignee
# Run `squasher login` with the browser flow before current-user state changes.
squasher errors update --project <project_id> <error_group_id> --bookmark --subscribe
```

## Merge duplicate groups

```text theme={null}
POST https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}/merge
```

Use the canonical error group id in the URL. The request body lists duplicate groups to merge into it:

```json theme={null}
{
  "duplicate_error_group_ids": ["<duplicate_error_group_id>"]
}
```

Merged duplicate groups are hidden from normal unresolved list results. Fetching a merged duplicate returns `merged_into` so callers can link to the canonical group. Future runtime events that match a merged duplicate fingerprint increment the canonical group.

## Unmerge a duplicate group

```text theme={null}
POST https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}/unmerge
```

Use the duplicate error group id in the URL. Unmerge restores the group to normal list results and future events for its fingerprint increment that restored group again.

## List related traces

```text theme={null}
GET https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}/traces
```

Optional query parameters:

* `from` - optional ISO 8601 start timestamp
* `to` - optional ISO 8601 end timestamp

## List suspect commits

```text theme={null}
GET https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}/suspect-commits
```

Optional query parameters:

* `from` - optional ISO 8601 start timestamp
* `to` - optional ISO 8601 end timestamp

## List AI triage runs

```text theme={null}
GET https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}/triage-runs
```

Use this endpoint to fetch the history of automatic and manual AI triage runs for one error group.

## Create or reuse AI triage

```text theme={null}
POST https://api.squasher.ai/v1/projects/{project_id}/errors/{error_group_id}/triage
```

Optional JSON body:

```json theme={null}
{ "force": true }
```

Set `force` to `true` to create a fresh manual run even when the current automation cycle already has a completed triage result.

## Agent handoff

Use this sequence for incident or bug investigation:

1. List unresolved groups with a bounded time window.
2. Fetch one error group detail.
3. Fetch related traces, suspect commits, and triage-run history.
4. Ask before updating status, assigning ownership, or forcing a new triage.

```text theme={null}
Investigate Squasher error group <error_group_id> in project <project_id>. Use the Errors API, related traces, suspect commits, and triage-run history. Return concrete ids, timestamps, and evidence; do not mutate workflow metadata without confirmation.
```

The same workflow is available through `squasher errors ...` or MCP `search("errors")` followed by `execute`.

## Related guides

* [AI triage](/features/ai-triage)
* [Projects API](/api-reference/projects)
