Update notification preferences
PUT
Turns one or more notification categories on or off for the signed-in user and returns the full updated list. Categories left out are unchanged; turning off a locked category such as admin broadcasts is ignored.
How to use it
- Read the current settings with Get notification preferences to see each category and whether it can be turned off.
- Send only the categories to change, each with enabled true or false.
- The change applies to the signed-in user only; the response lists all categories with their new effective settings. Locked categories stay on.
BearerAuthheader
AuthorizationBearer <JWT>application/json- body
preferences*array<>Categories to change. Categories you leave out keep their current setting.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?The signed-in user's effective setting for every notification category.
Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/notifications/preferences' \ -H 'Content-Type: application/json' \ -d '{ "preferences": [ { "category": "OPS_ROUTE_ASSIGNED", "enabled": true } ]}'Example Response
{ "status": "string", "message": "string", "data": { "preferences": [ { "category": "OPS_ROUTE_ASSIGNED", "group": "OPS", "enabled": true, "canDisable": true } ] }}