Skip to main content
POST
/
notifications
Create a Notification Group
curl --request POST \
  --url https://v1.api.altostrat.io/notifications \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Primary On-Call Team Alerts",
  "schedule_id": "sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a",
  "mute": "schedule-active",
  "topics": [
    "top_9cffb446-18a5-445a-948c-e6f1d98930af",
    "top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50"
  ],
  "sites": [
    "site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7",
    "site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8"
  ],
  "notifiables": [
    {
      "id": "usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f",
      "channel": "whatsapp"
    }
  ]
}
'
import requests

url = "https://v1.api.altostrat.io/notifications"

payload = {
"name": "Primary On-Call Team Alerts",
"schedule_id": "sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a",
"mute": "schedule-active",
"topics": ["top_9cffb446-18a5-445a-948c-e6f1d98930af", "top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50"],
"sites": ["site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7", "site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8"],
"notifiables": [
{
"id": "usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f",
"channel": "whatsapp"
}
]
}
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: 'Primary On-Call Team Alerts',
schedule_id: 'sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a',
mute: 'schedule-active',
topics: [
'top_9cffb446-18a5-445a-948c-e6f1d98930af',
'top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50'
],
sites: [
'site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7',
'site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8'
],
notifiables: [{id: 'usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f', channel: 'whatsapp'}]
})
};

fetch('https://v1.api.altostrat.io/notifications', 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://v1.api.altostrat.io/notifications",
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' => 'Primary On-Call Team Alerts',
'schedule_id' => 'sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a',
'mute' => 'schedule-active',
'topics' => [
'top_9cffb446-18a5-445a-948c-e6f1d98930af',
'top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50'
],
'sites' => [
'site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7',
'site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8'
],
'notifiables' => [
[
'id' => 'usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f',
'channel' => 'whatsapp'
]
]
]),
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://v1.api.altostrat.io/notifications"

payload := strings.NewReader("{\n \"name\": \"Primary On-Call Team Alerts\",\n \"schedule_id\": \"sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a\",\n \"mute\": \"schedule-active\",\n \"topics\": [\n \"top_9cffb446-18a5-445a-948c-e6f1d98930af\",\n \"top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50\"\n ],\n \"sites\": [\n \"site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7\",\n \"site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8\"\n ],\n \"notifiables\": [\n {\n \"id\": \"usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f\",\n \"channel\": \"whatsapp\"\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://v1.api.altostrat.io/notifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Primary On-Call Team Alerts\",\n \"schedule_id\": \"sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a\",\n \"mute\": \"schedule-active\",\n \"topics\": [\n \"top_9cffb446-18a5-445a-948c-e6f1d98930af\",\n \"top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50\"\n ],\n \"sites\": [\n \"site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7\",\n \"site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8\"\n ],\n \"notifiables\": [\n {\n \"id\": \"usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f\",\n \"channel\": \"whatsapp\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://v1.api.altostrat.io/notifications")

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\": \"Primary On-Call Team Alerts\",\n \"schedule_id\": \"sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a\",\n \"mute\": \"schedule-active\",\n \"topics\": [\n \"top_9cffb446-18a5-445a-948c-e6f1d98930af\",\n \"top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50\"\n ],\n \"sites\": [\n \"site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7\",\n \"site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8\"\n ],\n \"notifiables\": [\n {\n \"id\": \"usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f\",\n \"channel\": \"whatsapp\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "ntfgrp_9b01a14c-1123-4279-88b1-3e42f9b846e1",
  "name": "Primary On-Call Team Alerts",
  "schedule_id": "sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a",
  "mute": "schedule-active",
  "notifiables": [
    {
      "id": "usr_5f0b6e1b-4f1e-4b4a-8b0a-0e6f0b6e1b4f",
      "channel": "whatsapp"
    }
  ],
  "topics": [
    "top_9cffb446-18a5-445a-948c-e6f1d98930af",
    "top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50"
  ],
  "sites": [
    "site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7",
    "site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8"
  ],
  "created_at": "2025-10-29T12:24:17.000Z",
  "updated_at": "2025-10-29T12:28:00.000Z"
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}
{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}

Authorizations

Authorization
string
header
required

Altostrat uses OAuth2 for authentication. Tokens can be obtained from the Altostrat Authentication API.

Body

application/json

The details of the notification group to create.

name
string
required

A human-readable name for the notification group.

Maximum string length: 100
Example:

"Primary On-Call Team Alerts"

schedule_id
string<uuid>
required

The UUID of a Schedule object from the Chrono API, which defines when this group is active.

Example:

"sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a"

mute
enum<string>
required

Controls the mute state of the group. schedule-active mutes when the schedule is inactive, schedule-inactive mutes when the schedule is active. never and always are absolute states.

Available options:
schedule-active,
schedule-inactive,
never,
always
Example:

"schedule-active"

topics
string<uuid>[]
required

An array of Topic UUIDs to which this group subscribes.

Maximum array length: 20
Example:
[
"top_9cffb446-18a5-445a-948c-e6f1d98930af",
"top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50"
]
sites
string<uuid>[]
required

An array of Site UUIDs that this group will receive notifications for.

Maximum array length: 800
Example:
[
"site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7",
"site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8"
]
notifiables
object[]
required

An array of recipients and their preferred notification channels.

Maximum array length: 200

Response

Notification group created successfully.

id
string<uuid>

The unique identifier for the notification group.

Example:

"ntfgrp_9b01a14c-1123-4279-88b1-3e42f9b846e1"

name
string

A human-readable name for the notification group.

Example:

"Primary On-Call Team Alerts"

schedule_id
string<uuid>

The UUID of a Schedule object from the Chrono API, which defines when this group is active.

Example:

"sch_7d1b8c0c-5121-4f27-849c-29b3a0e6201a"

mute
enum<string>

Controls the mute state of the group. schedule-active mutes when the schedule is inactive, schedule-inactive mutes when the schedule is active. never and always are absolute states.

Available options:
schedule-active,
schedule-inactive,
never,
always
Example:

"schedule-active"

notifiables
object[]

An array of recipients and their designated notification channels.

topics
string<uuid>[]

An array of Topic UUIDs to which this group subscribes.

Example:
[
"top_9cffb446-18a5-445a-948c-e6f1d98930af",
"top_9ba5d51f-3ada-44f2-9fb9-bf2404a29f50"
]
sites
string<uuid>[]

An array of Site UUIDs that this group will receive notifications for.

Example:
[
"site_a2b3c4d5-e6f7-g8h9-i0j1-k2l3m4n5o6p7",
"site_b3c4d5e6-f7g8-h9i0-j1k2-l3m4n5o6p7q8"
]
created_at
string<date-time>

The timestamp when the notification group was created.

Example:

"2025-10-29T12:24:17.000Z"

updated_at
string<date-time>

The timestamp when the notification group was last updated.

Example:

"2025-10-29T12:28:00.000Z"