Notification Topics

Create a Notification Topic

POST https://api.cirro.io/v2/notification_topics

Parameters

ParameterTypeNote
namerequiredstringMust be snakecase (lowercase letters and underscores only)
notification_layout_idstringChoose the notification layout for this channel, it uses the default layout if none is given
preferencesrequiredobjectDefault preferences for receiving notifications from the channel
templatesrequiredarrayFor each of the existing notification configurations for the default locale there needs to be a corresponding template

Preferences Parameters

ParameterTypeNote
emailrequiredenumOne of the given enum values for email setup: immediately, digest_hourly, digest_daily, or never
microsoft_teamsenumOne of the given enum values for EPAM teams setup: immediately, digest_hourly, digest_daily, or never. Default is never

Templates Parameters

ParameterTypeNote
subjectstringSubject of an email template
bodyrequiredstringContent of the template in handlebar format
notification_configuration_idrequiredstringID of notification configuration which determines deliver method, kind and format

Example

1client = CirroIOV2::Client.new(...)
2client.NotificationTopic.create(
3  {
4  "name": "new_gig_invitation",
5  "notification_layout_id": "1",
6  "preferences": {
7    "email": "immediately",
8    "microsoft_teams": "never"
9  },
10  "templates": [
11    {
12      "notification_configuration_id": "1",
13      "subject": "New Bug Comment",
14      "body": "Hello {{recipient_first_name}}, you got {{#pluralize count, 'new comments'}}new comment{{/pluralize}}"
15    }
16  ]
17  }
18)
Previous
Get Notification Topics