curl --request PUT \
--url https://api.exowpee.com/v1/notification/settings/{notification_type} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channels": [
{
"enabled": true,
"internal_recipients": {
"user_profile_ids": [
"<string>"
],
"agent_ids": [
"<string>"
]
},
"channel_recipient_values": [
"<string>"
]
}
]
}
'import requests
url = "https://api.exowpee.com/v1/notification/settings/{notification_type}"
payload = { "channels": [
{
"enabled": True,
"internal_recipients": {
"user_profile_ids": ["<string>"],
"agent_ids": ["<string>"]
},
"channel_recipient_values": ["<string>"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channels: [
{
enabled: true,
internal_recipients: {user_profile_ids: ['<string>'], agent_ids: ['<string>']},
channel_recipient_values: ['<string>']
}
]
})
};
fetch('https://api.exowpee.com/v1/notification/settings/{notification_type}', 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.exowpee.com/v1/notification/settings/{notification_type}",
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([
'channels' => [
[
'enabled' => true,
'internal_recipients' => [
'user_profile_ids' => [
'<string>'
],
'agent_ids' => [
'<string>'
]
],
'channel_recipient_values' => [
'<string>'
]
]
]
]),
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://api.exowpee.com/v1/notification/settings/{notification_type}"
payload := strings.NewReader("{\n \"channels\": [\n {\n \"enabled\": true,\n \"internal_recipients\": {\n \"user_profile_ids\": [\n \"<string>\"\n ],\n \"agent_ids\": [\n \"<string>\"\n ]\n },\n \"channel_recipient_values\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/notification/settings/{notification_type}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n {\n \"enabled\": true,\n \"internal_recipients\": {\n \"user_profile_ids\": [\n \"<string>\"\n ],\n \"agent_ids\": [\n \"<string>\"\n ]\n },\n \"channel_recipient_values\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/notification/settings/{notification_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n {\n \"enabled\": true,\n \"internal_recipients\": {\n \"user_profile_ids\": [\n \"<string>\"\n ],\n \"agent_ids\": [\n \"<string>\"\n ]\n },\n \"channel_recipient_values\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"notification_type": "<string>",
"label": "<string>",
"built_in_permissions": "<array>",
"channels": "<array>"
}{
"message": "<string>",
"errors": {}
}Configure a notification type
Turns channels (in_app, email) on or off for one notification type of the company and, for recipient-configured types, replaces the recipients of the submitted channels. Returns the effective settings of that type.
curl --request PUT \
--url https://api.exowpee.com/v1/notification/settings/{notification_type} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channels": [
{
"enabled": true,
"internal_recipients": {
"user_profile_ids": [
"<string>"
],
"agent_ids": [
"<string>"
]
},
"channel_recipient_values": [
"<string>"
]
}
]
}
'import requests
url = "https://api.exowpee.com/v1/notification/settings/{notification_type}"
payload = { "channels": [
{
"enabled": True,
"internal_recipients": {
"user_profile_ids": ["<string>"],
"agent_ids": ["<string>"]
},
"channel_recipient_values": ["<string>"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channels: [
{
enabled: true,
internal_recipients: {user_profile_ids: ['<string>'], agent_ids: ['<string>']},
channel_recipient_values: ['<string>']
}
]
})
};
fetch('https://api.exowpee.com/v1/notification/settings/{notification_type}', 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.exowpee.com/v1/notification/settings/{notification_type}",
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([
'channels' => [
[
'enabled' => true,
'internal_recipients' => [
'user_profile_ids' => [
'<string>'
],
'agent_ids' => [
'<string>'
]
],
'channel_recipient_values' => [
'<string>'
]
]
]
]),
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://api.exowpee.com/v1/notification/settings/{notification_type}"
payload := strings.NewReader("{\n \"channels\": [\n {\n \"enabled\": true,\n \"internal_recipients\": {\n \"user_profile_ids\": [\n \"<string>\"\n ],\n \"agent_ids\": [\n \"<string>\"\n ]\n },\n \"channel_recipient_values\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/notification/settings/{notification_type}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n {\n \"enabled\": true,\n \"internal_recipients\": {\n \"user_profile_ids\": [\n \"<string>\"\n ],\n \"agent_ids\": [\n \"<string>\"\n ]\n },\n \"channel_recipient_values\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/notification/settings/{notification_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n {\n \"enabled\": true,\n \"internal_recipients\": {\n \"user_profile_ids\": [\n \"<string>\"\n ],\n \"agent_ids\": [\n \"<string>\"\n ]\n },\n \"channel_recipient_values\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"notification_type": "<string>",
"label": "<string>",
"built_in_permissions": "<array>",
"channels": "<array>"
}{
"message": "<string>",
"errors": {}
}notification_settings.configure
Conditions
- Company routes only.
- notification_type in the path must be a known type (awaiting_approval or stock_alert); otherwise validation answers 422.
- channels is required with at least one entry; each channel must be given once, be one of in_app or email, be supported by the type, and carry an enabled boolean.
- For a permission-backed type (awaiting_approval, whose recipients are the holders of orders.approve) internal_recipients and channel_recipient_values are refused whenever the key is present, even empty; only enabled can be changed.
- For a recipient-configured type (stock_alert), agent_ids are refused on the email channel; channel_recipient_values are accepted only on email and each must be a valid email address.
- Every user_profile_ids and agent_ids entry must exist in the company of the session.
- Creates or updates one setting per submitted channel (enabled flag); channels not in the payload are untouched and settings are never deleted when disabled.
- For a recipient-configured type, replaces all internal recipients and external email values of each submitted channel with the lists sent; a list that is omitted clears that channel’s recipients. Duplicate ids or values are collapsed.
- Future notifications of this type are delivered according to these settings.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Type of notification to configure. Accepted values are awaiting_approval (permission-backed: recipients are holders of orders.approve) and stock_alert (recipients are chosen in the settings).
Body
Not accepted in the body: it comes from the notification_type path segment and must be awaiting_approval or stock_alert.
awaiting_approval, stock_alert Channels to configure. Required, at least one. Only the channels sent are changed.
1Show child attributes
Show child attributes
Response
NotificationSettingResource
Type of notification: awaiting_approval or stock_alert.
Translated display name of the type.
Permissions a person must hold to receive this type. Non-empty means the type is permission-backed and recipients cannot be chosen; empty means recipients are configured per channel.
One entry per channel the type supports (in_app, email) with enabled, supports_internal_recipients, allowed_internal_recipient_types, supports_channel_recipients, internal_recipients and channel_recipient_values. A channel never configured shows enabled false.