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 accessscope.
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.This send carries no
target, and adding one needs no setup either — targets work
out of the box. Targets are how you get per-notification
preferences and analytics, so they are the next thing
to reach for.Cataloging a target — creating a project preference for it — is what puts it on
your recipients’ settings screen so they can mute it. Until you do, the
notification still sends, but nobody can switch it off. Once your catalog is
stable you can turn on strict targets in your project settings, and an
uncataloged target becomes a 400 instead of a silent gap.A topic: any entry covers every concrete topic beneath it, so one row like
post/any/comment is enough for post/123/comment, post/456/comment, and the
rest — no catalog write per post.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 name (and an optional description), 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.
Next Steps
API Reference
Explore the API in depth.
Concepts
Explore concepts that make up Bodhveda.