Theme

Notification Broadcasts

Create a Notification Broadcast

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

Parameters

ParameterTypeNote
payloadrequiredobjectKey value pairs to pass to the channel templates in order to render them.
recipientsrequiredobject (See below)Recipients of the broadcast. Can be defined with either user_ids or filter_query.
notification_topic_idrequiredstringAssociate the broadcast to a notification topic

Recipients Parameters

ParameterTypeNote
user_idsarrayOne of the 2 ways to specify the recipient(s) of the notification.
filter_queryobject (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)
Previous
Overview