Notifications Module
Import
Methods
send(name, variables, options)
send(name, variables, options)
Sends a custom notification to a single recipient.
Arguments
name
(String) the api name of the notification template.variables
(Object) an object matching the variables in the matching notification handlebars template(s).options
context
(Object) optional. If specified, a notification object will be persisted and associated with the context object. If omitted, a notification object is not persisted and it will not be possible to retrieve information about the notification via the notifications endpoint, nor will it be necessary to clear the notification manually._id
(ObjectId)object
(String)
locale
(String:en_US)recipient
(ObjectId|Email:script.principal._id) A custom recipient. Defaults to the script's calling principal.apiKey
(String) An optional app key (eg. K0yscrO53AZqpisMmf0Nco), used to pin APNs/GCM push notifications to a single app.number
(String) a custom sending phone number for sms notifications. The phone number must be pre-configured in the administration interface under Settings -> Notifications.
Examples
Notifications Example
Last updated