# Alert policies

> Alert policies endpoints of the StatusTick REST API: list alert policies, create an alert policy, get an alert policy, delete an alert policy.

## List alert policies

`GET /v1/alert-policies`

The Default policy first.

## Create an alert policy

`POST /v1/alert-policies`

Needs a `READ_WRITE` key from an owner or admin. Step 1 notifies its destinations at once; each later step pages on-call schedules or the owners after `delayMinutes` without an acknowledge. Destinations must be verified (`destination.not_verified.unprocessable` otherwise); failing ones are accepted and listed in `failingDestinationIds`.

## Get an alert policy

`GET /v1/alert-policies/{policyId}`

## Delete an alert policy

`DELETE /v1/alert-policies/{policyId}`

Needs a `READ_WRITE` key from an owner or admin. Its monitors go back to the Default policy, which cannot be deleted.

## Replace an alert policy

`PUT /v1/alert-policies/{policyId}`

Needs a `READ_WRITE` key from an owner or admin. Send the whole policy, as for create; `coolDownMinutes` and `groupRelated` left out keep their values.

## The alert policy of each monitor

`GET /v1/alert-policies/monitors`

## Put monitors on an alert policy

`PUT /v1/alert-policies/{policyId}/monitors`

Needs a `READ_WRITE` key. Choosing the Default policy clears the monitors' choice.
