Users
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 |
Each object in the topics array should contain:
| Parameter | Type | Note | |
|---|---|---|---|
id | required | string | ID of the notification topic |
preferences | required | array of preferences (See below) |
The preferences object should contain:
| 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. |
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)