Documentation

How to connect a website to Parwana Push. Your dashboard's Websites → Setup tab gives you the exact snippets, with your site key already filled in.

1. Register the website

In the dashboard, open Websites → Add website and enter the site's exact https origin. New websites start with live sending locked. Only test notifications work until someone records a test on a real device.

2. Serve the service worker from your site

Create /parwana-sw.js at your site root (Content-Type application/javascript, no long caching):

importScripts('https://parwanapush.com/sdk/v1/sw.js');

3. Add the SDK

Before </body>. The script is async and does not block rendering. Use your public site key (pk_… from the Install tab).

<script src="https://parwanapush.com/sdk/v1/parwana.min.js" async></script>
<script>
  window.parwanaQueue = window.parwanaQueue || [];
  window.parwanaQueue.push(function (parwana) {
    parwana.init({ siteKey: 'YOUR_SITE_KEY', serviceWorker: '/parwana-sw.js' });
  });
</script>

If your site has a Content-Security-Policy, allow https://parwanapush.com in script-src and connect-src.

WordPress

  1. Download the plugin and upload it under Plugins → Add New → Upload Plugin.
  2. In the dashboard: Websites → (site) → Setup → Connect WordPress and copy the code.
  3. In WordPress: Settings → Parwana Push → Connection. Paste the code and click Connect & test.
  4. Check that every row on the plugin's Health tab is green.

Server API

Base URL https://parwanapush.com/api/v1. Authenticate with Authorization: Bearer pk_live_…. Only use API keys server-side; never put them in browser code.

curl -X POST https://parwanapush.com/api/v1/server/campaigns \
  -H "Authorization: Bearer $PARWANA_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"New post","title":"Hello","body":"New post","url":"https://example.com/post","dedupe_key":"post-123"}'

Downloads