Create
Create an escalation path.
An escalation path is a series of steps that describe how a page should be escalated, represented as graph, supporting conditional branches based on alert priority and working intervals.
We recommend you create escalation paths in the incident.io dashboard where our path builder makes it easy to use conditions and visualise the path.
curl --request POST \
--url https://api.incident.io/v2/escalation_paths \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Urgent Support",
"path": [
{
"delay": {
"delay_interval_condition": "active",
"delay_seconds": 300,
"delay_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"if_else": {
"conditions": [
{
"operation": "one_of",
"param_bindings": [
{
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": "incident.severity"
}
],
"else_path": [
{}
],
"then_path": [
{}
]
},
"level": {
"ack_mode": "all",
"round_robin_config": {
"enabled": false,
"rotate_after_seconds": 120
},
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"notify_channel": {
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"repeat": {
"repeat_times": 3,
"to_node": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"type": "if_else"
}
],
"repeat_config": {
"delay_repeat_on_activity": false,
"repeat_after_seconds": 1800
},
"team_ids": [
"01JPQA75EPNEES4479P16P4XAB"
],
"working_hours": [
{
"id": "abc123",
"name": "abc123",
"timezone": "abc123",
"weekday_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
}
'import requests
url = "https://api.incident.io/v2/escalation_paths"
payload = {
"name": "Urgent Support",
"path": [
{
"delay": {
"delay_interval_condition": "active",
"delay_seconds": 300,
"delay_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"if_else": {
"conditions": [
{
"operation": "one_of",
"param_bindings": [
{
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": "incident.severity"
}
],
"else_path": [{}],
"then_path": [{}]
},
"level": {
"ack_mode": "all",
"round_robin_config": {
"enabled": False,
"rotate_after_seconds": 120
},
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"notify_channel": {
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"repeat": {
"repeat_times": 3,
"to_node": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"type": "if_else"
}
],
"repeat_config": {
"delay_repeat_on_activity": False,
"repeat_after_seconds": 1800
},
"team_ids": ["01JPQA75EPNEES4479P16P4XAB"],
"working_hours": [
{
"id": "abc123",
"name": "abc123",
"timezone": "abc123",
"weekday_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Urgent Support',
path: [
{
delay: {
delay_interval_condition: 'active',
delay_seconds: 300,
delay_weekday_interval_config_id: '01FCNDV6P870EA6S7TK1DSYDG0'
},
id: '01FCNDV6P870EA6S7TK1DSYDG0',
if_else: {
conditions: [
{
operation: 'one_of',
param_bindings: [
{
array_value: [{literal: 'SEV123', reference: 'incident.severity'}],
value: {literal: 'SEV123', reference: 'incident.severity'}
}
],
subject: 'incident.severity'
}
],
else_path: [{}],
then_path: [{}]
},
level: {
ack_mode: 'all',
round_robin_config: {enabled: false, rotate_after_seconds: 120},
targets: [
{
id: 'lawrencejones',
schedule_mode: 'currently_on_call',
selected_rota_id: '01FCNDV6P870EA6S7TK1DSYDG0',
type: 'schedule',
urgency: 'high'
}
],
time_to_ack_interval_condition: 'active',
time_to_ack_seconds: 1800,
time_to_ack_weekday_interval_config_id: '01FCNDV6P870EA6S7TK1DSYDG0'
},
notify_channel: {
targets: [
{
id: 'lawrencejones',
schedule_mode: 'currently_on_call',
selected_rota_id: '01FCNDV6P870EA6S7TK1DSYDG0',
type: 'schedule',
urgency: 'high'
}
],
time_to_ack_interval_condition: 'active',
time_to_ack_seconds: 1800,
time_to_ack_weekday_interval_config_id: '01FCNDV6P870EA6S7TK1DSYDG0'
},
repeat: {repeat_times: 3, to_node: '01FCNDV6P870EA6S7TK1DSYDG0'},
type: 'if_else'
}
],
repeat_config: {delay_repeat_on_activity: false, repeat_after_seconds: 1800},
team_ids: ['01JPQA75EPNEES4479P16P4XAB'],
working_hours: [
{
id: 'abc123',
name: 'abc123',
timezone: 'abc123',
weekday_intervals: [{end_time: '17:00', start_time: '09:00', weekday: 'monday'}]
}
]
})
};
fetch('https://api.incident.io/v2/escalation_paths', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v2/escalation_paths",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Urgent Support',
'path' => [
[
'delay' => [
'delay_interval_condition' => 'active',
'delay_seconds' => 300,
'delay_weekday_interval_config_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'if_else' => [
'conditions' => [
[
'operation' => 'one_of',
'param_bindings' => [
[
'array_value' => [
[
'literal' => 'SEV123',
'reference' => 'incident.severity'
]
],
'value' => [
'literal' => 'SEV123',
'reference' => 'incident.severity'
]
]
],
'subject' => 'incident.severity'
]
],
'else_path' => [
[
]
],
'then_path' => [
[
]
]
],
'level' => [
'ack_mode' => 'all',
'round_robin_config' => [
'enabled' => false,
'rotate_after_seconds' => 120
],
'targets' => [
[
'id' => 'lawrencejones',
'schedule_mode' => 'currently_on_call',
'selected_rota_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'type' => 'schedule',
'urgency' => 'high'
]
],
'time_to_ack_interval_condition' => 'active',
'time_to_ack_seconds' => 1800,
'time_to_ack_weekday_interval_config_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'notify_channel' => [
'targets' => [
[
'id' => 'lawrencejones',
'schedule_mode' => 'currently_on_call',
'selected_rota_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'type' => 'schedule',
'urgency' => 'high'
]
],
'time_to_ack_interval_condition' => 'active',
'time_to_ack_seconds' => 1800,
'time_to_ack_weekday_interval_config_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'repeat' => [
'repeat_times' => 3,
'to_node' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'type' => 'if_else'
]
],
'repeat_config' => [
'delay_repeat_on_activity' => false,
'repeat_after_seconds' => 1800
],
'team_ids' => [
'01JPQA75EPNEES4479P16P4XAB'
],
'working_hours' => [
[
'id' => 'abc123',
'name' => 'abc123',
'timezone' => 'abc123',
'weekday_intervals' => [
[
'end_time' => '17:00',
'start_time' => '09:00',
'weekday' => 'monday'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.incident.io/v2/escalation_paths"
payload := strings.NewReader("{\n \"name\": \"Urgent Support\",\n \"path\": [\n {\n \"delay\": {\n \"delay_interval_condition\": \"active\",\n \"delay_seconds\": 300,\n \"delay_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"if_else\": {\n \"conditions\": [\n {\n \"operation\": \"one_of\",\n \"param_bindings\": [\n {\n \"array_value\": [\n {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n }\n ],\n \"subject\": \"incident.severity\"\n }\n ],\n \"else_path\": [\n {}\n ],\n \"then_path\": [\n {}\n ]\n },\n \"level\": {\n \"ack_mode\": \"all\",\n \"round_robin_config\": {\n \"enabled\": false,\n \"rotate_after_seconds\": 120\n },\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"notify_channel\": {\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"repeat\": {\n \"repeat_times\": 3,\n \"to_node\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"type\": \"if_else\"\n }\n ],\n \"repeat_config\": {\n \"delay_repeat_on_activity\": false,\n \"repeat_after_seconds\": 1800\n },\n \"team_ids\": [\n \"01JPQA75EPNEES4479P16P4XAB\"\n ],\n \"working_hours\": [\n {\n \"id\": \"abc123\",\n \"name\": \"abc123\",\n \"timezone\": \"abc123\",\n \"weekday_intervals\": [\n {\n \"end_time\": \"17:00\",\n \"start_time\": \"09:00\",\n \"weekday\": \"monday\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.incident.io/v2/escalation_paths")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Urgent Support\",\n \"path\": [\n {\n \"delay\": {\n \"delay_interval_condition\": \"active\",\n \"delay_seconds\": 300,\n \"delay_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"if_else\": {\n \"conditions\": [\n {\n \"operation\": \"one_of\",\n \"param_bindings\": [\n {\n \"array_value\": [\n {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n }\n ],\n \"subject\": \"incident.severity\"\n }\n ],\n \"else_path\": [\n {}\n ],\n \"then_path\": [\n {}\n ]\n },\n \"level\": {\n \"ack_mode\": \"all\",\n \"round_robin_config\": {\n \"enabled\": false,\n \"rotate_after_seconds\": 120\n },\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"notify_channel\": {\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"repeat\": {\n \"repeat_times\": 3,\n \"to_node\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"type\": \"if_else\"\n }\n ],\n \"repeat_config\": {\n \"delay_repeat_on_activity\": false,\n \"repeat_after_seconds\": 1800\n },\n \"team_ids\": [\n \"01JPQA75EPNEES4479P16P4XAB\"\n ],\n \"working_hours\": [\n {\n \"id\": \"abc123\",\n \"name\": \"abc123\",\n \"timezone\": \"abc123\",\n \"weekday_intervals\": [\n {\n \"end_time\": \"17:00\",\n \"start_time\": \"09:00\",\n \"weekday\": \"monday\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/escalation_paths")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Urgent Support\",\n \"path\": [\n {\n \"delay\": {\n \"delay_interval_condition\": \"active\",\n \"delay_seconds\": 300,\n \"delay_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"if_else\": {\n \"conditions\": [\n {\n \"operation\": \"one_of\",\n \"param_bindings\": [\n {\n \"array_value\": [\n {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n }\n ],\n \"subject\": \"incident.severity\"\n }\n ],\n \"else_path\": [\n {}\n ],\n \"then_path\": [\n {}\n ]\n },\n \"level\": {\n \"ack_mode\": \"all\",\n \"round_robin_config\": {\n \"enabled\": false,\n \"rotate_after_seconds\": 120\n },\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"notify_channel\": {\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"repeat\": {\n \"repeat_times\": 3,\n \"to_node\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"type\": \"if_else\"\n }\n ],\n \"repeat_config\": {\n \"delay_repeat_on_activity\": false,\n \"repeat_after_seconds\": 1800\n },\n \"team_ids\": [\n \"01JPQA75EPNEES4479P16P4XAB\"\n ],\n \"working_hours\": [\n {\n \"id\": \"abc123\",\n \"name\": \"abc123\",\n \"timezone\": \"abc123\",\n \"weekday_intervals\": [\n {\n \"end_time\": \"17:00\",\n \"start_time\": \"09:00\",\n \"weekday\": \"monday\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"escalation_path": {
"current_responders": [
{
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "owner",
"slack_user_id": "U02AYNF2XJM"
}
],
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Urgent Support",
"path": [
{
"delay": {
"delay_interval_condition": "active",
"delay_seconds": 300,
"delay_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"if_else": {
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
],
"else_path": [
{}
],
"then_path": [
{}
]
},
"level": {
"ack_mode": "all",
"round_robin_config": {
"enabled": false,
"rotate_after_seconds": 120
},
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"notify_channel": {
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"repeat": {
"repeat_times": 3,
"to_node": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"type": "if_else"
}
],
"repeat_config": {
"delay_repeat_on_activity": false,
"repeat_after_seconds": 1800
},
"team_ids": [
"01JPQA75EPNEES4479P16P4XAB"
],
"working_hours": [
{
"id": "abc123",
"name": "abc123",
"timezone": "abc123",
"weekday_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
}
}Authorizations
API key from your incident.io dashboard (Settings → API keys)
Body
The name of this escalation path, for the user's reference.
"Urgent Support"
The nodes that form the levels and branches of this escalation path.
Show child attributes
Show child attributes
[
{
"delay": {
"delay_interval_condition": "active",
"delay_seconds": 300,
"delay_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"if_else": {
"conditions": [
{
"operation": "one_of",
"param_bindings": [
{
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": "incident.severity"
}
],
"else_path": [{}],
"then_path": [{}]
},
"level": {
"ack_mode": "all",
"round_robin_config": {
"enabled": false,
"rotate_after_seconds": 120
},
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"notify_channel": {
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"repeat": {
"repeat_times": 3,
"to_node": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"type": "if_else"
}
]
Show child attributes
Show child attributes
{
"delay_repeat_on_activity": false,
"repeat_after_seconds": 1800
}
IDs of the teams that own this escalation path. This will automatically sync escalation paths with the right teams in Catalog. If you have an escalation paths attribute on your Teams, this attribute is required.
["01JPQA75EPNEES4479P16P4XAB"]
The working hours for this escalation path.
Show child attributes
Show child attributes
[
{
"id": "abc123",
"name": "abc123",
"timezone": "abc123",
"weekday_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
Response
Created response.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.incident.io/v2/escalation_paths \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Urgent Support",
"path": [
{
"delay": {
"delay_interval_condition": "active",
"delay_seconds": 300,
"delay_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"if_else": {
"conditions": [
{
"operation": "one_of",
"param_bindings": [
{
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": "incident.severity"
}
],
"else_path": [
{}
],
"then_path": [
{}
]
},
"level": {
"ack_mode": "all",
"round_robin_config": {
"enabled": false,
"rotate_after_seconds": 120
},
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"notify_channel": {
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"repeat": {
"repeat_times": 3,
"to_node": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"type": "if_else"
}
],
"repeat_config": {
"delay_repeat_on_activity": false,
"repeat_after_seconds": 1800
},
"team_ids": [
"01JPQA75EPNEES4479P16P4XAB"
],
"working_hours": [
{
"id": "abc123",
"name": "abc123",
"timezone": "abc123",
"weekday_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
}
'import requests
url = "https://api.incident.io/v2/escalation_paths"
payload = {
"name": "Urgent Support",
"path": [
{
"delay": {
"delay_interval_condition": "active",
"delay_seconds": 300,
"delay_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"if_else": {
"conditions": [
{
"operation": "one_of",
"param_bindings": [
{
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": "incident.severity"
}
],
"else_path": [{}],
"then_path": [{}]
},
"level": {
"ack_mode": "all",
"round_robin_config": {
"enabled": False,
"rotate_after_seconds": 120
},
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"notify_channel": {
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"repeat": {
"repeat_times": 3,
"to_node": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"type": "if_else"
}
],
"repeat_config": {
"delay_repeat_on_activity": False,
"repeat_after_seconds": 1800
},
"team_ids": ["01JPQA75EPNEES4479P16P4XAB"],
"working_hours": [
{
"id": "abc123",
"name": "abc123",
"timezone": "abc123",
"weekday_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Urgent Support',
path: [
{
delay: {
delay_interval_condition: 'active',
delay_seconds: 300,
delay_weekday_interval_config_id: '01FCNDV6P870EA6S7TK1DSYDG0'
},
id: '01FCNDV6P870EA6S7TK1DSYDG0',
if_else: {
conditions: [
{
operation: 'one_of',
param_bindings: [
{
array_value: [{literal: 'SEV123', reference: 'incident.severity'}],
value: {literal: 'SEV123', reference: 'incident.severity'}
}
],
subject: 'incident.severity'
}
],
else_path: [{}],
then_path: [{}]
},
level: {
ack_mode: 'all',
round_robin_config: {enabled: false, rotate_after_seconds: 120},
targets: [
{
id: 'lawrencejones',
schedule_mode: 'currently_on_call',
selected_rota_id: '01FCNDV6P870EA6S7TK1DSYDG0',
type: 'schedule',
urgency: 'high'
}
],
time_to_ack_interval_condition: 'active',
time_to_ack_seconds: 1800,
time_to_ack_weekday_interval_config_id: '01FCNDV6P870EA6S7TK1DSYDG0'
},
notify_channel: {
targets: [
{
id: 'lawrencejones',
schedule_mode: 'currently_on_call',
selected_rota_id: '01FCNDV6P870EA6S7TK1DSYDG0',
type: 'schedule',
urgency: 'high'
}
],
time_to_ack_interval_condition: 'active',
time_to_ack_seconds: 1800,
time_to_ack_weekday_interval_config_id: '01FCNDV6P870EA6S7TK1DSYDG0'
},
repeat: {repeat_times: 3, to_node: '01FCNDV6P870EA6S7TK1DSYDG0'},
type: 'if_else'
}
],
repeat_config: {delay_repeat_on_activity: false, repeat_after_seconds: 1800},
team_ids: ['01JPQA75EPNEES4479P16P4XAB'],
working_hours: [
{
id: 'abc123',
name: 'abc123',
timezone: 'abc123',
weekday_intervals: [{end_time: '17:00', start_time: '09:00', weekday: 'monday'}]
}
]
})
};
fetch('https://api.incident.io/v2/escalation_paths', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v2/escalation_paths",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Urgent Support',
'path' => [
[
'delay' => [
'delay_interval_condition' => 'active',
'delay_seconds' => 300,
'delay_weekday_interval_config_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'if_else' => [
'conditions' => [
[
'operation' => 'one_of',
'param_bindings' => [
[
'array_value' => [
[
'literal' => 'SEV123',
'reference' => 'incident.severity'
]
],
'value' => [
'literal' => 'SEV123',
'reference' => 'incident.severity'
]
]
],
'subject' => 'incident.severity'
]
],
'else_path' => [
[
]
],
'then_path' => [
[
]
]
],
'level' => [
'ack_mode' => 'all',
'round_robin_config' => [
'enabled' => false,
'rotate_after_seconds' => 120
],
'targets' => [
[
'id' => 'lawrencejones',
'schedule_mode' => 'currently_on_call',
'selected_rota_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'type' => 'schedule',
'urgency' => 'high'
]
],
'time_to_ack_interval_condition' => 'active',
'time_to_ack_seconds' => 1800,
'time_to_ack_weekday_interval_config_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'notify_channel' => [
'targets' => [
[
'id' => 'lawrencejones',
'schedule_mode' => 'currently_on_call',
'selected_rota_id' => '01FCNDV6P870EA6S7TK1DSYDG0',
'type' => 'schedule',
'urgency' => 'high'
]
],
'time_to_ack_interval_condition' => 'active',
'time_to_ack_seconds' => 1800,
'time_to_ack_weekday_interval_config_id' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'repeat' => [
'repeat_times' => 3,
'to_node' => '01FCNDV6P870EA6S7TK1DSYDG0'
],
'type' => 'if_else'
]
],
'repeat_config' => [
'delay_repeat_on_activity' => false,
'repeat_after_seconds' => 1800
],
'team_ids' => [
'01JPQA75EPNEES4479P16P4XAB'
],
'working_hours' => [
[
'id' => 'abc123',
'name' => 'abc123',
'timezone' => 'abc123',
'weekday_intervals' => [
[
'end_time' => '17:00',
'start_time' => '09:00',
'weekday' => 'monday'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.incident.io/v2/escalation_paths"
payload := strings.NewReader("{\n \"name\": \"Urgent Support\",\n \"path\": [\n {\n \"delay\": {\n \"delay_interval_condition\": \"active\",\n \"delay_seconds\": 300,\n \"delay_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"if_else\": {\n \"conditions\": [\n {\n \"operation\": \"one_of\",\n \"param_bindings\": [\n {\n \"array_value\": [\n {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n }\n ],\n \"subject\": \"incident.severity\"\n }\n ],\n \"else_path\": [\n {}\n ],\n \"then_path\": [\n {}\n ]\n },\n \"level\": {\n \"ack_mode\": \"all\",\n \"round_robin_config\": {\n \"enabled\": false,\n \"rotate_after_seconds\": 120\n },\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"notify_channel\": {\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"repeat\": {\n \"repeat_times\": 3,\n \"to_node\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"type\": \"if_else\"\n }\n ],\n \"repeat_config\": {\n \"delay_repeat_on_activity\": false,\n \"repeat_after_seconds\": 1800\n },\n \"team_ids\": [\n \"01JPQA75EPNEES4479P16P4XAB\"\n ],\n \"working_hours\": [\n {\n \"id\": \"abc123\",\n \"name\": \"abc123\",\n \"timezone\": \"abc123\",\n \"weekday_intervals\": [\n {\n \"end_time\": \"17:00\",\n \"start_time\": \"09:00\",\n \"weekday\": \"monday\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.incident.io/v2/escalation_paths")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Urgent Support\",\n \"path\": [\n {\n \"delay\": {\n \"delay_interval_condition\": \"active\",\n \"delay_seconds\": 300,\n \"delay_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"if_else\": {\n \"conditions\": [\n {\n \"operation\": \"one_of\",\n \"param_bindings\": [\n {\n \"array_value\": [\n {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n }\n ],\n \"subject\": \"incident.severity\"\n }\n ],\n \"else_path\": [\n {}\n ],\n \"then_path\": [\n {}\n ]\n },\n \"level\": {\n \"ack_mode\": \"all\",\n \"round_robin_config\": {\n \"enabled\": false,\n \"rotate_after_seconds\": 120\n },\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"notify_channel\": {\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"repeat\": {\n \"repeat_times\": 3,\n \"to_node\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"type\": \"if_else\"\n }\n ],\n \"repeat_config\": {\n \"delay_repeat_on_activity\": false,\n \"repeat_after_seconds\": 1800\n },\n \"team_ids\": [\n \"01JPQA75EPNEES4479P16P4XAB\"\n ],\n \"working_hours\": [\n {\n \"id\": \"abc123\",\n \"name\": \"abc123\",\n \"timezone\": \"abc123\",\n \"weekday_intervals\": [\n {\n \"end_time\": \"17:00\",\n \"start_time\": \"09:00\",\n \"weekday\": \"monday\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/escalation_paths")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Urgent Support\",\n \"path\": [\n {\n \"delay\": {\n \"delay_interval_condition\": \"active\",\n \"delay_seconds\": 300,\n \"delay_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"if_else\": {\n \"conditions\": [\n {\n \"operation\": \"one_of\",\n \"param_bindings\": [\n {\n \"array_value\": [\n {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n ],\n \"value\": {\n \"literal\": \"SEV123\",\n \"reference\": \"incident.severity\"\n }\n }\n ],\n \"subject\": \"incident.severity\"\n }\n ],\n \"else_path\": [\n {}\n ],\n \"then_path\": [\n {}\n ]\n },\n \"level\": {\n \"ack_mode\": \"all\",\n \"round_robin_config\": {\n \"enabled\": false,\n \"rotate_after_seconds\": 120\n },\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"notify_channel\": {\n \"targets\": [\n {\n \"id\": \"lawrencejones\",\n \"schedule_mode\": \"currently_on_call\",\n \"selected_rota_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n \"type\": \"schedule\",\n \"urgency\": \"high\"\n }\n ],\n \"time_to_ack_interval_condition\": \"active\",\n \"time_to_ack_seconds\": 1800,\n \"time_to_ack_weekday_interval_config_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"repeat\": {\n \"repeat_times\": 3,\n \"to_node\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n },\n \"type\": \"if_else\"\n }\n ],\n \"repeat_config\": {\n \"delay_repeat_on_activity\": false,\n \"repeat_after_seconds\": 1800\n },\n \"team_ids\": [\n \"01JPQA75EPNEES4479P16P4XAB\"\n ],\n \"working_hours\": [\n {\n \"id\": \"abc123\",\n \"name\": \"abc123\",\n \"timezone\": \"abc123\",\n \"weekday_intervals\": [\n {\n \"end_time\": \"17:00\",\n \"start_time\": \"09:00\",\n \"weekday\": \"monday\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"escalation_path": {
"current_responders": [
{
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "owner",
"slack_user_id": "U02AYNF2XJM"
}
],
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Urgent Support",
"path": [
{
"delay": {
"delay_interval_condition": "active",
"delay_seconds": 300,
"delay_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"if_else": {
"conditions": [
{
"operation": {
"label": "Lawrence Jones",
"value": "01FCQSP07Z74QMMYPDDGQB9FTG"
},
"param_bindings": [
{
"array_value": [
{
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"label": "Lawrence Jones",
"literal": "SEV123",
"reference": "incident.severity"
}
}
],
"subject": {
"label": "Incident Severity",
"reference": "incident.severity"
}
}
],
"else_path": [
{}
],
"then_path": [
{}
]
},
"level": {
"ack_mode": "all",
"round_robin_config": {
"enabled": false,
"rotate_after_seconds": 120
},
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"notify_channel": {
"targets": [
{
"id": "lawrencejones",
"schedule_mode": "currently_on_call",
"selected_rota_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"type": "schedule",
"urgency": "high"
}
],
"time_to_ack_interval_condition": "active",
"time_to_ack_seconds": 1800,
"time_to_ack_weekday_interval_config_id": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"repeat": {
"repeat_times": 3,
"to_node": "01FCNDV6P870EA6S7TK1DSYDG0"
},
"type": "if_else"
}
],
"repeat_config": {
"delay_repeat_on_activity": false,
"repeat_after_seconds": 1800
},
"team_ids": [
"01JPQA75EPNEES4479P16P4XAB"
],
"working_hours": [
{
"id": "abc123",
"name": "abc123",
"timezone": "abc123",
"weekday_intervals": [
{
"end_time": "17:00",
"start_time": "09:00",
"weekday": "monday"
}
]
}
]
}
}