# Modify the configuration of a App Notification payload item within a profile To modify Ios App Notification policy payload item ## Endpoints `PUT /api/v1/mdm/profiles/{profile_id}/payloads/iosappnotificationpolicy/payloaditems/{payload_id}` ## Request URL ``` https://{serverurl}/api/v1/mdm/profiles/{profile_id}/payloads/iosappnotificationpolicy/payloaditems/{payload_id} ``` ## Scope ``` MDMOnDemand.MDMDeviceMgmt.UPDATE ``` ## Header ``` Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Path Parameters - **profile_id** (string) — Mandatory Unique identifier of the profile. Obtain from the [Create Profile](https://www.manageengine.com/mobile-device-management/help/api/cloud/profiles-create-profile.html) or [Get Profiles](https://www.manageengine.com/mobile-device-management/help/api/cloud/profiles-get-profile.html) response - **payload_id** (string) — Mandatory Unique identifier of the payload item. Obtain from the [Get Payload Item IDs](https://www.manageengine.com/mobile-device-management/help/api/cloud/ios-get-app-notification-payload-ios.html) response ### Query Parameters - **t** (long) — Optional - **ignoreHeader** (boolean) — Optional - **qlt** (long) — Optional - **previousTab** (string) — Optional - **service** (string) — Optional - **search** (string) — Optional Free-text search string applied to the default searchable fields of the resource - **all** (boolean) — Optional - **dc_customerid** (long) — Optional - **mdm_instance** (string) — Optional - **signupsrc** (string) — Optional - **zaaid** (string) — Optional - **command** (string) — Optional - **orderby** (string) — Optional - **sortorder** (string) — Optional - **select_all** (boolean) — Optional When true, applies the operation to every record matching the current filter rather than to specific IDs. Default: false - **zoho-internal** (boolean) — Optional - **dc_instance** (string) — Optional - **SUBREQUEST** (string) — Optional - **source** (string) — Optional - **nocache** (long) — Optional Param to avoid being served from cache - **wms_csrparam** (string) — Optional CSRF Token ## Request Body **Content-Type:** `application/json` **Type:** JSON object - **app_notification_settings** (JSON array) — Mandatory List of per-app notification settings Each item in the array is a JSON object with the following fields: - **notifications_enabled** (boolean) — Optional Whether notifications are enabled for this app. Default: true - **badges_enabled** (boolean) — Optional Whether badge count is shown. Default: true - **alert_type** (integer) — Optional Alert style. Allowed values: - `0` = None - `1` = Banners (temporary) - `2` = Alerts (require action) - **preview_type** (integer) — Optional Notification preview type. Allowed values: - `0` = Always - `1` = When Unlocked - `2` = Never - **grouping_type** (integer) — Optional Notification grouping. Allowed values: - `0` = Automatic - `1` = By App - `2` = Off - **show_in_notification_center** (boolean) — Optional Show in Notification Center. Default: true - **show_in_lock_screen** (boolean) — Optional Show on Lock Screen. Default: true - **show_in_car_play** (boolean) — Optional Show in CarPlay. Default: true - **sounds_enabled** (boolean) — Optional Whether notification sounds are enabled. Default: true - **critical_alert_enabled** (boolean) — Optional Whether critical alerts are enabled. Default: false - **apps** (array) — Optional List of app IDs (long) for this notification setting. Use the app_group_id from the [Apps API](https://www.manageengine.com/mobile-device-management/help/api/cloud/app-management-get-an-app.html) response ## Sample Request ### Curl ```bash curl --request PUT \ --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/iosappnotificationpolicy/payloaditems/{payload_id} \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/json' \ --data '{"app_notification_settings":[{}]}' ``` ### Java ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; import java.net.http.HttpTimeoutException; public class Main { public static void main(String[] args) { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/iosappnotificationpolicy/payloaditems/{payload_id}")) .header("content-type", "application/json") .header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") .method("PUT", HttpRequest.BodyPublishers.ofString("{\"app_notification_settings\":[{}]}")) .build(); HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("appdomain") payload = "{\"app_notification_settings\":[{}]}" headers = { 'content-type': "application/json", 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("PUT", "/api/v1/mdm/profiles/{profile_id}/payloads/iosappnotificationpolicy/payloaditems/{payload_id}", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript headersMap = Map(); headersMap.put("Content-Type", "application/json"); headersMap.put("Accept", "application/json"); data=Map(); data_app_notification_settings=List(); data_app_notification_settings_item1=Map(); data_app_notification_settings.add(data_app_notification_settings_item1); data.put("app_notification_settings",data_app_notification_settings); response = invokeUrl [ url: "https://appDomain/api/v1/mdm/profiles/{profile_id}/payloads/iosappnotificationpolicy/payloaditems/{payload_id}" type: PUT headers: headersMap body: data connection: connection_name ] info response; ``` ### PowerShell ```powershell $headers=@{} $headers.Add("content-type", "application/json") $headers.Add("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") $response = Invoke-WebRequest -Uri 'https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/iosappnotificationpolicy/payloaditems/{payload_id}' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{"app_notification_settings":[{}]}' ``` ## Sample Request Body ```json { "app_notification_settings": [ { "badges_enabled": true, "notifications_enabled": true, "alert_type": 1, "apps": [ 9007199254741072 ] } ] } ``` ## Response Parameters ### HTTP 200 **Response Body:** `application/json` **Type:** JSON object - **payload_id** (long) Unique identifier of the payload item - **app_notification_settings** (JSON array) List of per-app notification settings Each item contains: - **notifications_enabled** (boolean) Whether notifications are enabled for this app. Default: true - **badges_enabled** (boolean) Whether badge count is shown. Default: true - **alert_type** (integer) Alert style. Allowed values: - `0` = None - `1` = Banners (temporary) - `2` = Alerts (require action) - **preview_type** (integer) Notification preview type. Allowed values: - `0` = Always - `1` = When Unlocked - `2` = Never - **grouping_type** (integer) Notification grouping. Allowed values: - `0` = Automatic - `1` = By App - `2` = Off - **show_in_notification_center** (boolean) Show in Notification Center. Default: true - **show_in_lock_screen** (boolean) Show on Lock Screen. Default: true - **show_in_car_play** (boolean) Show in CarPlay. Default: true - **sounds_enabled** (boolean) Whether notification sounds are enabled. Default: true - **critical_alert_enabled** (boolean) Whether critical alerts are enabled. Default: false - **apps** (array) List of app IDs (long) for this notification setting. Use the app_group_id from the [Apps API](https://www.manageengine.com/mobile-device-management/help/api/cloud/app-management-get-an-app.html) response ## Sample Response: HTTP 200 ```json { "payload_id": 9007199254741000, "app_notification_settings": [ { "badges_enabled": true, "notifications_enabled": true, "alert_type": 1, "apps": [ 9007199254741072 ] } ] } ``` ## Possible Response Codes - **200** — HTTP code