Getting Started
Add push notifications to your website in minutes with Pushary
What is Pushary?
Pushary is a complete push notification platform for web applications. Send notifications directly to your users' browsers - no mobile app required.
SDKs
Pushary provides two SDKs for different use cases:
Client SDK (@pushary/sdk)
For browser-side integration. Handles:
- User subscription management
- Permission prompts
- Service worker registration
- Click tracking
Server SDK (@pushary/server)
For backend integration. Enables:
- Subscriber management
- Campaign creation and sending
- Template management
- Direct notification sending
Quick Start
1. Create a Site
Sign up at pushary.com and create a site in your dashboard.
2. Get Your Keys
From your dashboard settings, you'll receive:
- Site Key (
pk_xxx) - Public, for client SDK - Full API Key (
pk_xxx.sk_xxx) - Secret, for server SDK
3. Install the SDK
For browser integration:
npm install @pushary/sdkFor server-side:
npm install @pushary/server4. Initialize
Browser (Client SDK):
import { createPushary } from '@pushary/sdk'
const pushary = createPushary({
siteKey: 'pk_your_site_key',
autoPrompt: true,
})Server (Server SDK):
import { createPusharyServer } from '@pushary/server'
const pushary = createPusharyServer({
apiKey: process.env.PUSHARY_API_KEY, // pk_xxx.sk_xxx
})
await pushary.notifications.send({
title: 'Hello!',
body: 'Welcome to Pushary',
subscriberIds: ['sub_123'],
})