{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/victorops/json-schema/victorops-escalation-policy-schema.json",
  "title": "EscalationPolicy",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/victorops-openapi.yml#/components/schemas/EscalationPolicy",
  "type": "object",
  "required": [
    "name",
    "slug",
    "ignoreCustomPagingPolicies",
    "steps"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of this escalation policy"
    },
    "slug": {
      "type": "string",
      "description": "A unique identifier for this escalation polcy\n\nThis slug is in the format `pol-[\\w\\d]{16}`"
    },
    "ignoreCustomPagingPolicies": {
      "type": "boolean",
      "description": "True if this policy ignores a user's custom paging policy; this will page the on-call user via their Primary Paging Policy and ignore any custom paging policies they have set. We recommend enabling this if the escalation policy handles high severity incidents."
    },
    "steps": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EscalationPolicyGroup"
      },
      "description": "A list of groupings of entries. Each group is a \"step\" in the escalation policy. Each \"step\" contains a group of entries to be executed."
    }
  },
  "$defs": {
    "EscalationPolicyEntry": {
      "type": "object",
      "description": "This is an entry containing only ONE of the available execution types.\n\nIf the executionType provided is one of [rotation_group, rotation_group_next, rotation_group_previous] then only the rotation group object will be provided in the body.\n\nIf the executionType provided is [webhook] then only the webhook object will be provided in the body.\n\nIf the executionType provided is [user] then only the user object will be provided in the body.\n\nIf the executionType provided is [email] the nonly the email object object will be provided in the body.\n\nIf the executionType provided is [policy_routing] then only the target policy object will be provided in the body.",
      "required": [
        "executionType"
      ],
      "properties": {
        "executionType": {
          "type": "string",
          "enum": [
            "rotation_group",
            "rotation_group_next",
            "rotation_group_previous",
            "webhook",
            "user",
            "email",
            "policy_routing"
          ],
          "description": "The type of entry"
        },
        "rotationGroup": {
          "type": "object",
          "title": "rotationGroup",
          "properties": {
            "slug": {
              "type": "string",
              "description": "The unique identifier for the rotation group that will be executed when this escalation policy step activates.\n\nThe slug is in the format `rtg-[\\w\\d]{16}`\n\nTo get more information about this rotation group, you can use the endpoints available in the Rotation Groups section"
            },
            "label": {
              "type": "string",
              "description": "The name of the rotation group"
            }
          }
        },
        "webhook": {
          "type": "object",
          "title": "webhook",
          "properties": {
            "slug": {
              "type": "string",
              "description": "The unique identifier for the webhook that will be executed when this escalation policy step activates\n\nThe slug is in the format `wh-[\\w\\d]{16}`\n\nTo get more information about this webhook, you can use the endpoints available in the Webhooks section"
            },
            "label": {
              "type": "string",
              "description": "The name of the webhook"
            }
          }
        },
        "user": {
          "type": "object",
          "title": "user",
          "properties": {
            "username": {
              "type": "string",
              "description": "The unique identifier for the user. This user will be notified when the escalation policy step activates."
            },
            "firstName": {
              "type": "string",
              "description": "The user's first name"
            },
            "lastName": {
              "type": "string",
              "description": "The user's last name"
            }
          }
        },
        "email": {
          "type": "object",
          "title": "email",
          "properties": {
            "address": {
              "type": "string",
              "description": "The email address that will be notified when this escalation policy step activates."
            }
          }
        },
        "targetPolicy": {
          "type": "object",
          "title": "targetPolicy",
          "description": "The escalation policy to target when executing",
          "properties": {
            "policySlug": {
              "type": "string",
              "description": "The unique slug of another escalation policy that will be executed when this escalation policy step activates.\n\nThe policy slug is in the format `pol-[\\w\\d]{16}`"
            }
          }
        }
      }
    },
    "EscalationPolicyGroup": {
      "type": "object",
      "required": [
        "timeout",
        "entries"
      ],
      "properties": {
        "timeout": {
          "type": "integer",
          "description": "The duration in minutes to wait until executing this step since the last step was executed.\n\nThis value may be 0. This implies that this policy step should immediately execute."
        },
        "entries": {
          "type": "array",
          "description": "A list of entries that this escalation policy group encapsulates. These entries will all be executed once the escalation policy reaches this step.",
          "items": {
            "$ref": "#/$defs/EscalationPolicyEntry"
          }
        }
      }
    }
  }
}