Notification Preferences
Create or Update Notification Preferences
POST
https://cirro.io/api/v2/users/:id/notification_preferencesParameters
| Parameter | Type | Note | |
|---|---|---|---|
locale | required | string | In which language does the user want to receive notifications |
topics | array OF topics (See below) | Preferences of a user per notification topic |
Topics Parameters
| Parameter | | Type | Note | | :------------ | :-------------- | :------------------------------------------------------------ | :--------------------------- | --------------------------- | | id | required | string | ID of the notification topic | | preferences | required | array OF preferences (See below) | | contains preference details |
Preferences Parameters
| Parameter | Type | Note | |
|---|---|---|---|
email | required | enum | One of immediately, digest_hourly, digest_daily, never for email setup |
microsoft_teams | enum | One of immediately, digest_hourly, digest_daily, never for Microsoft Teams setup. Default is never. |
Description
Returns a Notification Preferences object if the update was successful.
Example
1client = CirroIOV2::Client.new(...)
2params = {
3 "locale": "de",
4 "topics": [
5 {
6 "id": "1",
7 "preferences": {
8 "email": "immediately"
9 }
10 }
11 ]
12}
13client.User.notification_preferences(1, params)