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
- Download the plugin and upload it under Plugins → Add New → Upload Plugin.
- In the dashboard: Websites → (site) → Setup → Connect WordPress and copy the code.
- In WordPress: Settings → Parwana Push → Connection. Paste the code and click Connect & test.
- 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
- Universal SDK kit: templates for HTML, PHP, Laravel, React and Next.js, plus the onboarding checklist
- WordPress plugin
- manifest.json: versions, pinned URLs and SHA-256 checksums