EvoHub Docs Sign in

On-Call API › Escalation policies

Update an escalation policy

Use with AI
View as MarkdownThis page as plain text, for pasting into an AI tool Open in ClaudeAsk Claude questions about this page Open in ChatGPTAsk ChatGPT questions about this page
Connect to Cursor / VS Code / ClaudeSearch and read these docs from your AI tool (MCP server)

MCP server URL

https://docs-dev.evohub.io/mcp

Claude Code

claude mcp add --transport http evohub-docs-docs https://docs-dev.evohub.io/mcp

Claude (claude.ai and Claude Desktop): Settings → Connectors → Add custom connector, and paste the URL above.

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://docs-dev.evohub.io/mcp"
      ]
    }
  }
}

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}

VS Code — .vscode/mcp.json

{
  "servers": {
    "evohub-docs-docs": {
      "type": "http",
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}
PUT/api/v1/escalation-policies/{id}

Changes the policy's settings and steps. A field left out keeps its value, and so do an empty name or team_id; any other field sent is written, description: "" included. steps left out keeps the steps; sent, it replaces the whole list. The repeat and ack-timeout rules below are checked on the policy as it will be after the change.

Rules for the policy and its steps:

  • At least one step. target_type is user, schedule, webhook or slack. A user step needs target_user_id, a schedule step target_schedule_id; a slack step (legacy) needs target_slack_channel_id.
  • delay_minutes (the wait before the step) is one of 1, 2, 3, 5, 10, 15, 30 or 60; only the first step may be 0, meaning at once.
  • attempts is 1–10 (0 or omitted means 1). With more than one attempt, attempt_delay_minutes is one of the same intervals.
  • notify_method is empty (each person's own notification preferences), push, call or email. SMS is not available for new steps; existing SMS steps can be kept when a policy is updated.
  • A user named by a step must be a member who can respond to alerts. A target_chat_channel_id must be one of the organization's Microsoft Teams channels.
  • With repeat_enabled, repeat_count is 1–5 and repeat_delay_minutes one of the intervals above.
  • ack_timeout_minutes is 0 (off) or 1–1440; when set, ack_timeout_repeat is 1–5 and ack_timeout_reach is others (default) or acker_first.

Permission (API-key scope): oncall:escalation:write.

Authorization

Any one of:

Parameters

Path parameters

  • id string required
    The escalation policy's id.
    Example: 3f8a0b2c-4d6e-4f8a-b1c3-d5e7f9a1b3c5

Request body required

Content type: application/json

Type: EscalationPolicyUpdate

Every field is optional; one left out keeps its value.

  • name string
    Max length: 100
  • description string
  • team_id string
  • repeat_enabled boolean
  • repeat_count integer
    Minimum: 0 · Maximum: 5
  • repeat_delay_minutes integer
  • ack_timeout_minutes integer
    Minimum: 0 · Maximum: 1440
  • ack_timeout_repeat integer
    Minimum: 0 · Maximum: 5
  • ack_timeout_reach string
    One of: others acker_first
  • steps array of EscalationStepWrite
    Min items: 1
    Show EscalationStepWrite properties
    • step_number integer
    • delay_minutes integer
      0 (first step only), 1, 2, 3, 5, 10, 15, 30 or 60.
    • target_type EscalationTargetType required
      One of: user schedule webhook slack
    • target_user_id string
    • target_schedule_id string
    • target_schedule_layer_id string
    • target_webhook_url string
    • target_slack_channel_id string
    • target_slack_channel_name string
      Only together with target_slack_channel_id.
    • target_chat_channel_id string
    • notify_method NotifyMethod
      One of: push call email sms
    • attempts integer
      1–10; 0 or omitted means 1.
      Minimum: 0 · Maximum: 10
    • attempt_delay_minutes integer
      Needed when attempts is more than 1.

Responses

200

The policy after the change.

Content type: application/json

Type: object

  • data EscalationPolicy required
    Show EscalationPolicy properties
    • id string
    • org_id string
    • team_id string
    • name string
    • description string
    • repeat_count integer
    • repeat_delay_minutes integer
    • repeat_enabled boolean
    • ack_timeout_minutes integer
      Escalate again when an acknowledged alert stays unresolved this long; 0 is off.
    • ack_timeout_repeat integer
      How many times that may happen per alert.
    • ack_timeout_reach string
      others goes past whoever acknowledged; acker_first reminds them once first. Empty means others.
      One of: others acker_first
    • steps array of EscalationStep
      Show EscalationStep properties
      • id string
      • policy_id string
      • step_number integer
      • delay_minutes integer
        Wait before this step.
      • target_type EscalationTargetType
        One of: user schedule webhook slack
      • target_user_id string
      • target_schedule_id string
      • target_schedule_layer_id string
        Page only this layer of the schedule.
      • target_webhook_url string
      • target_slack_channel_id string
        A Slack channel this step also posts to.
      • target_slack_channel_name string
      • target_chat_channel_id string
        A Microsoft Teams channel this step also posts to.
      • notify_method NotifyMethod
        One of: push call email sms
      • attempts integer
        How many times the step notifies before the policy moves on.
      • attempt_delay_minutes integer
      • created_at string (date-time)
      • updated_at string (date-time)
    • external_source string
    • external_id string
    • created_at string (date-time)
    • updated_at string (date-time)
  • success boolean required
    Value: true

400

The body is not JSON (INVALID_BODY), or a rule below is broken (VALIDATION_FAILED, the field is named in details).

Content type: application/json

Type: ValidationError

  • error object required
    • code string required
      Value: VALIDATION_FAILED
    • message string required
    • details array of object required
      • field string
      • message string

401

No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

403

The key lacks the scope (FORBIDDEN), or team_id names a team the caller is not in (NOT_IN_TEAM).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

404

No escalation policy with this id in your organization (NOT_FOUND).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

422

A step names a person who cannot respond to alerts (CANNOT_RESPOND), or asks for SMS (NOTIFY_METHOD_UNAVAILABLE).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

429

Too many requests (RATE_LIMITED). Wait Retry-After seconds.

Headers

  • Retry-After integer
    Seconds to wait.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

500

Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

503

Whether the person may be paged could not be checked right now; nothing was changed (MEMBER_CHECK_UNAVAILABLE). Retry shortly.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.

Example request

curl -X PUT 'https://evohub.io/api/v1/escalation-policies/3f8a0b2c-4d6e-4f8a-b1c3-d5e7f9a1b3c5' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
  "name": "Platform critical",
  "steps": [
    {
      "step_number": 1,
      "target_type": "schedule",
      "delay_minutes": 0,
      "target_schedule_id": "5b1c7d2e-8f3a-4b9c-a0d1-e2f3a4b5c6d7"
    }
  ],
  "repeat_enabled": false
}'

Last updated