Replace the organization's notification categories
PUT /api/notification-categories. Replace the organization's notification categories. Headless LMS Notifications API reference.
Requires notification_categories:write. Stores the whole list. 422 when a key repeats, a type cannot be in the org list, a reason is not allowed for its type, a channel is not configured, or earlier categories already cover everything a category covers.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/notification-categories" \ -H "Content-Type: application/json" \ -d '{ "categories": [ { "key": "string", "covers": [ { "type": "string", "reasons": [ "subject" ] } ], "channels": { "property1": { "default": true, "locked": true }, "property2": { "default": true, "locked": true } } } ] }'{ "categories": [ { "key": "string", "covers": [ { "type": "string", "reasons": [ "subject" ] } ], "channels": { "property1": { "default": true, "locked": true }, "property2": { "default": true, "locked": true } }, "perSpace": true, "spaceDefaults": { "property1": { "property1": true, "property2": true }, "property2": { "property1": true, "property2": true } } } ], "source": "default"}{ "error": "string", "message": "string", "requestId": "string", "issues": [ { "path": "string", "message": "string" } ]}{ "error": "string", "message": "string", "requestId": "string"}{ "error": "string", "message": "string", "requestId": "string"}{ "error": "string", "message": "string", "requestId": "string", "issues": [ { "path": "string", "message": "string" } ]}{ "error": "string", "message": "string", "requestId": "string"}Go back to the default notification categories for the organization DELETE
DELETE /api/notification-categories. Go back to the default notification categories for the organization. Headless LMS Notifications API reference.
Get the default notification categories GET
GET /api/notification-categories/defaults. Get the default notification categories. Headless LMS Notifications API reference.