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-rulesRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
projectId | number | Yes | Project to apply this rule to |
alertChannelId | number | Yes | Alert channel to notify when this rule triggers |
delayMinutes | number | Yes | Minutes to wait before escalating (minimum: 0) |
enabled | boolean | No | Whether 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-rulesReturns all escalation rules for a project, ordered by delay.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | number | Yes | Filter 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/:idReturns a single escalation rule, including the full alert channel object.
curl -H "Authorization: Bearer ionh_your_key" \
https://api.ionhour.com/api/escalation-rules/1Update Escalation Rule
PUT /escalation-rules/:idUpdates an escalation rule. All fields are optional -- only include fields you want to change.
| Field | Type | Description |
|---|---|---|
projectId | number | Move the rule to a different project |
alertChannelId | number | Change the alert channel |
delayMinutes | number | Update the escalation delay |
enabled | boolean | Enable 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/:idDeletes 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"