List realm notification rules
Lists notification rules: the realm’s rules with realm_id (optionally one team’s with
team_slug; effective: true adds the organization rules that also apply), or the
organization-wide rules with only org_id.
Requires a signed-in user token; with realm_id, a realm member (or higher) on that realm; with org_id, membership in that organization. One of realm_id or org_id is required.
POST
/
v1
/
realms
/
get_notification_rules
List realm notification rules
curl --request POST \
--url https://{host}/v1/realms/get_notification_rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"realm_id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"effective": true
}
'import requests
url = "https://{host}/v1/realms/get_notification_rules"
payload = {
"realm_id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"effective": True
}
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({realm_id: '5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b', effective: true})
};
fetch('https://{host}/v1/realms/get_notification_rules', 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://{host}/v1/realms/get_notification_rules",
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([
'realm_id' => '5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b',
'effective' => true
]),
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://{host}/v1/realms/get_notification_rules"
payload := strings.NewReader("{\n \"realm_id\": \"5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b\",\n \"effective\": true\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://{host}/v1/realms/get_notification_rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"realm_id\": \"5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b\",\n \"effective\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/realms/get_notification_rules")
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 \"realm_id\": \"5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b\",\n \"effective\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": [
{
"id": "4c5d6e7f-8091-4a2b-b3c4-d5e6f7a8b9c0",
"realm_id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"org_id": null,
"team_slug": null,
"event": "run.failed",
"channel_id": "9a8b7c6d-5e4f-4321-8a0b-1c2d3e4f5a6b",
"priority": 0,
"created_at": 1759000000000,
"updated_at": 1759000000000,
"recipients": null,
"system_key": null,
"locked": false,
"lock_reason": null
}
]
}{
"ok": false,
"error": {
"code": "bad_request",
"message": "realm_id or org_id is required"
}
}{
"ok": false,
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"ok": false,
"error": {
"code": "forbidden",
"message": "You do not have access to do this"
}
}{
"ok": false,
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"ok": false,
"error": "org_id: org_id is required when listing org-global notification rules",
"code": "invalid_params"
}{
"ok": false,
"error": "Internal server error",
"code": "internal_error"
}Authorizations
User PAT (cliq_tok_…, including session-scoped) or realm token (cliq_dt_…).
Body
application/json
Organization this call targets. Required for account-scoped channel/rule ops and inbox.
When set, list realm (and optional team) rules; omit for org-global rules
Minimum string length:
1When set with realm_id, filter to team-scoped rules
Minimum string length:
1When true with realm_id, merge org + realm tiers for what actually fires
⌘I
List realm notification rules
curl --request POST \
--url https://{host}/v1/realms/get_notification_rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"realm_id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"effective": true
}
'import requests
url = "https://{host}/v1/realms/get_notification_rules"
payload = {
"realm_id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"effective": True
}
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({realm_id: '5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b', effective: true})
};
fetch('https://{host}/v1/realms/get_notification_rules', 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://{host}/v1/realms/get_notification_rules",
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([
'realm_id' => '5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b',
'effective' => true
]),
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://{host}/v1/realms/get_notification_rules"
payload := strings.NewReader("{\n \"realm_id\": \"5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b\",\n \"effective\": true\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://{host}/v1/realms/get_notification_rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"realm_id\": \"5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b\",\n \"effective\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/realms/get_notification_rules")
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 \"realm_id\": \"5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b\",\n \"effective\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": [
{
"id": "4c5d6e7f-8091-4a2b-b3c4-d5e6f7a8b9c0",
"realm_id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"org_id": null,
"team_slug": null,
"event": "run.failed",
"channel_id": "9a8b7c6d-5e4f-4321-8a0b-1c2d3e4f5a6b",
"priority": 0,
"created_at": 1759000000000,
"updated_at": 1759000000000,
"recipients": null,
"system_key": null,
"locked": false,
"lock_reason": null
}
]
}{
"ok": false,
"error": {
"code": "bad_request",
"message": "realm_id or org_id is required"
}
}{
"ok": false,
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"ok": false,
"error": {
"code": "forbidden",
"message": "You do not have access to do this"
}
}{
"ok": false,
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"ok": false,
"error": "org_id: org_id is required when listing org-global notification rules",
"code": "invalid_params"
}{
"ok": false,
"error": "Internal server error",
"code": "internal_error"
}