# Acknowledge an incident

`POST /api/v1/incidents/{incidentId}/ack`

Acknowledges an open incident: its escalation stops and nobody else is paged for it. Needs the editor role.

Sign-in: a dashboard session, an API token with `incidents:write` or the `monitorly` CLI's sign-in with `incidents:write`.

Section: Incidents. Operation id in openapi.json: `ack_incident`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `incidentId` | path | yes | string (uuid) | The incident's id. |
| `via` | query | no | "link" | `link` when the acknowledge page of an alert sends it. |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 202

Accepted: the acknowledgement is being applied.

`application/json`: AckAccepted

| Field | Type | Required | Description |
|---|---|---|---|
| `pending` | boolean | yes | The request is queued; `incident.changed` on the event stream confirms it. |

Example:

```json
{
  "pending": true
}
```

### 400

Bad Request.

- `request.malformed`: the body or a parameter is not of the expected shape
- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.scope_missing`: the token lacks the scope this needs; `detail` names it
- `request.origin_mismatch`, `request.header_required`: a changing request with a session comes from another site or lacks `X-Monitorly-Request: 1`

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it

### 409

Conflict.

- `incident.closed`: incident is closed

### 422

Unprocessable Entity.

- `field.invalid`, `field.required`: a parameter breaks a rule; `errors` points at it

### 429

Too Many Requests.

- `token.rate_limited`: more than 10 requests a second with this token
- `session.rate_limited`: more than 5 changes a second from your sessions

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
