Ability to trigger event for non-subscriber

I'm looking at the docs for trigger event https://docs.novu.co/api/trigger-event/ and the body parameters state that the "to" property can be an object with firstName, lastName and email. When I try to use that payload for the "to" to trigger the event I get the following error: "subscriberId under property to is not configured, please make sure all the subscriber contains subscriberId property" That message seems to be at odds with the docs. Is it only possible to trigger notifications to subscribers?
Trigger event - Novu API Reference
Trigger event is the main (and the only) way to send notification to subscribers. The trigger identifier is used to match the particular template associated with it. Additional information can be passed according the body interface below.
6 Replies
Pawan Jain
Pawan Jain2y ago
Hi @jarredwitt Yes a valid subscriberId is required to trigger
jarredwitt
jarredwitt2y ago
Got it. Not sure if it's confused anyone else, but that part of the docs seems wrong.
Pawan Jain
Pawan Jain2y ago
That's actually API reference Are not you sending subscriberId in trigger?
jarredwitt
jarredwitt2y ago
No, I was following the API reference:
Pawan Jain
Pawan Jain2y ago
Quick Start | Novu
To create your free managed, or docker-based Novu environment use our CLI tool:
jarredwitt
jarredwitt2y ago
Thanks, understand now that the subscriberId needs to be in the to payload. Was just pointing out that the API reference for trigger event seems to be wrong. Thanks for the help, I'll just create a subscriber and that should fix my issue.
Want results from more Discord servers?
Add your server