[relaybell docs › Get started › Quickstart](https://relaybell.com/docs/quickstart) · [All docs as Markdown](https://relaybell.com/docs.md) · [Index for AI assistants](https://relaybell.com/llms.txt)

# Quickstart

> Add the snippet, host sw.js on your domain and send your first notification.

relaybell adds web push notifications to any website. Drop in a snippet, and you can collect subscribers and send notifications — with automation, targeting, and analytics — in minutes.

Grab your **Project ID** from your dashboard (**Install** page). On WordPress, use the [plugin](https://relaybell.com/docs/install-wordpress) instead — it does steps 1 and 2 for you.

**1. Add the snippet** to every page, just before `</body>`:

```html
<script src="https://relaybell.com/relaybell-sdk.js"></script>
<script>
  RelayBell.init({ projectId: "YOUR_PROJECT_ID", apiBase: "https://relaybell.com" });
</script>
```

Building with a JavaScript framework? See [Next.js](https://relaybell.com/docs/install-nextjs), [React](https://relaybell.com/docs/install-react) or [Vue and Nuxt](https://relaybell.com/docs/install-vue).

**2. Host the service worker.** Download [sw.js](https://relaybell.com/sw.js) and upload it to the root of your site, so it opens at `https://yoursite.com/sw.js`. Browsers only run a service worker from your own domain, so push can't work without this file. (Can't put it at the root? See [Installing the SDK](https://relaybell.com/docs/install).)

> **Warning:** Your site must be served over **HTTPS**: browsers allow service workers and push only on secure pages (`http://localhost` works for testing).

**3. Send.** relaybell now shows your opt-in prompt, subscribes visitors and stores them. To send from your server, create an **API key** under Settings → Developers → API keys and POST to the REST API (see [Sending](https://relaybell.com/docs/sending)) — or send from the dashboard.
