Action Buttons
A notification can carry up to three buttons. Instead of reading an alert and then opening a laptop to do something about it, you act from the lock screen: open the run, fire the restart, copy the code.
The three types
| Type | What the button does | value holds |
|---|---|---|
view | Opens a URL | The URL, e.g. https://status.example.com |
http | Sends an HTTP request in the background | A JSON string: {"url":"…","method":"POST","headers":{…},"body":"…"} |
copy | Copies text to the clipboard | The literal text to copy |
For http, only url is required — method defaults to GET. When body is present and no content type is set, Content-Type: application/json is added automatically.
http and copy run without opening the app. view brings the app or browser to the foreground.
Where buttons appear
Buttons render in the system notification on both iOS and Android, and they also live inside the message itself. That second part matters: swipe the banner away and the buttons are still there when you open the message later.
Button labels on iOS
Android shows the exact label you send. iOS registers notification categories at app launch and cannot create labels on the fly, so it shows a generic label per type — Open, Run, Copy. Write labels that make sense on Android; iOS users will see the type instead.
Approval workflows
Two http buttons — Approve and Decline — turn a notification into a one-tap control panel. The pattern works for anything that pauses waiting on a human:
- A deploy pipeline that blocks on manual approval
- An LLM agent that needs sign-off before it spends money or touches production
- A refund above a threshold
- A door, a gate, a light, a garage
The request goes straight from the phone to your endpoint. Pocket Alert does not proxy it, and does not see the response body.
Idempotency is yours
Tapping the same http button twice sends the request twice — we do not block repeats. If double-firing is expensive, make the endpoint idempotent.
Buttons from webhooks
Webhooks can carry an action template with %path% placeholders, filled from the incoming payload. A Sentry alert can arrive with a working Open issue button pointing at that specific issue; a Stripe event with a View payment button for that charge.
Substituted values are JSON-escaped before the template is parsed, so a payload field containing quotes cannot break out and rewrite the URL. If a template resolves to something invalid, the buttons are dropped and the message is still delivered — a malformed button never costs you the alert.
Limits and validation
- Maximum 3 buttons per message; they render in the order you send them.
viewandhttprequire a validhttp(s)URL. Anything else returns400.- Unknown
typevalues return400.
Paid feature
Action buttons are stripped from messages on free plans, server-side. The message itself is delivered normally.
Known limitation
When a notification payload arrives while the app is backgrounded or terminated, the operating system renders its own banner — without the buttons. Open the message in the app and the buttons are there. Delivering buttons in the background needs a data-only push, which changes the push contract; it is planned, not shipped.
Related
- Create Message — the
actionsarray and full request reference - Priority levels — how loudly the alert lands
- Webhook Settings — action templates on incoming webhooks
