Ionhour Docs

Escalation Policies API

Create and manage multi-step escalation policies for workspace-scoped incident routing.

Escalation policies define who gets notified, when, and through what channel when an incident occurs. Policies are workspace-scoped and evaluated in priority order.

Escalation policies replace the legacy escalation rules. See Escalation Policies for the full conceptual documentation.

Create Escalation Policy

POST /escalation-policies

Request Body

FieldTypeRequiredDescription
workspaceIdnumberYesWorkspace this policy belongs to
namestringYesHuman-readable name
prioritynumberYesEvaluation order (0 = highest). Must be unique per workspace.
projectIdsnumber[]NoProjects this policy applies to. null = catch-all.
ackTimeoutMinutesnumberNoRe-escalate if acknowledged but not resolved within this time. null = no timeout.
repeatCountnumberNoHow many times to repeat the escalation cycle (default: 0)
enabledbooleanNoWhether the policy is active (default: true)
stepsarrayYesEscalation steps (see below)

Step Object

FieldTypeRequiredDescription
positionnumberYesOrder within the policy (0-indexed)
delayMinutesnumberYesMinutes after incident creation to fire this step
targetsarrayYesNotification targets (see below)

Step Target Object

FieldTypeRequiredDescription
targetTypestringYesALERT_CHANNEL, USER, ON_CALL_SCHEDULE, or TEAM
alertChannelIdnumberConditionalRequired when targetType is ALERT_CHANNEL
targetUserIdnumberConditionalRequired when targetType is USER
targetScheduleIdnumberConditionalRequired when targetType is ON_CALL_SCHEDULE
targetTeamIdnumberConditionalRequired when targetType is TEAM

Example

curl -X POST https://api.ionhour.com/api/escalation-policies \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "workspaceId": 1,
    "name": "Production Escalation",
    "priority": 0,
    "projectIds": [1, 2],
    "ackTimeoutMinutes": 30,
    "repeatCount": 1,
    "steps": [
      {
        "position": 0,
        "delayMinutes": 0,
        "targets": [
          { "targetType": "ON_CALL_SCHEDULE", "targetScheduleId": 1 },
          { "targetType": "ALERT_CHANNEL", "alertChannelId": 3 }
        ]
      },
      {
        "position": 1,
        "delayMinutes": 5,
        "targets": [
          { "targetType": "TEAM", "targetTeamId": 1 }
        ]
      },
      {
        "position": 2,
        "delayMinutes": 15,
        "targets": [
          { "targetType": "ALERT_CHANNEL", "alertChannelId": 5 }
        ]
      }
    ]
  }'

List Escalation Policies

GET /escalation-policies

Query Parameters

ParameterTypeRequiredDescription
workspaceIdnumberYesFilter by workspace
curl -H "Authorization: Bearer ionh_your_key" \
  "https://api.ionhour.com/api/escalation-policies?workspaceId=1"

Get Escalation Policy

GET /escalation-policies/:id

Returns a single policy with its steps and targets.

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

Update Escalation Policy

PUT /escalation-policies/:id

Updates a policy. Include only fields you want to change. To update steps, send the full steps array — it replaces the existing steps.

curl -X PUT https://api.ionhour.com/api/escalation-policies/1 \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Policy", "ackTimeoutMinutes": 60}'

Delete Escalation Policy

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