Buttons

We lets you add up to 10 buttons per message for quick actions. Each button has a label (max 25 characters), a URL, and an optional action requirement to ensure it gets acknowledged. 🚀


Why just read a notification when you can act on it? Buttons let you turn a simple alert into an interactive experience—open a URL, trigger an API call, or acknowledge an urgent message with one tap.

  • Up to 10 buttons per message.

  • CTA (Call to Action): A short, clear label (max 25 characters).

  • URL: The destination link for the button.

  • Action Required: If true, the message won’t be marked as read until the button is clicked.

Use Case

Buttons make your notifications actionable. Instead of just reading an alert, users can respond instantly—whether it’s fixing an issue, tracking an order, or approving a request. Here are some ways to use them effectively:

Good Use Cases

Incident Response: "🔧 Fix Now" links to your monitoring system. ✅ Order Alerts: "📦 Track Order" opens a shipping page. ✅ Security Notifications: "🚪 View Camera" shows a live feed. ✅ Approval Requests: "✅ Approve" | ❌ Reject" for workflow automation.

Bad Use Cases

Super long CTAs. ("Click this button to resolve the issue immediately") ❌ Broken or missing URLs. ("Open Dashboard" should actually open the dashboard.) ❌ Using action_required for everything. (Your users will not be happy.)

Requirements

Attribute
Data Type
Validation Criteria

buttons

array

max 10 items

buttons.*.cta

string

max 255 characters

buttons.*.url

url

a valid url

buttons.*.action_required

boolean

Example Request

curl -X "POST" "https://api.justpush.io/messages" \
     -H 'Content-Type: application/json' \
     -H 'Cookie: __cf_bm=eqEiJxfuqxBpd7.rYTRfNRTh0B7MEkwceNTDR3XExoM-1742157025-1.0.1.1-XAdo4uOcyTtElg.lGx9USRnw4c8Lh6qDJ.ju.G8.gvB.bz7vTfmyPgYSqc7EGfbhVWLGlnLVDsF41l7GbCe1xqrQ7J0_iIOVZqRQVoA_WDk' \
     -d $'{
  "user": "<< USER KEY >>",     
  "message": "A simple test message",
  "title": "A simple title",
  "buttons": [
    {
      "cta": "Button1",
      "url": "https://www.action1.com",
      "action_required": false
    }
  ]
}'

Mobile App

Below you see an example of how this displayed as a push message and within the app.

Push Message

Push Message with Title and Message

JustPush.io App

Message with a single button

Frequently Asked Questions

What happens if I don’t set a URL?

Simple, the button will not do anything.

Can I mix buttons with and without action_required?

Yep! Some can be optional, while others require acknowledgment.

What if my CTA is longer than 25 characters?

It will get cut off, so keep it short and snappy.

Can buttons trigger actions inside apps?

At the moment we can't but we are planning to add this.

Last updated