The process to add a TTL to a push notification depends on the target platform. You can see a guide for each platform below.
APNS (iOS)
The `expiration` value can be set at part of the APNS payload as below. The value should be an EPOCH timestamp in the future.
{
"apns": {
"expiration": 1640995200,
"aps": {
"alert": {
"body": "Hello World!"
}
}
}
}
FCM (Android)
The `time_to_live` value can be set to the number of seconds FCM should hold the notification if the device is unreachable. The maximum and default value is 4 weeks. Read more about this in the Firebase documentation
"fcm": {
"time_to_live": 10000, # Number of seconds
"notification": {
"body": "Hello World!"
}
}
Web Push
See our documentation guide for an example of how to configure this for Web.