Prerequisites
To follow this guide with the API, you’ll need to:- Go to Bodhveda Console.
- Create a new project.
- Click on API Keys in the sidebar.
- Click on Create API Key and generate an API key with
Full access
scope.
Send direct notification with API
Use the send notification API to send a direct notification to a recipient. If the recipient doesn’t exist, Bodhveda creates it automatically when sending a direct notification.Send broadcast notification with API
Broadcast to multiple recipients. This requires some setup:- At least one recipient must exist.
- At least one project preference must exist.
Create a recipient
Use create recipient API to create a recipient in your project.Create a project preference
Before broadcasting, you must add at least one project preference to define a target (channel, topic, event):- Go to Bodhveda Console.
- Click on Preferences in the sidebar.
- Click on Create Preference.
- Define a target by mentioning the channel, topic, and event, give it a label, and set default to enabled.
- Save the preference.
Send broadcast notification
Use the send notification API to send a broadcast notification to a target that was used to create the project preference.No
recipient_id
makes this notification turn into a broadcast.
All recipients subscribed to this target will receive this notification.Send notification from Console
You can also send notifications from the Bodhveda Console:- Go to Notifications tab.
- Click on Send Notification to send a direct notification to a recipient or a broadcast to subscribed recipients.