Ionhour Docs

Escalation Rules API (Legacy)

Configure time-based escalation chains for incident alerts.

Escalation rules are a legacy feature. For new integrations, use Escalation Policies API which supports multi-target steps, on-call schedules, teams, ack timeouts, and repeat cycles.

Escalation rules define a time-based chain of alert notifications. When an incident is not acknowledged within a specified delay, Ionhour escalates the alert to the next channel in the chain. This ensures that critical incidents are always noticed.

Create Escalation Rule

POST /escalation-rules

Request Body

FieldTypeRequiredDescription
projectIdnumberYesProject to apply this rule to
alertChannelIdnumberYesAlert channel to notify when this rule triggers
delayMinutesnumberYesMinutes to wait before escalating (minimum: 0)
enabledbooleanNoWhether the rule is active (default: true)

A delayMinutes of 0 means the alert channel is notified immediately when an incident opens. Use increasing delay values to build an escalation chain (e.g., 0, 5, 15, 30).

The combination of projectId, alertChannelId, and delayMinutes must be unique. You cannot create two rules that escalate to the same channel at the same delay for the same project.

Example

curl -X POST https://api.ionhour.com/api/escalation-rules \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": 1,
    "alertChannelId": 3,
    "delayMinutes": 5,
    "enabled": true
  }'

Building an Escalation Chain

Create multiple rules with increasing delays to build a complete escalation policy:

# Immediately notify the on-call Slack channel
curl -X POST https://api.ionhour.com/api/escalation-rules \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{"projectId": 1, "alertChannelId": 1, "delayMinutes": 0}'

# After 5 minutes, email the engineering team
curl -X POST https://api.ionhour.com/api/escalation-rules \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{"projectId": 1, "alertChannelId": 2, "delayMinutes": 5}'

# After 15 minutes, page the engineering manager
curl -X POST https://api.ionhour.com/api/escalation-rules \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{"projectId": 1, "alertChannelId": 3, "delayMinutes": 15}'

List Escalation Rules

GET /escalation-rules

Returns all escalation rules for a project, ordered by delay.

Query Parameters

ParameterTypeRequiredDescription
projectIdnumberYesFilter by project

Example

curl -H "Authorization: Bearer ionh_your_key" \
  "https://api.ionhour.com/api/escalation-rules?projectId=1"

Response

[
  {
    "id": 1,
    "projectId": 1,
    "alertChannelId": 1,
    "alertChannel": {
      "id": 1,
      "name": "On-Call Slack",
      "type": "SLACK"
    },
    "delayMinutes": 0,
    "enabled": true
  },
  {
    "id": 2,
    "projectId": 1,
    "alertChannelId": 2,
    "alertChannel": {
      "id": 2,
      "name": "Engineering Team Email",
      "type": "EMAIL"
    },
    "delayMinutes": 5,
    "enabled": true
  }
]

Get Escalation Rule

GET /escalation-rules/:id

Returns a single escalation rule, including the full alert channel object.

curl -H "Authorization: Bearer ionh_your_key" \
  https://api.ionhour.com/api/escalation-rules/1

Update Escalation Rule

PUT /escalation-rules/:id

Updates an escalation rule. All fields are optional -- only include fields you want to change.

FieldTypeDescription
projectIdnumberMove the rule to a different project
alertChannelIdnumberChange the alert channel
delayMinutesnumberUpdate the escalation delay
enabledbooleanEnable or disable the rule
curl -X PUT https://api.ionhour.com/api/escalation-rules/1 \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{"delayMinutes": 10, "enabled": false}'

Delete Escalation Rule

DELETE /escalation-rules/:id

Deletes an escalation rule. Removing a rule from the middle of a chain does not affect other rules -- the remaining rules continue to trigger at their configured delays.

curl -X DELETE https://api.ionhour.com/api/escalation-rules/1 \
  -H "Authorization: Bearer ionh_your_key"