Notification Broadcasts
Create a Notification Broadcast
POST
https://cirro.io/api/v2/notification_broadcastsParameters
| Parameter | Type | Note | |
|---|---|---|---|
payload | required | object | Key value pairs to pass to the channel templates in order to render them. |
recipients | required | object (See below) | 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 |
Recipients Parameters
| Parameter | Type | Note | |
|---|---|---|---|
user_ids | array | One of the 2 ways to specify the recipient(s) of the notification. | |
filter_query | object (See below) | One of the 2 ways to specify the recipient(s) of the notification. |
Filter Query Parameters
A MongoDB-style query object (MQL) used to find matching Workers. Dot notation is supported for nested fields (e.g. skills.id).
Supported operators: $in, $nin, $or, $and, $exists, $not, $eq, $ne, $gt, etc.
See the MongoDB query operator docs for usage details.
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)