---
title: "How to send a silent push"
slug: "silent-push"
updated: 2026-06-05T12:50:15Z
published: 2026-06-05T12:54:43Z
canonical: "docs.xtremepush.com/silent-push"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to send a silent push

Push notifications can be silent, meaning that they contain no alert or sound and are mainly used to trigger actions in the app background or update the app with a payload.

## Setting up silent push notifications

### iOS

To utilise silent push notifications in iOS, you need to configure your application to do so even when it is in the background.

In order to configure this, in XCode, add the **Background Modes** capability under the **Signing & Capabilities** pane to the main app target. Select the **Remote Notifications** checkbox.

![](https://cdn.document360.io/b056e88b-f6c1-4bd2-b5b8-08e9336a17c9/Images/Documentation/19664f9ac6c30bdcb56123547153f339100ca61eed05c2ed7ee2fb629ced7716-Screenshot_2024-10-17_at_11.17.31(1).png)

Silent pushes on iOS are delivered to your app via the background fetch delegate. Add the method to your `AppDelegate ` and forward XPush notifications to the SDK:

**Objective-C**

```objectivec
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {

    if (userInfo[@"xpush"] != nil) {
        [XPush applicationDidReceiveRemoteNotification:userInfo
                               fetchCompletionHandler:completionHandler];
        return;
    }
    completionHandler(UIBackgroundFetchResultNoData);
}
```

**Swift**

```swift
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {

    if userInfo["xpush"] != nil {
        XPush.applicationDidReceiveRemoteNotification(userInfo,
                                                     fetchCompletionHandler: completionHandler)
        return
    }
    completionHandler(.noData)
}
```

### Android

There is not any requirements to use silent push on Android apps.

## Sending Silent Push Notifications

It's possible to send a silent push by creating an [API-triggered campaign](/documentation/docs/api-triggered-campaigns) and executing it using the [campaign execute](ref:campaign-execute) external endpoint. Set the **push_silent** flag to **1** in the message payload.

> [!WARNING]
> Attaching the title and the body with **push_silent** set to **1** is not recommended as it can cause undesired behaviour. For further details on iOS, please refer to the official Apple documentation on [background updates](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app).

A Sample silent push notification payload can be seen below:

**iOS Sample:**

**iOS Sample**

```shell
curl --request POST \
  --url 'https://external-api.xtremepush.com/api/external/execute/campaign' \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data-raw '{
    "id":"<campaign_id>",
    "apptoken":"<app_token>",
    "title":"Silent Push Notification",
    "android_push":0,
    "android_push_production":0,
    "ios_push":1,
    "ios_push_production":1,
    "ios_push_sandbox":1,
    "conditions":{
      "1":{
        "1":[
          "id",
          "=",
          "<device_id>"
        ],
        "operator":"AND"
      },
      "operator":"AND"
    },
    "broadcast":"0",
    "messages":{
      "1":{
        "push_silent":1,
        "payload_add":[
          {
              "key":"",
              "value":""
          },
          {
              "key":"",
              "value":""
          }
        ]
      }
    }
  }'
```

**Android Sample**

```powershell
curl --request POST \
     --url https://external-api.xtremepush.com/api/external/execute/campaign \
     --header 'accept: application/json' \
     --header 'content-type: application/json'{
  "id":"",
  "apptoken":"",
  "title":"Silent Push Notification”,
  "android_push":1,
  "android_push_production":1,
  "ios_push":0,
  "ios_push_production":0,
  "ios_push_sandbox":0,
  "conditions":{
     "1":{
        "1":[
           "id",
           "=",
           "<device_id>"
        ],
        "operator":"AND"
     },
     "operator":"AND"
  },
  "broadcast":"0",
  "push_text":"sample text",
  "messages":{
     "1":{
        "push_silent":1,
        "payload_add":[
           {
              "key":"",
              "value":""
           },
           {
              "key":"",
              "value":""
           },
           {
              "key":"",
              "value":""
           }
        ]
     }
  }
}'
```
