---
title: "Push notifications · Agent Wranglers"
url: https://agentwranglers.se/playbook/notifications/push-notifications
updated: 2026-10-20
licence: "All rights reserved"
---

# Push notifications

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> Ask for permission after a click that explains why, send through the standard push services with short lives, and drop dead subscriptions at once.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers notifications playbook: https://agentwranglers.se/playbook/notifications/push-notifications`.

## Required

- [Ask for permission after a clear action](https://agentwranglers.se/playbook/notifications/push-notifications/push-permission-in-context): Ask for notification permission only after the person clicks a control that says what they will get. Never ask on page load.
- [Send web push with VAPID and an encrypted payload](https://agentwranglers.se/playbook/notifications/push-notifications/web-push-vapid): Send web push through each subscription's push service with VAPID keys (RFC 8292) and an encrypted payload (RFC 8291). Never build your own polling or socket for background alerts.
- [Use the current APNs and FCM interfaces](https://agentwranglers.se/playbook/notifications/push-notifications/apns-fcm-current-apis): Send to Apple devices through APNs over HTTP/2 with token-based auth, and to Android through the FCM HTTP v1 API. Never use the retired legacy FCM API.
- [Delete dead subscriptions and tokens at once](https://agentwranglers.se/playbook/notifications/push-notifications/prune-push-subscriptions): Delete a push subscription or device token as soon as the service says it is gone. Remove tokens the app has not refreshed for 270 days.
- [Keep push payloads short and safe on a lock screen](https://agentwranglers.se/playbook/notifications/push-notifications/push-payload-privacy): Put no secrets, codes, health or money details in a push. Show a neutral line and the details only after sign-in. Keep the payload JSON at or under 3,993 bytes.

## Recommended

- [Give every push a lifetime and a topic](https://agentwranglers.se/playbook/notifications/push-notifications/push-ttl-and-collapse): Set how long each push may wait for an offline device. Give updates a topic, so a newer push replaces the older one.
- [Open the exact page the push is about](https://agentwranglers.se/playbook/notifications/push-notifications/push-deep-links): A tap on a notification opens the page it is about, reuses an open tab when there is one, and marks the item as read.

- Previous: [Channels and preferences](https://agentwranglers.se/playbook/notifications/channels-and-preferences)
- Next: [Text messages](https://agentwranglers.se/playbook/notifications/text-messages)
- [All chapters](https://agentwranglers.se/playbook/notifications)
