# Escalation policies

> Who hears about an incident and when - levels, delays, targets and repeats, and how acknowledging stops them.

An **escalation policy** decides who is told about an incident, and when. Every project has one; a check can follow another policy than its project's.

## Levels

A policy is an ordered list of up to 10 **levels**:

- level 1 goes out when the incident opens;
- each later level waits 1 to 1440 minutes after the one before it;
- each level has up to 20 **targets**: an alert channel of any kind, a linked Telegram chat, or a workspace **member**, who gets email at their account address once it is confirmed.

After its last level, the whole policy can run again from level 1: `repeatAfterMins` (1 to 10080) after the last level, up to `repeatCount` (0 to 9) more times.

Example: page the on-call chat at once, add the team lead after 15 minutes, and repeat every hour until someone acknowledges:

```json
{
  "name": "Storefront on-call",
  "repeatCount": 9,
  "repeatAfterMins": 60,
  "levels": [
    { "delayMins": 0, "targets": [{ "kind": "telegram_chat", "id": "<chat id>" }] },
    { "delayMins": 15, "targets": [{ "kind": "member", "id": "<user id>" }] }
  ]
}
```

## What stops it

- **Acknowledging** the incident stops every later level and repeat.
- **Recovery** closes the incident; the recovery message goes to every target the escalation reached, and to no one else.
- While the check is in MAINTENANCE or UNKNOWN, a step that comes due waits and goes out once the check is DOWN again. Nothing is skipped.

Every step is in the incident's timeline with its level and the names it reached.

## Editing

An incident follows the policy as it was when the incident opened. Editing or deleting a policy changes only incidents that open later. A policy in use by a project or a check cannot be deleted.

## The default policy

A new project gets its own policy named "Default": one level, repeated 9 times an hour apart. A channel added in the project, or a chat linked with its code, joins level 1 of that policy while no other project uses it.

## Who manages policies

Policies are built in the dashboard (**Settings → Escalation policies**) or through the API (`/api/v1/workspaces/{workspaceId}/escalation-policies`) by a workspace owner or admin. A project admin chooses the project's policy; an editor chooses a check's. The MCP tool `set_escalation_policy` chooses the policy of a project or a check.
