Update your own notification preferences
curl --request PATCH \
--url https://app.aiaxoniq.com/users/me/notifications \
--header 'Content-Type: application/json' \
--cookie oiq_token= \
--data '
{
"alertFiring": true,
"weeklyDigest": true,
"productUpdates": true,
"usageWarnings": true
}
'import requests
url = "https://app.aiaxoniq.com/users/me/notifications"
payload = {
"alertFiring": True,
"weeklyDigest": True,
"productUpdates": True,
"usageWarnings": True
}
headers = {
"cookie": "oiq_token=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'oiq_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
alertFiring: true,
weeklyDigest: true,
productUpdates: true,
usageWarnings: true
})
};
fetch('https://app.aiaxoniq.com/users/me/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://app.aiaxoniq.com/users/me/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'alertFiring' => true,
'weeklyDigest' => true,
'productUpdates' => true,
'usageWarnings' => true
]),
CURLOPT_COOKIE => "oiq_token=",
CURLOPT_HTTPHEADER => [
"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://app.aiaxoniq.com/users/me/notifications"
payload := strings.NewReader("{\n \"alertFiring\": true,\n \"weeklyDigest\": true,\n \"productUpdates\": true,\n \"usageWarnings\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "oiq_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.patch("https://app.aiaxoniq.com/users/me/notifications")
.header("cookie", "oiq_token=")
.header("Content-Type", "application/json")
.body("{\n \"alertFiring\": true,\n \"weeklyDigest\": true,\n \"productUpdates\": true,\n \"usageWarnings\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiaxoniq.com/users/me/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'oiq_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"alertFiring\": true,\n \"weeklyDigest\": true,\n \"productUpdates\": true,\n \"usageWarnings\": true\n}"
response = http.request(request)
puts response.read_bodyUsers and roles
Update your own notification preferences
The four keys below are the whole vocabulary — the handler already allowlists exactly these, so the schema states in the contract what was previously discovered by a preference silently not sticking.
PATCH
/
users
/
me
/
notifications
Update your own notification preferences
curl --request PATCH \
--url https://app.aiaxoniq.com/users/me/notifications \
--header 'Content-Type: application/json' \
--cookie oiq_token= \
--data '
{
"alertFiring": true,
"weeklyDigest": true,
"productUpdates": true,
"usageWarnings": true
}
'import requests
url = "https://app.aiaxoniq.com/users/me/notifications"
payload = {
"alertFiring": True,
"weeklyDigest": True,
"productUpdates": True,
"usageWarnings": True
}
headers = {
"cookie": "oiq_token=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'oiq_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
alertFiring: true,
weeklyDigest: true,
productUpdates: true,
usageWarnings: true
})
};
fetch('https://app.aiaxoniq.com/users/me/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://app.aiaxoniq.com/users/me/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'alertFiring' => true,
'weeklyDigest' => true,
'productUpdates' => true,
'usageWarnings' => true
]),
CURLOPT_COOKIE => "oiq_token=",
CURLOPT_HTTPHEADER => [
"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://app.aiaxoniq.com/users/me/notifications"
payload := strings.NewReader("{\n \"alertFiring\": true,\n \"weeklyDigest\": true,\n \"productUpdates\": true,\n \"usageWarnings\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "oiq_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.patch("https://app.aiaxoniq.com/users/me/notifications")
.header("cookie", "oiq_token=")
.header("Content-Type", "application/json")
.body("{\n \"alertFiring\": true,\n \"weeklyDigest\": true,\n \"productUpdates\": true,\n \"usageWarnings\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiaxoniq.com/users/me/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'oiq_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"alertFiring\": true,\n \"weeklyDigest\": true,\n \"productUpdates\": true,\n \"usageWarnings\": true\n}"
response = http.request(request)
puts response.read_body⌘I