Add a new App Notification payload configuration to an existing profile

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

To create Mac App Notification policy

Request URL

https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/macappnotificationpolicy

Scope

MDMDeviceMgmt.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Path Parameters

profile_idstringMandatory

Unique identifier of the profile. Obtain from the Create Profile or Get Profiles response

- Request Body

application/json
JSON Object
Hide Sub-Attributes
app_notification_settingsJSON ArrayMandatory

List of per-app notification settings

Show Sub-Attributes
JSON Object
Show Sub-Attributes
notifications_enabledbooleanOptional

Whether notifications are enabled for this app. true=enabled, false=disabled. Default: true

badges_enabledbooleanOptional

Whether badge count is shown on the app icon. true=show badges, false=hide badges. Default: true

alert_typeintegerOptional

Alert style for notifications. Allowed values: 0=None, 1=Banners (temporary), 2=Alerts (require user action)

show_in_notification_centerbooleanOptional

Whether notifications appear in Notification Center. true=show, false=hide. Default: true

show_in_lock_screenbooleanOptional

Whether notifications appear on the Lock Screen. true=show, false=hide. Default: true

sounds_enabledbooleanOptional

Whether notification sounds are played. true=enabled, false=silent. Default: true

critical_alert_enabledbooleanOptional

Whether critical alerts bypass Do Not Disturb. true=allow critical alerts, false=respect DND. Default: false

appsarrayMandatory

List of app IDs (long) to which this notification setting applies. Use the app_group_id from the Apps API response

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/macappnotificationpolicy \
  --header 'Accept: application/json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"app_notification_settings":[{"badges_enabled":true,"notifications_enabled":true,"alert_type":1,"apps":[9007199254741072]}]}'

Sample Request Body

Add App Notification payload to the profile

Copied!
  {
    "app_notification_settings": [
      {
        "badges_enabled": true,
        "notifications_enabled": true,
        "alert_type": 1,
        "apps": [
          9007199254741072
        ]
      }
    ]
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
payload_idlong

Unique identifier for the created payload item

app_notification_settingsJSON Array

List of per-app notification settings configured for this payload

Show Sub-Attributes
JSON Object
Show Sub-Attributes
notifications_enabledboolean

Whether notifications are enabled for this app

badges_enabledboolean

Whether badge count is shown on the app icon

alert_typestring

Alert style for notifications. Values: 0=None, 1=Banners (temporary), 2=Alerts (require user action)

show_in_notification_centerboolean

Whether notifications appear in Notification Center

show_in_lock_screenboolean

Whether notifications appear on the Lock Screen

sounds_enabledboolean

Whether notification sounds are played

critical_alert_enabledboolean

Whether critical alerts bypass Do Not Disturb

appsJSON Array

List of app objects associated with this notification setting

Show Sub-Attributes
JSON Object
Show Sub-Attributes
app_namestring

Display name of the app

app_idlong

Unique identifier of the app. Use the app_group_id from the Apps API response

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

App Notification payload successfully added

Copied!
  {
    "payload_id": 9007199254741000,
    "app_notification_settings": [
      {
        "badges_enabled": true,
        "notifications_enabled": true,
        "alert_type": 1,
        "apps": [
          9007199254741072
        ]
      }
    ]
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.