Notifications
Click Here To Get Started
Begin By Creating a Notification GroupReact Component Usage
This is used to automatically embed a notifications component. Based on the params, it will indicate to the user if they already subscribed or not.

Your developer API-KEY
The name of the notification group you created earlier in the Notifiations Dashboard
The user’s wallet address or other random identifier
The size of the button - ‘small’ or ‘large’
The background of the button - ‘black’ or ‘white’
The color of the button text/icon
This function will be called when the user disables notifications
This function will be called when the user enables notifications
import {NotificationsButton} from "selfguard-react-components";
<NotificationsButton
api_key={api_key}
notification_group={notification_group}
user_address={user_address}
background={background}
size={size}
color={color}
onDisabled={onDisabled}
onEnabled={onEnabled}
/>
Bulk Send
This allows you to send notifications to all users of a particular notification group.
Send SMS
The group to which you want to send the notification.
The content of the sms that will be sent out.
await sg.sendBulkSMS({notification_group,text});
Send Email
The group to which you want to send the notification.
The subject of the email that will be sent out.
The body of the email that will be sent out.
await sg.sendBulkEmail({notification_group, subject, body});
Individual Send
This allows you to send individual notifications to your users.
Send SMS
The user’s wallet address or other random identifier
The group to which you want to send the notification.
The content of the sms that will be sent out.
await sg.sendSMS({user_address,notification_group,text});
Send Email
The user’s wallet address or other random identifier
The group to which you want to send the notification.
The subject of the email that will be sent out.
The body of the email that will be sent out.
await sg.sendEmail({user_address,notification_group, subject, body});
Notification Group Management
This allows you to create notifications groups and retrieve them
Create Notification Group
The name of the notification group
A contract address you would like associated with this group. This will later be used to allow you to token gate users.
await sg.createNotificationGroup({notification_group, contract_address});
Get Notification Group By Name
The name of the notification group
await sg.getNotificationGroupByName({notification_group});
Get Notification Groups
await sg.getNotificationGroups();
Profiles Management
This allows you to upload profiles manuall to notification groups and retrieve the respective profiles.
Upload/Update Profile
The address of the user
An object containing information regarind the user. For uploading notification data regarding a user, set value to {email, phone}
The name of the notification group
await sg.updateProfile({user_address, value, notification_group});
Get Profiles
The number of profiles you want to retrieve
The offset of where to begin retrieving users
The name of the notification group
await sg.getProfiles({limit, offset, notification_group})
Get Profile
The address of the user
The name of the notification group
await sg.getProfile({user_address, notification_group});