Notifications
onesignal

OneSignal

Push NotificationsIn-App MessagesEmailSMS

All-in-one customer messaging platform for push notifications, in-app messages, email, and SMS. Industry-leading free web push tier makes it the go-to for early-stage products.

License

Proprietary

Language

TypeScript / Python

31
Trust
Limited

Why OneSignal?

Web or mobile push notifications without building infrastructure

Multi-channel messaging (push + email + in-app) from one SDK

Early-stage product that needs free unlimited web push

Signal Breakdown

What drives the Trust Score

Weekly npm downloads
95k/wk
GitHub commits (90d)
80
GitHub stars
2.5k
Stack Overflow questions
9k
Community health
Active
Weighted Trust Score31 / 100

Download Trend

Last 12 months

Tradeoffs & Caveats

Know before you commit

Developer-first programmatic notifications — Novu has a better API DX

Complex notification workflows across many providers — Novu's abstraction is cleaner

Need SOC 2 Type II with full data residency — enterprise options like Braze are more suitable

Pricing

Free tier & paid plans

Free tier

Unlimited web push · 10k email/mo

Paid

From $9/mo (Growth)

Free tier is very generous for push notifications

Alternative Tools

Other options worth considering

novu
Novu79Good

Open-source notification infrastructure for developers. Unify in-app, email, SMS, push, and Slack notifications with a single API, workflow engine, and self-hostable dashboard.

Often Used Together

Complementary tools that pair well with OneSignal

nextjs

Next.js

Frontend & UI

98Excellent
View
supabase

Supabase

Database & Cache

95Excellent
View
firebase-fcm

Firebase Cloud Messaging

Notifications

44Limited
View
novu

Novu

Notifications

79Good
View
clerk

Clerk

Auth & Users

80Strong
View

Learning Resources

Docs, videos, tutorials, and courses

Get Started

Repository and installation options

View on GitHub

github.com/OneSignal/node-onesignal

npmnpm install @onesignal/node-onesignal

Quick Start

Copy and adapt to get going fast

import * as OneSignal from '@onesignal/node-onesignal';

const config = OneSignal.createConfiguration({ restApiKey: process.env.ONESIGNAL_API_KEY! });
const client = new OneSignal.DefaultApi(config);

// Target a specific user by external ID
const notification = new OneSignal.Notification();
notification.app_id = process.env.ONESIGNAL_APP_ID!;
notification.contents = { en: 'You have a new message' };
notification.include_external_user_ids = ['user_123'];
notification.target_channel = 'push';

const { id } = await client.createNotification(notification);
console.log('Sent notification:', id);

Code Examples

Common usage patterns

Browser push opt-in prompt

Initialize OneSignal and prompt users to subscribe to push

// In your HTML <head>
// <script src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.js" defer></script>

window.OneSignalDeferred = window.OneSignalDeferred || [];
window.OneSignalDeferred.push(async function(OneSignal) {
  await OneSignal.init({
    appId: process.env.NEXT_PUBLIC_ONESIGNAL_APP_ID,
    safari_web_id: process.env.NEXT_PUBLIC_ONESIGNAL_SAFARI_WEB_ID,
    notifyButton: { enable: true },
  });

  // Opt in the current user
  await OneSignal.User.PushSubscription.optIn();
  console.log('User subscribed:', OneSignal.User.PushSubscription.id);
});

Segment-targeted notification

Send a notification only to Pro plan users

import * as OneSignal from '@onesignal/node-onesignal';

const config = OneSignal.createConfiguration({ restApiKey: process.env.ONESIGNAL_API_KEY! });
const client = new OneSignal.DefaultApi(config);

// Requires a 'Pro Users' segment set up in the OneSignal dashboard
const notification = new OneSignal.Notification();
notification.app_id = process.env.ONESIGNAL_APP_ID!;
notification.included_segments = ['Pro Users'];
notification.contents = { en: 'Your monthly report is ready' };
notification.headings = { en: 'Report Ready' };
notification.url = 'https://app.example.com/reports';

await client.createNotification(notification);

Community Notes

Real experiences from developers who've used this tool