Skip to content
Uptizm
Start free
Sign in

Language

Menu
View as Markdown

API reference

Escalation

Escalation policies and their paging steps.

GET /escalation-policies oncall:read #

List escalation policies

The team's escalation policies, newest first, cursor-paginated.

Parameters

NameInTypeRequiredDescription
per_pagequeryinteger, min 1, max 200NoPage size, clamped to 1 and the endpoint's maximum (200 on most lists).
cursorquerystringNoThe meta.next_cursor of the previous page.

Response 200 application/json

  • data array of EscalationPolicyResource required
    • id string required
    • team_id string required
    • name string required
    • repeat_last_step boolean required

      Emitted on every read, list included: the editor seeds both switches from the roster it already holds, so gating these behind the detail response would make an edit form open with the flags off and then silently save them off.

    • is_default boolean required
    • steps array of string
    • created_at string or null required
    • updated_at string or null required
  • links object required
    • first string or null required
    • last string or null required
    • prev string or null required
    • next string or null required
  • meta object required
    • path string or null required

      Base path for paginator generated URLs.

    • per_page integer, min 0 required

      Number of items shown per page.

    • next_cursor string or null required

      The "cursor" that points to the next set of items.

    • prev_cursor string or null required

      The "cursor" that points to the previous set of items.

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X GET "https://api.uptizm.com/v1/escalation-policies" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json"
const response = await fetch('https://api.uptizm.com/v1/escalation-policies', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
  },
});

const data = await response.json();
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies');

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
    ],
]);

$response = curl_exec($curl);
import os

import requests

response = requests.get(
    "https://api.uptizm.com/v1/escalation-policies",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
    },
)

print(response.json())
POST /escalation-policies oncall:write #

Create an escalation policy

Creates a policy.

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringNoAny unique string per logical request.

Request body application/json

  • name string, max length 200 required
  • repeat_last_step boolean

    Both are optional and both default to false in the schema, so a client that predates them (or simply omits them) creates exactly the policy it created before.

  • is_default boolean

Response 201 application/json

  • data EscalationPolicyResource required
    • id string required
    • team_id string required
    • name string required
    • repeat_last_step boolean required

      Emitted on every read, list included: the editor seeds both switches from the roster it already holds, so gating these behind the detail response would make an edit form open with the flags off and then silently save them off.

    • is_default boolean required
    • steps array of string
    • created_at string or null required
    • updated_at string or null required

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 422 Validation error
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X POST "https://api.uptizm.com/v1/escalation-policies" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "name": "string"
}'
const payload = {
    "name": "string"
};

const response = await fetch('https://api.uptizm.com/v1/escalation-policies', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify(payload),
});

const data = await response.json();
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies');

$payload = <<<'JSON'
{
    "name": "string"
}
JSON;

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
        'Content-Type: application/json',
        'Idempotency-Key: '.uniqid('', true),
    ],
    CURLOPT_POSTFIELDS => $payload,
]);

$response = curl_exec($curl);
import os
import uuid

import requests

response = requests.post(
    "https://api.uptizm.com/v1/escalation-policies",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    data=r'''{
    "name": "string"
}''',
)

print(response.json())
GET /escalation-policies/{policy} oncall:read #

Get an escalation policy

One policy with its ordered steps.

Parameters

NameInTypeRequiredDescription
policypathstringYesThe policy ID

Response 200 application/json

  • data EscalationPolicyResource and object required
    • id string required
    • team_id string required
    • name string required
    • repeat_last_step boolean required

      Emitted on every read, list included: the editor seeds both switches from the roster it already holds, so gating these behind the detail response would make an edit form open with the flags off and then silently save them off.

    • is_default boolean required
    • steps array of string required
    • created_at string or null required
    • updated_at string or null required

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 404 Not found
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X GET "https://api.uptizm.com/v1/escalation-policies/POLICY" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json"
const response = await fetch('https://api.uptizm.com/v1/escalation-policies/POLICY', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
  },
});

const data = await response.json();
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies/POLICY');

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
    ],
]);

$response = curl_exec($curl);
import os

import requests

response = requests.get(
    "https://api.uptizm.com/v1/escalation-policies/POLICY",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
    },
)

print(response.json())
PUT /escalation-policies/{policy} oncall:write #

Update an escalation policy

Updates the policy.

Parameters

NameInTypeRequiredDescription
policypathstringYesThe policy ID

Request body application/json

  • name string, max length 200
  • repeat_last_step boolean

    Omitting either leaves it as it was: this is a PATCH-shaped update, so an editor that only renames a policy must not silently clear its paging flags.

  • is_default boolean

Response 200 application/json

  • data EscalationPolicyResource and object required
    • id string required
    • team_id string required
    • name string required
    • repeat_last_step boolean required

      Emitted on every read, list included: the editor seeds both switches from the roster it already holds, so gating these behind the detail response would make an edit form open with the flags off and then silently save them off.

    • is_default boolean required
    • steps array of string required
    • created_at string or null required
    • updated_at string or null required

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 404 Not found
  • 422 Validation error
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X PUT "https://api.uptizm.com/v1/escalation-policies/POLICY" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{}'
const payload = {};

const response = await fetch('https://api.uptizm.com/v1/escalation-policies/POLICY', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
});

const data = await response.json();
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies/POLICY');

$payload = <<<'JSON'
{}
JSON;

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $payload,
]);

$response = curl_exec($curl);
import os

import requests

response = requests.put(
    "https://api.uptizm.com/v1/escalation-policies/POLICY",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    data=r'''{}''',
)

print(response.json())
DELETE /escalation-policies/{policy} oncall:write #

Delete an escalation policy

Deletes the policy.

Parameters

NameInTypeRequiredDescription
policypathstringYesThe policy ID

Response 204

No body.

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 404 Not found
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X DELETE "https://api.uptizm.com/v1/escalation-policies/POLICY" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json"
const response = await fetch('https://api.uptizm.com/v1/escalation-policies/POLICY', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
  },
});

console.log(response.status);
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies/POLICY');

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
    ],
]);

$response = curl_exec($curl);
import os

import requests

response = requests.delete(
    "https://api.uptizm.com/v1/escalation-policies/POLICY",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
    },
)

print(response.status_code)
POST /escalation-policies/{policy}/steps oncall:write #

Add an escalation step

Adds a step to the policy's paging chain.

Parameters

NameInTypeRequiredDescription
policypathstringYesThe policy ID
Idempotency-KeyheaderstringNoAny unique string per logical request.

Request body application/json

  • position integer, min 0 required
  • delay_minutes integer, min 0 required
  • target_type EscalationTargetType: string, one of "on_call", "user" required

    Who an escalation step pages: the on-call responder (on_call) or a user (user).

  • target_id string or null, uuid

Response 201 application/json

  • data EscalationPolicyResource and object required
    • id string required
    • team_id string required
    • name string required
    • repeat_last_step boolean required

      Emitted on every read, list included: the editor seeds both switches from the roster it already holds, so gating these behind the detail response would make an edit form open with the flags off and then silently save them off.

    • is_default boolean required
    • steps array of string required
    • created_at string or null required
    • updated_at string or null required

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 404 Not found
  • 422 Validation error
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X POST "https://api.uptizm.com/v1/escalation-policies/POLICY/steps" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "position": 0,
    "delay_minutes": 0,
    "target_type": "on_call"
}'
const payload = {
    "position": 0,
    "delay_minutes": 0,
    "target_type": "on_call"
};

const response = await fetch('https://api.uptizm.com/v1/escalation-policies/POLICY/steps', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify(payload),
});

const data = await response.json();
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies/POLICY/steps');

$payload = <<<'JSON'
{
    "position": 0,
    "delay_minutes": 0,
    "target_type": "on_call"
}
JSON;

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
        'Content-Type: application/json',
        'Idempotency-Key: '.uniqid('', true),
    ],
    CURLOPT_POSTFIELDS => $payload,
]);

$response = curl_exec($curl);
import os
import uuid

import requests

response = requests.post(
    "https://api.uptizm.com/v1/escalation-policies/POLICY/steps",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    data=r'''{
    "position": 0,
    "delay_minutes": 0,
    "target_type": "on_call"
}''',
)

print(response.json())
PATCH /escalation-policies/{policy}/steps/reorder oncall:write #

Reorder escalation steps

Sets position for the policy's steps.

Parameters

NameInTypeRequiredDescription
policypathstringYesThe policy ID

Request body application/json

  • order array of object required
    • id string required
    • position integer, min 0 required

Response 204

No body.

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 404 Not found
  • 422 Validation error
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X PATCH "https://api.uptizm.com/v1/escalation-policies/POLICY/steps/reorder" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "order": [
        {
            "id": "string",
            "position": 0
        }
    ]
}'
const payload = {
    "order": [
        {
            "id": "string",
            "position": 0
        }
    ]
};

const response = await fetch('https://api.uptizm.com/v1/escalation-policies/POLICY/steps/reorder', {
  method: 'PATCH',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
});

console.log(response.status);
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies/POLICY/steps/reorder');

$payload = <<<'JSON'
{
    "order": [
        {
            "id": "string",
            "position": 0
        }
    ]
}
JSON;

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $payload,
]);

$response = curl_exec($curl);
import os

import requests

response = requests.patch(
    "https://api.uptizm.com/v1/escalation-policies/POLICY/steps/reorder",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    data=r'''{
    "order": [
        {
            "id": "string",
            "position": 0
        }
    ]
}''',
)

print(response.status_code)
DELETE /escalation-policies/{policy}/steps/{step} oncall:write #

Remove an escalation step

Removes a step from the policy.

Parameters

NameInTypeRequiredDescription
policypathstringYesThe policy ID
steppathstringYesThe step ID

Response 204

No body.

Errors

  • 401 Unauthenticated
  • 403 The key lacks the ability this endpoint requires (required_ability names it), or the action is not allowed for the team.
  • 404 Not found
  • 429 Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for Retry-After seconds.

Code samples

curl -X DELETE "https://api.uptizm.com/v1/escalation-policies/POLICY/steps/STEP" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json"
const response = await fetch('https://api.uptizm.com/v1/escalation-policies/POLICY/steps/STEP', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
  },
});

console.log(response.status);
<?php

$curl = curl_init('https://api.uptizm.com/v1/escalation-policies/POLICY/steps/STEP');

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer '.getenv('UPTIZM_API_KEY'),
        'Accept: application/json',
    ],
]);

$response = curl_exec($curl);
import os

import requests

response = requests.delete(
    "https://api.uptizm.com/v1/escalation-policies/POLICY/steps/STEP",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
    },
)

print(response.status_code)

Type to search the guides, resources and endpoints.