Expiry TTL
TTL (Time to Live) controls how long a message stays active before it expires. Set it in seconds to auto-remove outdated notifications, keeping things relevant and clutter-free. ⏳
Not every notification needs to stick around forever. With TTL, you decide how long a message remains visible before disappearing automatically.
Set in Seconds: Define how long the message should stay active.
Expires Silently: No extra notifications—just poof, gone.
Defaults to Forever: If you don’t set a TTL, the message won’t expire on its own.
At the moment JustPush.io receives a push notification, we calculate the expiry based on the expiry_ttl
. The expiry_ttl
is in seconds and is added to the time of receipt.
Use Cases
Some notifications are only relevant for a short time. TTL ensures they disappear when they’re no longer useful, keeping your notifications fresh and clutter-free. Here’s when to use it:
Good Use Cases
✅ Temporary Alerts: A flash sale notification that expires after an hour. ✅ Live Data Feeds: Stock updates that auto-remove after 60 seconds. ✅ Event Reminders: A meeting alert that vanishes when the meeting starts.
Bad Use Cases
❌ Using a short TTL for critical alerts. (Gone before you see it!) ❌ Setting TTL too long for temporary updates. (Old news clutters your feed.)
Requirements
expiry_ttl
integer
max
2147483647
Example Request
curl -X "POST" "https://api.justpush.io/messages" \
-H 'Content-Type: application/json' \
-d $'{
"user": "<< USER KEY >>",
"title": "A simple title",
"message": "A simple test message",
"expiry_ttl": "90",
}'
Mobile App
Below you see an example of how this displayed as a push message and within the app.
Push Message

JustPush.io App

Frequently Asked Questions
Last updated