Notification Broadcasts
Create a Notification Broadcast
POST
https://api.cirro.io/v2/notification_broadcasts
Parameters
Parameter | Type | Note | |
---|---|---|---|
payload | required | object | Key value pairs to pass to the channel templates in order to render them. |
recipients | required | object | Recipients of the broadcast. Can be defined with either user_ids or filter_query . |
notification_topic_id | required | string | Associate the broadcast to a notification topic |
templates | required | array | Associated templates of a broadcast |
Recipients Parameters
Parameter | Type | Note | |
---|---|---|---|
user_ids | array | One of the 2 ways to specify the recipient(s) of the notification. | |
filter_query | object | One of the 2 ways to specify the recipient(s) of the notification. |
Templates Parameters
Parameter | Type | Note | |
---|---|---|---|
notification_configuration_id | required | string | ID of notification configuration which determines deliver method, kind, and format. |
subject | string | Subject of email template. | |
body | required | string | Content of template in liquid format. |
Example
1client = CirroIOV2::Client.new(...)
2client.NotificationBroadcast.create(
3 payload: {
4 foo: 'bar',
5 key: 'value'
6 },
7 recipients: {
8 user_ids: [1, 2, 3]
9 },
10 notification_topic_id: 1
11)