Theme

Notification Topics

Create a Notification Topic

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

Parameters

ParameterTypeNote
namerequiredstringMust be snakecase (lowercase letters and underscores only)
preferencesrequiredobject (See below)Default preferences for receiving notifications from the channel
notification_layout_idstringChoose the notification layout for this channel, it uses the default layout if none is given
templatesarray OF templates (See below)For 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
notification_configuration_idrequiredstringID of notification configuration which determines deliver method, kind and format
bodyrequiredstringContent of the template in handlebar format
subjectrequiredstringSubject of an email template

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 one