Update notification rules
PUT
/notifications/rules
const url = 'https://sylve.lan:8181/api/notifications/rules';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"rules":[{"discordEnabled":true,"emailEnabled":true,"id":1,"kind":"example","ntfyEnabled":true,"pool":"example","pushoverEnabled":true,"targetKey":"example","templateKey":"example","uiEnabled":true}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://sylve.lan:8181/api/notifications/rules \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "rules": [ { "discordEnabled": true, "emailEnabled": true, "id": 1, "kind": "example", "ntfyEnabled": true, "pool": "example", "pushoverEnabled": true, "targetKey": "example", "templateKey": "example", "uiEnabled": true } ] }'Apply the legacy full-bulk notification rule update contract
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Notification rule updates
Media typeapplication/json
object
rules
Array<object>
object
discordEnabled
boolean
emailEnabled
boolean
id
integer
kind
string
ntfyEnabled
boolean
pool
string
pushoverEnabled
boolean
targetKey
string
templateKey
string
uiEnabled
boolean
Examplegenerated
{ "rules": [ { "discordEnabled": true, "emailEnabled": true, "id": 1, "kind": "example", "ntfyEnabled": true, "pool": "example", "pushoverEnabled": true, "targetKey": "example", "templateKey": "example", "uiEnabled": true } ]}Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
object
rules
Array<object>
object
active
boolean
config
string
discordEnabled
boolean
emailEnabled
boolean
id
integer
kind
string
ntfyEnabled
boolean
pushoverEnabled
boolean
targetKey
string
targetLabel
string
templateKey
string
templateLabel
string
uiEnabled
boolean
templates
Array<object>
object
defaultConfig
string
description
string
key
string
label
string
targetType
string
targets
Array<object>
object
key
string
label
string
error
string
message
string
status
string
Examplegenerated
{ "data": { "rules": [ { "active": true, "config": "example", "discordEnabled": true, "emailEnabled": true, "id": 1, "kind": "example", "ntfyEnabled": true, "pushoverEnabled": true, "targetKey": "example", "targetLabel": "example", "templateKey": "example", "templateLabel": "example", "uiEnabled": true } ], "templates": [ { "defaultConfig": "example", "description": "example", "key": "example", "label": "example", "targetType": "example", "targets": [ { "key": "example", "label": "example" } ] } ] }, "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Not Found
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}