Skip to content
Uptizm
Start free
Sign in

Language

Menu
View as Markdown

API reference

Channels

Notification channels alerts are delivered through.

GET /notification-channels channels:read #

List notification channels

The team's notification channels, newest first, page-numbered.

Response 200 application/json

  • data array of NotificationChannelResource required
    • id string required
    • team_id string required
    • name string required
    • channel_type string, one of "slack", "webhook", "pagerduty", "teams" required
    • is_enabled boolean required
    • severity string, one of "all", "critical" required
    • credentials object or object or object or object required
    • 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
    • current_page integer, min 1 required
    • from integer or null, min 1 required
    • last_page integer, min 1 required
    • links array of object required

      Generated paginator links.

      • url string or null required
      • label string required
      • active boolean required
    • path string or null required

      Base path for paginator generated URLs.

    • per_page integer, min 0 required

      Number of items shown per page.

    • to integer or null, min 1 required

      Number of the last item in the slice.

    • total integer, min 0 required

      Total number of items being paginated.

    • push_provisioned boolean 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.
  • 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/notification-channels" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json"
const response = await fetch('https://api.uptizm.com/v1/notification-channels', {
  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/notification-channels');

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/notification-channels",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
    },
)

print(response.json())
POST /notification-channels channels:write #

Create a notification channel

Creates a channel alerts are delivered through.

Parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringNoAny unique string per logical request.

Request body application/json

  • name string, max length 200 required
  • channel_type NotificationChannelType: string, one of "slack", "webhook", "pagerduty", "teams" required

    The delivery driver a notification channel sends through.

  • credentials object required
    • token string or null, max length 255
    • channel string or null, max length 200
    • url string or null, max length 2048
    • secret string or null, max length 255
    • routing_key string or null, max length 64
  • is_enabled boolean
  • severity NotificationChannelSeverity: string, one of "all", "critical"

    Which incidents a channel fires for: all of them or only critical ones.

Response 201 application/json

  • data NotificationChannelResource required
    • id string required
    • team_id string required
    • name string required
    • channel_type string, one of "slack", "webhook", "pagerduty", "teams" required
    • is_enabled boolean required
    • severity string, one of "all", "critical" required
    • credentials object or object or object or object 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.
  • 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/notification-channels" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "name": "string",
    "channel_type": "slack",
    "credentials": {}
}'
const payload = {
    "name": "string",
    "channel_type": "slack",
    "credentials": {}
};

const response = await fetch('https://api.uptizm.com/v1/notification-channels', {
  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/notification-channels');

$payload = <<<'JSON'
{
    "name": "string",
    "channel_type": "slack",
    "credentials": {}
}
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/notification-channels",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    data=r'''{
    "name": "string",
    "channel_type": "slack",
    "credentials": {}
}''',
)

print(response.json())
GET /notification-channels/{channel} channels:read #

Get a notification channel

One channel of the team.

Parameters

NameInTypeRequiredDescription
channelpathstringYesThe channel ID

Response 200 application/json

  • data NotificationChannelResource required
    • id string required
    • team_id string required
    • name string required
    • channel_type string, one of "slack", "webhook", "pagerduty", "teams" required
    • is_enabled boolean required
    • severity string, one of "all", "critical" required
    • credentials object or object or object or object 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/notification-channels/CHANNEL" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json"
const response = await fetch('https://api.uptizm.com/v1/notification-channels/CHANNEL', {
  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/notification-channels/CHANNEL');

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/notification-channels/CHANNEL",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
    },
)

print(response.json())
PUT /notification-channels/{channel} channels:write #

Update a notification channel

Updates the channel.

Parameters

NameInTypeRequiredDescription
channelpathstringYesThe channel ID

Request body application/json

  • name string, max length 200
  • channel_type NotificationChannelType: string, one of "slack", "webhook", "pagerduty", "teams"

    The delivery driver a notification channel sends through.

  • credentials object
    • token string or null, max length 255
    • channel string or null, max length 200
    • routing_key string or null, max length 64
    • url string or null, max length 2048
    • secret string or null, max length 255
  • is_enabled boolean
  • severity NotificationChannelSeverity: string, one of "all", "critical"

    Which incidents a channel fires for: all of them or only critical ones.

Response 200 application/json

  • data NotificationChannelResource required
    • id string required
    • team_id string required
    • name string required
    • channel_type string, one of "slack", "webhook", "pagerduty", "teams" required
    • is_enabled boolean required
    • severity string, one of "all", "critical" required
    • credentials object or object or object or object 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/notification-channels/CHANNEL" \
  -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/notification-channels/CHANNEL', {
  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/notification-channels/CHANNEL');

$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/notification-channels/CHANNEL",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
    data=r'''{}''',
)

print(response.json())
DELETE /notification-channels/{channel} channels:write #

Delete a notification channel

Deletes the channel.

Parameters

NameInTypeRequiredDescription
channelpathstringYesThe channel 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/notification-channels/CHANNEL" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json"
const response = await fetch('https://api.uptizm.com/v1/notification-channels/CHANNEL', {
  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/notification-channels/CHANNEL');

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/notification-channels/CHANNEL",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
    },
)

print(response.status_code)
POST /notification-channels/{channel}/test channels:write #

Send a test notification

Sends a test message through the channel and reports whether it was delivered.

Parameters

NameInTypeRequiredDescription
channelpathstringYesThe channel ID
Idempotency-KeyheaderstringNoAny unique string per logical request.

Response 200 application/json

  • data object required
    • delivered boolean 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.
  • 502 Bad Gateway

Code samples

curl -X POST "https://api.uptizm.com/v1/notification-channels/CHANNEL/test" \
  -H "Authorization: Bearer $UPTIZM_API_KEY" \
  -H "Accept: application/json" \
  -H "Idempotency-Key: $(uuidgen)"
const response = await fetch('https://api.uptizm.com/v1/notification-channels/CHANNEL/test', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.UPTIZM_API_KEY}`,
    'Accept': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
});

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

$curl = curl_init('https://api.uptizm.com/v1/notification-channels/CHANNEL/test');

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

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

import requests

response = requests.post(
    "https://api.uptizm.com/v1/notification-channels/CHANNEL/test",
    headers={
        "Authorization": "Bearer " + os.environ["UPTIZM_API_KEY"],
        "Accept": "application/json",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)

print(response.json())

Type to search the guides, resources and endpoints.