curl --request PUT \
--url https://api.baselayer.com/notification_policies/{notification_policy_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"enabled": true,
"cadence": "daily",
"attributes": [
"officers"
],
"recipients": [
"user@example.com",
"admin@example.com"
]
}
'import requests
url = "https://api.baselayer.com/notification_policies/{notification_policy_id}"
payload = {
"name": "<string>",
"enabled": True,
"cadence": "daily",
"attributes": ["officers"],
"recipients": ["user@example.com", "admin@example.com"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
cadence: 'daily',
attributes: ['officers'],
recipients: ['user@example.com', 'admin@example.com']
})
};
fetch('https://api.baselayer.com/notification_policies/{notification_policy_id}', 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.baselayer.com/notification_policies/{notification_policy_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'enabled' => true,
'cadence' => 'daily',
'attributes' => [
'officers'
],
'recipients' => [
'user@example.com',
'admin@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.baselayer.com/notification_policies/{notification_policy_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"cadence\": \"daily\",\n \"attributes\": [\n \"officers\"\n ],\n \"recipients\": [\n \"user@example.com\",\n \"admin@example.com\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://api.baselayer.com/notification_policies/{notification_policy_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"cadence\": \"daily\",\n \"attributes\": [\n \"officers\"\n ],\n \"recipients\": [\n \"user@example.com\",\n \"admin@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/notification_policies/{notification_policy_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"cadence\": \"daily\",\n \"attributes\": [\n \"officers\"\n ],\n \"recipients\": [\n \"user@example.com\",\n \"admin@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "email",
"name": "<string>",
"enabled": true,
"cadence": "daily",
"created_at": "2023-11-07T05:31:56Z",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_run_at": "2023-11-07T05:31:56Z",
"next_run_on": "2023-12-25",
"attributes": [
"officers"
],
"recipients": [
"user@example.com",
"admin@example.com"
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Notification Policy
Update a notification policy by ID.
curl --request PUT \
--url https://api.baselayer.com/notification_policies/{notification_policy_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"enabled": true,
"cadence": "daily",
"attributes": [
"officers"
],
"recipients": [
"user@example.com",
"admin@example.com"
]
}
'import requests
url = "https://api.baselayer.com/notification_policies/{notification_policy_id}"
payload = {
"name": "<string>",
"enabled": True,
"cadence": "daily",
"attributes": ["officers"],
"recipients": ["user@example.com", "admin@example.com"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
cadence: 'daily',
attributes: ['officers'],
recipients: ['user@example.com', 'admin@example.com']
})
};
fetch('https://api.baselayer.com/notification_policies/{notification_policy_id}', 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.baselayer.com/notification_policies/{notification_policy_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'enabled' => true,
'cadence' => 'daily',
'attributes' => [
'officers'
],
'recipients' => [
'user@example.com',
'admin@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.baselayer.com/notification_policies/{notification_policy_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"cadence\": \"daily\",\n \"attributes\": [\n \"officers\"\n ],\n \"recipients\": [\n \"user@example.com\",\n \"admin@example.com\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://api.baselayer.com/notification_policies/{notification_policy_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"cadence\": \"daily\",\n \"attributes\": [\n \"officers\"\n ],\n \"recipients\": [\n \"user@example.com\",\n \"admin@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/notification_policies/{notification_policy_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"cadence\": \"daily\",\n \"attributes\": [\n \"officers\"\n ],\n \"recipients\": [\n \"user@example.com\",\n \"admin@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "email",
"name": "<string>",
"enabled": true,
"cadence": "daily",
"created_at": "2023-11-07T05:31:56Z",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_run_at": "2023-11-07T05:31:56Z",
"next_run_on": "2023-12-25",
"attributes": [
"officers"
],
"recipients": [
"user@example.com",
"admin@example.com"
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
Request model for updating a notification policy.
The name of the notification policy.
Whether the notification policy should be enabled.
The notification cadence (daily, weekly, monthly, yearly).
daily, weekly, biweekly, monthly, quarterly, biannually, annually "daily"
List of attributes to notify on (officers, alternative_names).
registration_health, new_registrations, addresses, officers, alternative_names, kyb_score, risk_score, identity_network, pep, ofac, liens, litigations, bankruptcies, website_analysis ["officers"]
List of email recipients for email notification policies.
["user@example.com", "admin@example.com"]
Response
Response
Represents a notification policy response.
The unique identifier of the notification policy.
The type of notification policy (email, slack, webhook).
"email"
"slack"
"webhook"
The name of the notification policy.
Whether the notification policy is enabled.
The notification cadence (daily, weekly, monthly, yearly).
daily, weekly, biweekly, monthly, quarterly, biannually, annually "daily"
"weekly"
"monthly"
"yearly"
When the notification policy was created.
The unique identifier of the portfolio group (if applicable).
The unique identifier of the portfolio item (if applicable).
When the notification policy was last executed.
When the notification policy is scheduled to run next.
List of attributes to notify on (officers, alternative_names).
registration_health, new_registrations, addresses, officers, alternative_names, kyb_score, risk_score, identity_network, pep, ofac, liens, litigations, bankruptcies, website_analysis ["officers"]
["alternative_names"]
List of email recipients for email notification policies.
["user@example.com", "admin@example.com"]
When the notification policy was last updated.