Quickstart Guide

Get started with NotiBoost in 5 minutes. From setup to sending your first notification.

Step 1: Create Account and API Key

Sign up for NotiBoost and get your API key:

  1. Sign up at notiboost.com
  2. Go to Dashboard and create API key
  3. Save API key securely

Step 2: Install SDK

Install SDK for your language:

Node.js

npm install @notiboost/sdk

const { NotiBoost } = require('@notiboost/sdk');

const client = new NotiBoost({
  apiKey: process.env.NOTIBOOST_API_KEY
});

PHP

composer require notiboost/php-sdk

use NotiBoost\NotiBoostClient;

$client = new NotiBoostClient([
    'api_key' => getenv('NOTIBOOST_API_KEY')
]);

Step 3: Create User and Channel Data

Create user and configure channel data (email, phone, etc.):

Create User

// Node.js
await client.users.create({
  user_id: 'u_123',
  name: 'Nguyễn Văn A',
  phone: '+84901234567'
});

// Set channel data for all channels
await client.users.setChannelData('u_123', {
  email: 'user@example.com',
  phone: '+84901234567',
  push_token: 'fcm_token_abc123',
  push_platform: 'android',
  zns_oa_id: '123456789'
});

Step 4: Create Flow

Create notification flow with rules and channels:

Create Flow

// Create a flow for order confirmation
await client.flows.create({
  name: 'order_confirmation',
  description: 'Send ZNS when order is created',
  rules: [
    {
      condition: 'event_name == "order_created"',
      action: 'send_zns'
    }
  ],
  channels: ['zns'],
  template_id: 'tpl_order_confirm'
});

Step 5: Send Event

Send event to trigger notification:

Send Event

// Send an event
const result = await client.events.ingest({
  event_name: 'order_created',
  event_id: 'evt_001',
  occurred_at: new Date().toISOString(),
  user_id: 'u_123',
  properties: {
    order_id: 'A001',
    amount: 350000
  }
});

console.log('Trace ID:', result.trace_id);

Step 6: Check Status

Check message delivery status:

Check Status

// Check message status
const status = await client.messages.getStatus(result.trace_id);
console.log('Status:', status.delivery_status);
console.log('Channel:', status.channel);

Next Steps

Common Issues

Invalid API Key

Check API key in Dashboard and ensure it's set correctly.

User not receiving notifications

Check if channel data (email, phone) is set correctly. Use Observability to debug.

Flow not triggering

Check if event_name and rules in flow match the event being sent.