Notifications
BIAB's notification system lets customers control their communication preferences — which channels they use and which events they receive notifications for.
const prefs = await client.notifications.getPreferences()
// → { email, sms, push, digest, categories }
await client.notifications.updatePreferences({
email: true,
sms: false,
digest: 'weekly',
categories: { marketing: false, billing: true, updates: true },
})
Channel verification
Before sending to a new email or phone number, verify the channel:
// Start verification (sends code)
await client.notifications.startVerification({
channel: 'email',
address: 'jane@example.com',
})
// Confirm with the code
await client.notifications.confirmVerification({
channel: 'email',
address: 'jane@example.com',
code: '123456',
})
React components
import { VerifyEmailFlow, VerifyEmailConfirm, VerifyPhoneFlow }
from '@biab-dev/sdk/react'
<VerifyEmailFlow email="jane@example.com" onVerified={() => {}} />
<VerifyPhoneFlow phone="+15551234567" onVerified={() => {}} />