# How Can I Set The Time-To-Live (TTL) For a Push Notification?

The process to add a TTL to a push notification depends on the target platform. You can see a guide for each platform below.&#x20;

#### 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.&#x20;

```
{
  "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](https://firebase.google.com/docs/cloud-messaging/concept-options#ttl)

```
  "fcm": {
    "time_to_live": 10000, # Number of seconds
    "notification": {
      "body": "Hello World!"
    }
  }
```

#### Web Push

See our [documentation](https://pusher.com/docs/beams/reference/publish-payloads#web-format.) guide for an example of how to configure this for Web.&#x20;

{% hint style="info" %}
Still have questions? Please reach out to our Support team by visiting [this page](https://messagebird.com/support-center/Pusher-request-new).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/pusher/beams/beams/publishing/how-can-i-set-the-time-to-live-ttl-for-a-push-notification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
