Enable Push Notifications
Browser push lets a lead alert reach an agent even when the admin tab is in the background or closed. It is off platform-wide until you give the API a VAPID key pair. Once the keys are in place, a bell appears in the admin sidebar footer and each person turns it on for the browsers they want alerted. Nothing is pushed to anyone who has not turned the bell on.
Generate a key pair
Section titled “Generate a key pair”VAPID is the signing scheme push services use to know the platform, and not some third party, is the one sending. One pair serves every tenant on the platform. Either of these prints a public and a private key in the base64url form the API expects:
# From the idx-api directory, using the library the API already ships withuv run python -c "from py_vapid import Vapid, b64urlencode; \ from cryptography.hazmat.primitives import serialization as s; \ v = Vapid(); v.generate_keys(); \ print('VAPID_PUBLIC_KEY=' + b64urlencode(v.public_key.public_bytes(s.Encoding.X962, s.PublicFormat.UncompressedPoint))); \ print('VAPID_PRIVATE_KEY=' + b64urlencode(v.private_key.private_numbers().private_value.to_bytes(32, 'big')))"# Or with the reference Node toolnpx web-push generate-vapid-keysThe private key is a secret. Treat it like the SMTP password: it goes in .env on the host and nowhere else. Rotating it invalidates every existing subscription, so agents would have to turn the bell off and on again.
Configure the API
Section titled “Configure the API”-
Add the three variables to the API’s
.env:Terminal window VAPID_PUBLIC_KEY=BNc... # the public key, base64urlVAPID_PRIVATE_KEY=x3k... # the private key, base64urlVAPID_SUBJECT=mailto:ops@example.comVAPID_SUBJECTis the contact push services can use if the platform misbehaves. Amailto:address or anhttps://URL you actually watch. -
Recreate the API container so it reads the new values:
Terminal window docker compose --profile prod up -d idx-api -
Confirm the API sees them. With any agent-or-above credential:
Terminal window curl -s https://api.<DOMAIN>/api/v1/me/push/vapid-public-key \-H "Authorization: Bearer idx_..."# {"public_key":"BNc...","configured":true}configuredis only true when all three variables are set. With any of them missing the bell stays hidden and the API sends nothing.
Turn it on as a user
Section titled “Turn it on as a user”Every admin user does this once per browser.
- Open any admin page. The bell sits in the sidebar footer next to the theme switch (on the tablet rail it is the icon under the switch).
- Click it. The browser asks for permission to show notifications; allow it.
- A toast confirms the bell is on and offers Send a test. Take it. A notification titled Notifications are on should appear within a second or two. Clicking it focuses the admin tab.
Clicking the bell again turns it off for that browser and removes the subscription from the server. A crossed-out bell means the person blocked notifications for the site in their browser settings; only they can undo that, from the browser’s site permissions.
The browser, not the platform, remembers the on/off state. Signing in as a different person on the same browser hands the subscription to that person.
What gets pushed
Section titled “What gets pushed”Push is a second channel for the response-window alerts the lifecycle sweep already emails. Once the brokerage’s alert channels include push, each rung of the ladder (breach, reminder, escalation) also lands as a notification on every browser where the recipient turned the bell on: the assigned agent, or the brokerage’s brokers when the lead is unassigned. The notification carries the lead’s name and opens the lead page when clicked. See SLA targets for the ladder itself.
Nothing else is pushed today. Drip sends, tour requests and contact-form intake stay email-only.
Housekeeping the API does on its own
Section titled “Housekeeping the API does on its own”Subscriptions go stale: people clear site data, uninstall the browser, or the push service rotates the endpoint. The API prunes on delivery rather than on a schedule.
| Push service response | What happens to the subscription |
|---|---|
| Delivered | Failure count reset, last_used_at updated |
404 or 410 | Deleted immediately; the browser dropped it |
Anything else (timeout, 5xx, bad key) | Failure count incremented; deleted after five in a row |
Turning the bell on again in that browser recreates the row. Each user’s current subscriptions are visible at GET /api/v1/me/push/subscriptions with their own credential.