# Fix a health issue

Source: <https://everruns.com/docs/api/operations/run_health_issue_fixer/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Evaluation & reporting](https://everruns.com/docs/api/groups/evaluation-reporting/)/Fix a health issue

# Fix a health issue

Preview

Run a fixer the issue offers, such as adding missing Slack permissions to the agent’s app. A fix that needs approval in the provider returns the page to approve it on; the issue resolves only when a fresh check confirms it.

Public APIEverruns Cloud and self-hosted Platform

POST`/v1/health-issues/{issue_id}/fix`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**issue_id**

required

string

Prefixed public identifier

## Request Bodyrequired

Media typeapplication/json

Run one of the fixers an issue offers.

object

**kind**

required

The fixer to run, as the issue’s `fixers` list names it.

string

### Example

```plaintext
slack.add_permissions
```

## Responses

200Success

### 200

Success

Media typeapplication/json

The result of running a fixer.

object

**consent_url**

The provider page that approves the change. Built by the server on the provider’s own origin.

string | null

**issue**

required

The issue after the fix.

object

**agent_id**

Public identifier of the owning agent; absent for an organization-level issue.

string | null

**agent_name**

Display name of the owning agent; absent for an organization-level issue.

string | null

**body**

required

Explanation of the impact and recovery action.

string

**channel_id**

Public identifier of the affected channel; absent for an organization-level issue.

string | null

**code**

required

Detector code: `slack.permissions` for a channel, `org.active_turn_limit` for the organization.

string

**error_code**

Sanitized provider or verification error code, when available.

string | null

**evidence**

The numbers a detector or classifier recorded for a finding: counts, costs, probabilities. Never session content.

object | null

**first_detected_at**

required

Time the current issue episode was first detected.

string format: date-time

**fixers**

required

Repairs Everruns can make for the issue now, in the order to offer them. Empty when it has none, or the issue is resolved.

Array\<object>

A repair Everruns can make for an issue.

object

**effect**

required

`in_place` when running it is the whole fix; `consent` when the person then approves the change in the provider.

string

**kind**

required

What it does: `slack.add_permissions`, `slack.reconnect` or `schedule.pause`.

string

**label**

required

Button text.

string

**needs_provider_admin**

required

Whether the provider may ask a workspace administrator to approve.

boolean

**steps**

required

What happens when it runs, step by step, in plain words.

Array\<string>

**unavailable_reason**

Why it cannot run now, and what unlocks it. Absent when it can run.

string | null

**unblock**

One of:

* object

  The page where the person takes the step that unlocks the fix, when one exists in Everruns. Absent when the fix can run, or when nothing in Everruns unlocks it (only the manual steps remain).

  object

  **href**

  required

  A path inside the Everruns console, never an external URL.

  string

  **label**

  required

  Button text.

  string

* null

  null

**undoable**

required

Whether the fix can be undone from the finding.

boolean

**href**

required

Application-relative link to the issue details.

string

**id**

required

Stable identifier of the canonical issue.

string format: uuid

**investigation**

One of:

* object

  The Inspector’s write-up of a finding’s current episode, when it has one.

  object

  **cluster_id**

  The cluster of similar findings in this organization.

  string | null format: uuid

  **cluster_open**

  Open findings in the cluster, this one included.

  integer | null format: int64

  **cluster_title**

  Title of that cluster, naming the problem the findings share.

  string | null

  **completed_at**

  When the write-up was finished.

  string | null format: date-time

  **dismiss_reason**

  The note the person gave when dismissing.

  string | null

  **dismissed_at**

  When a person dismissed the finding, and why.

  string | null format: date-time

  **model**

  The model that wrote it.

  string | null

  **severity**

  `high`, `medium` or `low`, as the Inspector judged it.

  string | null

  **status**

  required

  `running`, `done`, `failed`, or `unavailable` (no model to write it).

  string

  **suggested_action**

  One concrete next step.

  string | null

  **what_happened**

  What happened, in two to four plain sentences.

  string | null

* null

  null

**last_checked_at**

required

Time the latest accepted verification evidence was observed.

string format: date-time

**missing_scopes**

required

Required Slack scopes absent from the verified grant.

Array\<string>

**notification_id**

Current user’s announcement identifier, when one was issued.

string | null

**session_id**

Public identifier of the session the issue points at, when it has one.

string | null

**snoozed_until**

Current user’s reminder suppression deadline, if snoozed.

string | null format: date-time

**stale**

required

Whether the evidence is old, unavailable, or for a previous channel revision.

boolean

**status**

required

Current issue state: open, needs_check, resolved, or inapplicable.

string

**subject_id**

What a background-work issue is about: a schedule (`sched_…`), an agent (`agent_…`), a session (`session_…`) or the organization (`org_…`).

string | null

**title**

required

Human-readable summary of the required action.

string

**returns_automatically**

required

Whether approving returns the browser to the issue by itself. When false the person comes back on their own and the page checks again.

boolean

**status**

required

`done` (the change is made and the issue was checked again) or `consent` (approve the change at `consent_url`, then come back).

string

### Example

```json
{
  "issue": {
    "agent_id": "agent_550e8400e29b41d4a716446655440000",
    "agent_name": "Support assistant",
    "body": "Reconnect Slack to grant the required permissions.",
    "channel_id": "appchan_550e8400e29b41d4a716446655440000",
    "code": "slack.permissions",
    "error_code": "missing_scope",
    "first_detected_at": "2026-10-03T12:00:00Z",
    "fixers": [
      {
        "effect": "consent",
        "kind": "slack.add_permissions",
        "label": "Fix in Slack",
        "unblock": {
          "href": "/settings/slack",
          "label": "Reconnect Slack workspace"
        }
      }
    ],
    "href": "/settings/health?issue=550e8400-e29b-41d4-a716-446655440000",
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "investigation": {
      "cluster_id": "550e8400-e29b-41d4-a716-446655440000",
      "cluster_open": 3,
      "cluster_title": "Schedules polling an expired claim",
      "completed_at": "2026-10-18T21:40:00Z",
      "dismiss_reason": "Expected: load test",
      "model": "gpt-6.2-sol",
      "severity": "high",
      "status": "done",
      "suggested_action": "Add a stop rule to the schedule's instructions.",
      "what_happened": "The schedule polls a sign-in claim that expired; every run since reports the same error."
    },
    "last_checked_at": "2026-10-03T12:05:00Z",
    "missing_scopes": [
      "reactions:write"
    ],
    "notification_id": "notification_550e8400e29b41d4a716446655440001",
    "session_id": "session_550e8400e29b41d4a716446655440000",
    "snoozed_until": "2026-10-04T12:00:00Z",
    "stale": false,
    "status": "open",
    "subject_id": "sched_550e8400e29b41d4a716446655440000",
    "title": "Slack permissions need updating"
  },
  "status": "consent"
}
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/health-issues/example/fix';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"kind":"slack.add_permissions"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/health-issues/example/fix \
  --header 'Content-Type: application/json' \
  --data '{ "kind": "slack.add_permissions" }'
```

Additional language examples require JavaScript. The default request example is available above.

200

200 · Success

```json
{
  "issue": {
    "agent_id": "agent_550e8400e29b41d4a716446655440000",
    "agent_name": "Support assistant",
    "body": "Reconnect Slack to grant the required permissions.",
    "channel_id": "appchan_550e8400e29b41d4a716446655440000",
    "code": "slack.permissions",
    "error_code": "missing_scope",
    "first_detected_at": "2026-10-03T12:00:00Z",
    "fixers": [
      {}
    ],
    "href": "/settings/health?issue=550e8400-e29b-41d4-a716-446655440000",
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "last_checked_at": "2026-10-03T12:05:00Z",
    "missing_scopes": [
      "reactions:write"
    ],
    "notification_id": "notification_550e8400e29b41d4a716446655440001",
    "session_id": "session_550e8400e29b41d4a716446655440000",
    "snoozed_until": "2026-10-04T12:00:00Z",
    "stale": false,
    "status": "open",
    "subject_id": "sched_550e8400e29b41d4a716446655440000",
    "title": "Slack permissions need updating"
  },
  "returns_automatically": true,
  "status": "consent"
}
```

## Matching endpoints