[GH-ISSUE #1336] Auto-expiring Notifications after N Seconds on Android/IOS #946

Open
opened 2026-05-07 00:29:01 +02:00 by BreizhHardware · 1 comment

Originally created by @Kris-Sportunity on GitHub (May 13, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1336

Feature Request:
Auto-expiring Notifications after N Seconds on Android/IOS

Description:
It would be very useful if ntfy notifications on Android/IOS could automatically dismiss themselves after a specified duration — for example, after 30 seconds.

Use Case:
Some notifications are time-sensitive and only relevant for a short period (e.g., reminders, alerts, presence triggers). Having them persist clutters the notification area unnecessarily.

This would be particularly helpful for:

  • Temporary alerts from Home Assistant
  • One-time timeouts or warnings
  • Notifications meant only for immediate user action

Example:
When my game PC consumes more than 100 watt per hour, my automation will turn on game mode (enable game lights and shut the roller blinds etc.). In most cases this is true, but sometimes I'm just doing some video editing.

It would be useful that a notification is send to my phone with a actionable link to disable the game mode. But if i don't do anything for 30 seconds, the notification will remove itself (so it's an opt-out).

Proposed Solution:
Add support for a custom message header such as:

Auto-Expire: 30

Where the value is the number of seconds after which the notification should be automatically dismissed by the client (the Android/IOS app).

Alternatively, integrate this into the Android app’s handling of messages with a new field like ttl_seconds in the payload or topic-level default.

Notes:
The server does not need to enforce this — the Android client can handle expiration via a scheduled cancel() on the notification manager.

Thank you for the awesome work on ntfy!

Originally created by @Kris-Sportunity on GitHub (May 13, 2025). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1336 **Feature Request:** Auto-expiring Notifications after N Seconds on Android/IOS **Description:** It would be very useful if ntfy notifications on Android/IOS could automatically dismiss themselves after a specified duration — for example, after 30 seconds. **Use Case:** Some notifications are time-sensitive and only relevant for a short period (e.g., reminders, alerts, presence triggers). Having them persist clutters the notification area unnecessarily. This would be particularly helpful for: - Temporary alerts from Home Assistant - One-time timeouts or warnings - Notifications meant only for immediate user action **Example:** When my game PC consumes more than 100 watt per hour, my automation will turn on game mode (enable game lights and shut the roller blinds etc.). In most cases this is true, but sometimes I'm just doing some video editing. It would be useful that a notification is send to my phone with a actionable link to disable the game mode. But if i don't do anything for 30 seconds, the notification will remove itself (so it's an opt-out). **Proposed Solution:** Add support for a custom message header such as: ``` Auto-Expire: 30 ``` Where the value is the number of seconds after which the notification should be automatically dismissed by the client (the Android/IOS app). Alternatively, integrate this into the Android app’s handling of messages with a new field like ttl_seconds in the payload or topic-level default. **Notes:** The server does not need to enforce this — the Android client can handle expiration via a scheduled cancel() on the notification manager. Thank you for the awesome work on ntfy!
Author
Owner

@spasche commented on GitHub (May 25, 2025):

Pushover has a similar feature, which they call "Time to Live". API documentation: https://pushover.net/api#ttl

<!-- gh-comment-id:2908008230 --> @spasche commented on GitHub (May 25, 2025): Pushover has a similar feature, which they call "Time to Live". API documentation: https://pushover.net/api#ttl
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#946
No description provided.