OneSignal
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.
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
Download Trend
Last 12 months
Tradeoffs & Caveats
Know before you commitDeveloper-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
Unlimited web push · 10k email/mo
From $9/mo (Growth)
Free tier is very generous for push notifications
Alternative Tools
Other options worth considering
Often Used Together
Complementary tools that pair well with OneSignal
Learning Resources
Docs, videos, tutorials, and courses
Get Started
Repository and installation options
View on GitHub
github.com/OneSignal/node-onesignal
npm install @onesignal/node-onesignalQuick 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