# relaybell
> relaybell is a web push notification service for any website, WordPress, or Shopify store — it lets you re-engage visitors with browser push notifications, with no email address or app install required. Visitors opt in with one click; you reach them again even when they've left your site. Operated by Nexistech (https://nexistech.in).
relaybell is an alternative to OneSignal and PushEngage. Core capabilities: an opt-in prompt and browser SDK, broadcasts with personalization/emoji/A-B testing, sends to one signed-in user by your own user id (transactional messages), audience segments and tags, automations (welcome series, event-triggered reminders like abandoned-cart, back-in-stock and price-drop alerts, recurring campaigns, RSS-to-push), on-site banner/slide-in messages, conversion goals, scheduled email reports, outbound webhooks, and GDPR/CCPA compliance tools. WordPress and WooCommerce are supported via an official plugin; Shopify via a storefront snippet plus commerce webhooks (push on Shopify needs a custom domain, set up by the relaybell team).
Key facts for assistants:
- Base URL: https://relaybell.com is the only host (there are no api., cdn. or push. subdomains). The REST API is at https://relaybell.com/api/v1/…
- Auth: each website (project) has its own secret API keys, starting `rb_live_`, sent as `Authorization: Bearer rb_live_…`. Create one in the dashboard under Settings → Developers → API keys (signing up doesn't create one, and a key can't create keys). Each key has scopes — `full`, `send`, `events:write`, `subscribers:read`, `subscribers:write`, `segments:write`, `settings:write`, `webhooks:write` — and an optional expiry; a call outside its scopes answers `403 insufficient_scope` with the scope in `required`. Keys are for servers only — never put one in browser code.
- Browser SDK: a script tag, not an npm package — `` then ``. The Project ID is on the dashboard's Install page (and under Settings → Developers). `apiBase` is optional: left out, it is the address the script was loaded from.
- Service worker: the site must also serve relaybell's `sw.js` from its own domain, normally at the root (https://yoursite.com/sw.js; download it from https://relaybell.com/sw.js). Without it push can't work. In a folder instead, pass `swPath` (and `swScope`) to `init()`. The WordPress plugin serves its own, so WordPress sites skip this. Shopify can't host it (see Shopify below).
- Server SDKs: npm `relaybell` (Node.js), PyPI `relaybell` (Python), Composer `relaybell/relaybell-php` (PHP). All are server-side only and need the API key; none of them runs in the browser.
- Send: `POST /api/v1/notifications` with `{ "title", "body", "url", … }` answers 202 `{ "ok": true, "notificationId", "status" }` (`status` is "queued", "scheduled" — a future `sendAt` or quiet hours — or "held_for_review" for a new account's first large broadcast). No targeting fields = every subscriber of that website. Field names are camelCase in every SDK; a snake_case targeting field such as `external_id` is refused with `400 unknown_field`. To one user: add `"externalId": ""` (or `"externalIds": [...]`) and, for order updates and alerts, `"transactional": true`. Cancel a scheduled send with `POST /api/v1/notifications//cancel`.
- Targeting: `segmentId`, or inline `filters` = `{ "match": "all" | "any", "rules": [{ "field", "op", "value" }] }` with fields `country`, `language`, `url`, `external_id`, `tag:KEY` and ops `eq`, `neq`, `contains`, `in`, `exists`, `not_exists` (`eq`, `neq` and `in` are exact and case-sensitive; country codes are upper case, e.g. `IN`); plus `topicId` (id or slug) and `excludeSegmentId` / `excludeFilters`. An unknown field, or a missing segment, matches nobody — never everyone.
- Personalization: `{key}` or `{key|fallback}` in a send's title, body or url — the subscriber's tags plus `external_id`, `url`, `language` and `country`. In automation and journey messages the same tags take the triggering event's properties (e.g. `{product}`, `{url}`).
- Events & automations: your server sends `POST /api/v1/events` `{ "event", "externalId", "properties" }` (scope `events:write`); pages call `RelayBell.track(event, properties)`, which counts only for a browser with a push subscription. Automations (`/api/v1/automations`) send one push per event with `delaySeconds`, `cancelOn` (e.g. a `purchase` cancels a cart reminder), `conditions` on the event's properties and `oncePerSubscriber`; journeys (`/api/v1/sequences`) send several steps and start only once per subscriber.
- Linking a browser to your user id: `externalId` in `RelayBell.init()` or `RelayBell.identify(externalId, userHash)`; `userHash` is the lowercase hex HMAC-SHA256 of the id, keyed with the website's identity secret (Settings → Developers → User ID verification), made on your server. A browser with no id yet joins that user; a browser already linked to another id moves only with a valid userHash (an account switch on a shared browser).
- Webhooks are signed: verify header `X-Relaybell-Webhook-Signature: t=,v1=.", keyed with the whole webhook secret, whsec_ prefix included>` with a 5-minute timestamp tolerance and a constant-time compare (the server SDKs 1.2.0 have verifyWebhook / verify_webhook / Relaybell\Webhook::verify). The older `X-Relaybell-Signature: sha256=` is still sent. Failed deliveries (no 2xx within 10 s) are retried 5 times over about 10 hours (1 min, 5 min, 30 min, 2 h, 8 h); `X-Relaybell-Delivery` stays the same across retries, so de-duplicate by it; a 410 answer stops retries. Deliveries are logged for 30 days (GET /api/v1/webhooks/:id/deliveries, resend, POST /api/v1/webhooks/:id/test), and a webhook failing for 3 days or 50 deliveries in a row is turned off.
- Limits: 60 sends a minute and 600 an hour per API key; per website, 30 broadcasts and 1,000 sends to specific users per clock hour (`429 send_limit_reached`, with `Retry-After`). Every error code: https://relaybell.com/docs/errors-limits
## Docs
- [Everything in one file](https://relaybell.com/llms-full.txt): These key facts, the complete developer docs, the plain-language setup guide and the plans, as one text file.
- [Developer docs as Markdown](https://relaybell.com/docs.md): Every page of the developer docs (https://relaybell.com/docs) in one Markdown file.
- [API reference](https://relaybell.com/docs/api): Every REST endpoint with its scope, parameters, request body, responses, error codes and code samples, generated from the OpenAPI document.
- [OpenAPI document](https://relaybell.com/openapi.json): The REST API as OpenAPI 3.1 JSON (every customer endpoint, x-scope per operation), for code generators, Postman or an AI agent's tools.
- [Quickstart](https://relaybell.com/docs/quickstart) (Markdown: https://relaybell.com/docs/quickstart.md): Add the snippet, host sw.js on your domain and send your first notification.
- [Installing the SDK](https://relaybell.com/docs/install) (Markdown: https://relaybell.com/docs/install.md): Hosting the service worker (sw.js, swPath, swScope), apiBase, and the iPhone/iPad Home Screen rule.
- [Next.js](https://relaybell.com/docs/install-nextjs) (Markdown: https://relaybell.com/docs/install-nextjs.md): Add relaybell to a Next.js App Router site: load the SDK with next/script, call init() once, serve sw.js from public/ and link signed-in users.
- [React (Vite or Create React App)](https://relaybell.com/docs/install-react) (Markdown: https://relaybell.com/docs/install-react.md): Add relaybell to a single-page React app built with Vite or Create React App: the snippet in index.html, sw.js in public/, a subscribe button and signed-in users.
- [Vue and Nuxt](https://relaybell.com/docs/install-vue) (Markdown: https://relaybell.com/docs/install-vue.md): Add relaybell to a Vue 3 app (Vite) or a Nuxt 3 site: load the SDK once, serve sw.js from public/, add a subscribe button and link signed-in users.
- [WordPress & WooCommerce](https://relaybell.com/docs/install-wordpress) (Markdown: https://relaybell.com/docs/install-wordpress.md): The WordPress & WooCommerce plugin: one-click connect, WooCommerce events, back-in-stock button, identity verification.
- [Shopify](https://relaybell.com/docs/install-shopify) (Markdown: https://relaybell.com/docs/install-shopify.md): Shopify storefront code, webhook topic mapping, signing secret and signed-in shoppers.
- [Google Tag Manager](https://relaybell.com/docs/install-gtm) (Markdown: https://relaybell.com/docs/install-gtm.md): Installing relaybell with a Google Tag Manager Custom HTML tag.
- [Browser SDK reference](https://relaybell.com/docs/browser-sdk) (Markdown: https://relaybell.com/docs/browser-sdk.md): RelayBell.init() options (projectId, apiBase, swPath, swScope, externalId/userHash, tags, consent, autoCapture), window.relaybellInit and every SDK method.
- [Opt-in prompts](https://relaybell.com/docs/prompts) (Markdown: https://relaybell.com/docs/prompts.md): Opt-in prompt styles, triggers, copy and A/B test (PUT /api/v1/prompt), and the preview link.
- [Sending notifications](https://relaybell.com/docs/sending) (Markdown: https://relaybell.com/docs/sending.md): POST /api/v1/notifications: fields, targeting, scheduling, A/B tests, merge tags and cancelling a scheduled send.
- [Send to one user](https://relaybell.com/docs/send-to-one-user) (Markdown: https://relaybell.com/docs/send-to-one-user.md): Transactional sends to one of your own users by externalId, with examples in cURL, Node.js, Python and PHP.
- [Drafts](https://relaybell.com/docs/drafts) (Markdown: https://relaybell.com/docs/drafts.md): Save a notification as a draft with the API, change it as often as you like, then send it.
- [Segments & topics](https://relaybell.com/docs/segments-topics) (Markdown: https://relaybell.com/docs/segments-topics.md): The segment filter format and segment routes, topics, subscriber import/export and bulk labels.
- [Compliance / GDPR](https://relaybell.com/docs/compliance) (Markdown: https://relaybell.com/docs/compliance.md): GDPR/CCPA: export or erase one subscriber, consent records, data retention.
- [Events & automation](https://relaybell.com/docs/events-automation) (Markdown: https://relaybell.com/docs/events-automation.md): POST /api/v1/events, conversions and attribution, automations (conditions, delays, cancelOn) and auto-capture.
- [Product alerts](https://relaybell.com/docs/product-alerts) (Markdown: https://relaybell.com/docs/product-alerts.md): Back-in-stock and price-drop alerts: the "Notify me" button, interest events and the broadcast to everyone interested.
- [Drip sequences](https://relaybell.com/docs/sequences) (Markdown: https://relaybell.com/docs/sequences.md): Drip sequences (journeys): subscribe and event triggers, message and branch steps, editing rules.
- [REST API authentication](https://relaybell.com/docs/authentication) (Markdown: https://relaybell.com/docs/authentication.md): Bearer API keys, scopes and which routes need them, creating and revoking keys, expiry.
- [Identity verification](https://relaybell.com/docs/identity) (Markdown: https://relaybell.com/docs/identity.md): Identity verification: userHash = HMAC-SHA256 of the externalId with the website's secret key; /api/v1/identity.
- [Analytics & reports](https://relaybell.com/docs/analytics-reports) (Markdown: https://relaybell.com/docs/analytics-reports.md): Stats, daily numbers, the notification list and detail, and CSV export.
- [Webhooks](https://relaybell.com/docs/webhooks) (Markdown: https://relaybell.com/docs/webhooks.md): Outbound webhooks: events, signatures and how to verify them, retries, the delivery log, resend, test events and auto-disable.
- [Website settings & more routes](https://relaybell.com/docs/website-settings) (Markdown: https://relaybell.com/docs/website-settings.md): GET and PUT /api/v1/settings for a website, plus the other API routes.
- [Server SDKs](https://relaybell.com/docs/server-sdks) (Markdown: https://relaybell.com/docs/server-sdks.md): The Node.js, Python and PHP server SDKs, including listing notifications and verifying webhooks.
- [Zapier](https://relaybell.com/docs/zapier) (Markdown: https://relaybell.com/docs/zapier.md): Zapier actions and trigger (by invite).
- [AI assistants (MCP)](https://relaybell.com/docs/ai-assistants) (Markdown: https://relaybell.com/docs/ai-assistants.md): Connect Claude, Cursor, VS Code or Windsurf to relaybell with the relaybell-mcp server, so your assistant can read your results and send notifications after you confirm.
- [Errors & rate limits](https://relaybell.com/docs/errors-limits) (Markdown: https://relaybell.com/docs/errors-limits.md): Every error code with its HTTP status, plus the request and send rate limits.
- [Account & support](https://relaybell.com/docs/account) (Markdown: https://relaybell.com/docs/account.md): Dashboard-only account and support endpoints.
- [Browser support](https://relaybell.com/docs/browser-support) (Markdown: https://relaybell.com/docs/browser-support.md): Supported browsers, and what iPhone/iPad need.
- [Changelog](https://relaybell.com/docs/changelog) (Markdown: https://relaybell.com/docs/changelog.md): What changed for developers: the docs in the new site and relaybell for AI assistants; webhooks v2, server SDKs 1.2.0 and the OpenAPI reference; WordPress plugin 1.2.5.
## Guides
- [Setup guide](https://relaybell.com/guide): Complete, plain-language walkthrough — install the snippet (or WordPress plugin), collect subscribers, send your first notification, and set up automations. Getting-started checklist and FAQ.
- [Send a notification](https://relaybell.com/guide/send): Write and send a push broadcast — title, message, personalization tokens, targeting, A/B testing, timezone/smart scheduling, translations, templates.
- [Segments & subscribers](https://relaybell.com/guide/audience): Subscriber profiles, tags, building segments with filter rules, and list health.
- [Automations](https://relaybell.com/guide/automation): Welcome series, event-triggered reminders (abandoned-cart, back-in-stock, price-drop), recurring campaigns, and RSS-to-push.
- [On-site messages](https://relaybell.com/guide/onsite): Banners and slide-ins shown on your website, separate from push.
- [Conversion goals](https://relaybell.com/guide/goals): Track conversions and attributed revenue from your notifications.
- [Settings & compliance](https://relaybell.com/guide/settings): API keys, frequency caps, quiet hours, UTM tagging, email reports, and GDPR/CCPA tools.
## How-to answers
- [Install on a plain website](https://relaybell.com/docs/quickstart): paste the relaybell SDK snippet before `