Features Pricing Docs Contact About
Sign In Get Started Free

Quick Start

Get PushWave running on your website in under 5 minutes.

You'll need a PushWave account and API key. Create a free account →

Installation

HTML Snippet

Add the following snippet before the closing </body> tag on every page:

<script>
  (function(w,d,s,id){
    w.PushWave = w.PushWave || {};
    w.PushWave.apiKey = 'YOUR_API_KEY';
    var js = d.createElement(s);
    js.src = 'https://www.pushwave.org/sdk/pushwave.js';
    d.head.appendChild(js);
  })(window, document, 'script', 'pushwave-sdk');
</script>

NPM Package

npm install pushwave-sdk
import PushWave from 'pushwave-sdk';
PushWave.init({ apiKey: 'YOUR_API_KEY' });

Service Worker

Download and place the service worker file at the root of your domain:

curl -o /public/pushwave-sw.js https://www.pushwave.org/sdk/pushwave-sw.js
The service worker must be served from your domain root — e.g. https://yoursite.com/pushwave-sw.js

Configuration Options

PushWave.init({
  apiKey: 'YOUR_API_KEY',      // Required
  autoSubscribe: false,         // Show prompt automatically?
  promptDelay: 5000,            // ms before showing prompt
  swPath: '/pushwave-sw.js',    // Path to service worker
  tags: ['newsletter'],         // Custom subscriber tags
});
ParameterTypeDefaultDescription
apiKeystringYour PushWave API key (required)
autoSubscribebooleantrueShow prompt automatically on page load
promptDelaynumber3000Delay in ms before showing the prompt
swPathstring/pushwave-sw.jsPath to the service worker file
tagsstring[][]Tags to assign to the subscriber

REST API Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Base URL: https://www.pushwave.org/api/v1

API Endpoints

POST /subscribe.php

POST https://www.pushwave.org/api/v1/subscribe.php
{
  "endpoint": "https://fcm.googleapis.com/...",
  "auth": "base64-key",
  "p256dh": "base64-key",
  "browser": "Chrome",
  "os": "Windows",
  "device_type": "desktop"
}

POST /campaigns.php

POST https://www.pushwave.org/api/v1/campaigns.php
{
  "title": "Flash Sale — 40% OFF",
  "message": "Limited time offer!",
  "url": "https://yoursite.com/sale",
  "target": "all"
}

Webhooks

PushWave can send real-time events to your server via webhooks.

Supported Events

  • subscriber.created — New subscriber added
  • subscriber.removed — Subscriber unsubscribed
  • campaign.sent — Campaign delivery completed
  • campaign.clicked — Notification clicked by subscriber