# Add a new Restrictions payload configuration to an existing profile To create Mac Restrictions policy ## Endpoints **POST** `/api/v1/mdm/profiles/{profile_id}/payloads/macrestrictionspolicy` ## Request URL ``` https://{serverurl}/api/v1/mdm/profiles/{profile_id}/payloads/macrestrictionspolicy ``` ## Scope ``` MDMOnDemand.MDMDeviceMgmt.CREATE ``` ## 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. ### 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 ### Attributes - **allow_game_center** (boolean, Optional) — Allow Game Center. Default: true - **allow_modifi_wallpaper** (boolean, Optional) — Allow Modifi Wallpaper. Default: true - **allow_use_of_camera** (boolean, Optional) — Allow Use Of Camera. Default: true - **allow_cloud_document_sync** (boolean, Optional) — Allow Cloud Document Sync. Default: true - **allow_cloud_keychain_sync** (boolean, Optional) — Allow Cloud Keychain Sync. Default: true - **allow_touch_id** (boolean, Optional) — Allow Touch Id. Default: true - **safari_allow_autofill** (boolean, Optional) — Safari Allow Autofill. Default: true - **allow_spotlight_result** (boolean, Optional) — Allow Spotlight Result. Default: true - **force_assist_profanity_filter** (boolean, Optional) — Force Assist Profanity Filter. Default: false - **allow_activity_continuation** (boolean, Optional) — Allow Activity Continuation. Default: true - **allow_dictionary_lookup** (boolean, Optional) — Allow Dictionary Lookup. Default: true - **allow_music_service** (boolean, Optional) — Allow Music Service. Default: true - **allow_screen_capture** (boolean, Optional) — Allow Screen Capture. Default: true - **allow_classroom_remoteview** (boolean, Optional) — Allow Classroom Remoteview. Default: true - **force_classroom_auto_join** (boolean, Optional) — Force Classroom Auto Join. Default: false - **force_classroom_appdevicelock** (boolean, Optional) — Force Classroom Appdevicelock. Default: false - **force_classroom_remoteview** (boolean, Optional) — Force Classroom Remoteview. Default: false - **allow_password_autofill** (boolean, Optional) — Allow Password Autofill. Default: true - **allow_password_proximity** (boolean, Optional) — Allow Password Proximity. Default: true - **allow_password_sharing** (boolean, Optional) — Allow Password Sharing. Default: true - **allow_cloud_photo_lib** (boolean, Optional) — Allow Cloud Photo Lib. Default: true - **request_to_leave_classroom** (boolean, Optional) — Request To Leave Classroom. Default: false - **allow_content_caching** (boolean, Optional) — Allow Content Caching. Default: true - **allow_itunes_file_sharing** (boolean, Optional) — Allow Itunes File Sharing. Default: true - **allow_auto_unlock** (boolean, Optional) — Allow Auto Unlock. Default: true - **allow_cloud_desktop_document** (boolean, Optional) — Allow Cloud Desktop Document. Default: true - **allow_cloud_bookmarks** (boolean, Optional) — Allow Cloud Bookmarks. Default: true - **allow_cloud_mail** (boolean, Optional) — Allow Cloud Mail. Default: true - **allow_cloud_calender** (boolean, Optional) — Allow Cloud Calender. Default: true - **allow_cloud_reminders** (boolean, Optional) — Allow Cloud Reminders. Default: true - **allow_cloud_addressbook** (boolean, Optional) — Allow Cloud Addressbook. Default: true - **allow_cloud_notes** (boolean, Optional) — Allow Cloud Notes. Default: true - **gatekeeper_setting** (integer, Optional) — Gatekeeper app source restriction. Allowed values: 1 = App Store Only 2 = App Store and Identified Developers 3 = Anywhere 4 = Not Configured Default: 4 - **allow_override_gatekeeper** (boolean, Optional) — Allow Override Gatekeeper. Default: false - **allow_dictation** (boolean, Optional) — Allow Dictation. Default: true - **allow_assistant** (boolean, Optional) — Allow Assistant. Default: true - **allow_use_of_ibookstore** (boolean, Optional) — Allow Use Of Ibookstore. Default: true - **allow_ibookstore_erotica_media** (boolean, Optional) — Allow Ibookstore Erotica Media. Default: true - **movies_rating_value** (integer, Optional) — Movie content rating filter. US values: 0 = Don't Allow 100 = G 200 = PG 300 = PG-13 400 = R 500 = NC-17 1000 = Allow All Movies Default: 1000 - **tv_shows_rating_value** (integer, Optional) — TV show content rating filter. US values: 0 = Don't Allow 100 = TV-Y 200 = TV-Y7 300 = TV-G 400 = TV-PG 500 = TV-14 600 = TV-MA 1000 = Allow All TV Shows Default: 1000 - **apps_rating_value** (integer, Optional) — App Store content rating filter. US values: 0 = Don't Allow 100 = 4+ 200 = 9+ 300 = 12+ 600 = 17+ 1000 = Allow All Apps Default: 1000 - **allow_find_my_friend** (boolean, Optional) — Allow Find My Friend. Default: true - **allow_find_my_device** (boolean, Optional) — Allow Find My Device. Default: true - **allow_erase_content_settings** (boolean, Optional) — Allow Erase Content Settings. Default: true - **is_rating_enabled** (boolean, Optional) — Is Rating Enabled. Default: false - **country_code** (string, Optional) — Country Code. Default: us - **allow_cloud_private_relay** (boolean, Optional) — Allow Cloud Private Relay. Default: true - **allow_usb_restriction_mode** (boolean, Optional) — Allow Usb Restriction Mode. Default: true - **allow_universal_control** (boolean, Optional) — Allow Universal Control. Default: true - **allow_profile_installation** (boolean, Optional) — Allow Profile Installation. Default: true - **allow_rapid_security_response_installation** (boolean, Optional) — Allow Rapid Security Response Installation. Default: true - **allow_rapid_security_response_removal** (boolean, Optional) — Allow Rapid Security Response Removal. Default: true - **allow_airdrop** (boolean, Optional) — Allow Airdrop. Default: true - **allow_bluetooth_modification** (boolean, Optional) — Allow Bluetooth Modification. Default: true - **bluetooth_setting** (integer, Optional) — Bluetooth Setting. Allowed values: 0 = Off 1 = On 2 = Not Configured Default: 2 - **allow_marketplace_app_installation** (boolean, Optional) — Allow Marketplace App Installation. Default: true - **allow_web_distribution_app_installation** (boolean, Optional) — Allow Web Distribution App Installation. Default: true - **allow_modifi_passcode** (boolean, Optional) — Allow Modifi Passcode. Default: true - **allow_diagnostic_submission** (boolean, Optional) — Allow Diagnostic Submission. Default: True - **allow_apple_personalized_ads** (boolean, Optional) — Allow Apple Personalized Ads. Default: True - **allow_iphone_mirroring** (boolean, Optional) — Allow Iphone Mirroring. Default: True - **allow_modifi_device_name** (boolean, Optional) — Allow Modifi Device Name. Default: True - **allow_cloud_freeform** (boolean, Optional) — Allow Cloud Freeform. Default: True - **enforced_fingerprint_timeout** (long, Optional) — Enforced Fingerprint Timeout. Default: 172800 - **allow_modify_touch_id** (boolean, Optional) — Allow Modify Touch Id. Default: True - **allow_printer_sharing_modification** (boolean, Optional) — Allow Printer Sharing Modification. Default: True - **allow_file_sharing_modification** (boolean, Optional) — Allow File Sharing Modification. Default: True - **allow_internet_sharing_modification** (boolean, Optional) — Allow Internet Sharing Modification. Default: True - **allow_bluetooth_sharing_modification** (boolean, Optional) — Allow Bluetooth Sharing Modification. Default: True - **allow_time_machine_backup** (boolean, Optional) — Allow Time Machine Backup. Default: True - **allow_multiplayer_gaming** (boolean, Optional) — Allow Multiplayer Gaming. Default: True - **allow_local_user_creation** (boolean, Optional) — Allow Local User Creation. Default: True - **airplay_incoming_request** (boolean, Optional) — Airplay Incoming Request. Default: True - **allow_account_modification** (boolean, Optional) — Allow Account Modification. Default: True - **allow_ard_remote_management_modification** (boolean, Optional) — Allow Ard Remote Management Modification. Default: True - **allow_startup_disk_modification** (boolean, Optional) — Allow Startup Disk Modification. Default: True - **allow_remote_apple_events_modification** (boolean, Optional) — Allow Remote Apple Events Modification. Default: True - **allow_image_playground** (boolean, Optional) — Allow Image Playground. Default: True - **allow_writing_tools** (boolean, Optional) — Allow Writing Tools. Default: True - **allow_external_intelligence_integrations** (boolean, Optional) — Allow External Intelligence Integrations. Default: True - **force_delayed_software_updates** (boolean, Optional) — Force Delayed Software Updates. Default: False - **force_delayed_app_software_updates** (boolean, Optional) — Force Delayed App Software Updates. Default: False - **force_delayed_major_software_updates** (boolean, Optional) — Force Delayed Major Software Updates. Default: False - **software_update_delay** (long, Optional) — Software Update Delay. Default: 30 - **software_update_minor_os_deferred_install_delay** (long, Optional) — Software Update Minor OS Deferred Install Delay. Default: 30 - **software_update_major_os_deferred_install_delay** (long, Optional) — Software Update Major OS Deferred Install Delay. Default: 30 - **software_update_non_os_deferred_install_delay** (long, Optional) — Software Update Non OS Deferred Install Delay. Default: 30 - **allow_external_intelligence_integrations_signin** (boolean, Optional) — Allow External Intelligence Integrations Signin. Default: True - **allow_mail_summary** (boolean, Optional) — Allow Mail Summary. Default: True - **allow_notes_transcription_summary** (boolean, Optional) — Allow Notes Transcription Summary. Default: True - **allow_external_intelligence_workspace_ids** (string, Optional) — Allow External Intelligence Workspace Ids - **force_bypass_screen_capture_alert** (boolean, Optional) — Force Bypass Screen Capture Alert. Default: False - **allow_media_sharing_modification** (boolean, Optional) — Allow Media Sharing Modification. Default: False - **allow_apple_intelligence_report** (boolean, Optional) — Allow Apple Intelligence Report. Default: True - **allow_mail_smart_replies** (boolean, Optional) — Allow Mail Smart Replies. Default: True - **allow_safari_summary** (boolean, Optional) — Allow Safari Summary. Default: True - **allow_safari_private_browsing** (boolean, Optional) — Allow Safari Private Browsing. Default: True - **allow_safari_history_clearing** (boolean, Optional) — Allow Safari History Clearing. Default: True ## Sample Request ### Curl ```bash curl --request POST \ --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/macrestrictionspolicy \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/json' \ --data '{}' ``` ### Java ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class Main { public static void main(String[] args) throws Exception { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/macrestrictionspolicy")) .header("content-type", "application/json") .header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") .POST(HttpRequest.BodyPublishers.ofString("{}")) .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 = "{}" headers = { 'content-type': "application/json", 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("POST", "/api/v1/mdm/profiles/{profile_id}/payloads/macrestrictionspolicy", 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(); response = invokeUrl [ url: "https://appDomain/api/v1/mdm/profiles/{profile_id}/payloads/macrestrictionspolicy" type: POST 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/macrestrictionspolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}' ``` ## Sample Request Body Add Restrictions payload to the profile ```json { "allow_activity_continuation": true, "safari_allow_autofill": true, "force_assist_profanity_filter": false, "allow_cloud_document_sync": true, "allow_game_center": true, "allow_use_of_camera": true, "allow_touch_id": true, "allow_modifi_wallpaper": true, "allow_spotlight_result": true, "allow_cloud_keychain_sync": true } ``` ## Response Parameters ### HTTP 200 **Response Body:** `application/json` **Type:** JSON object #### Attributes - **payload_id** (long) — Unique identifier for the created payload item - All request body attributes listed above are returned with their configured values. ## Sample Response: HTTP 200 Restrictions payload successfully added ```json { "allow_activity_continuation": true, "payload_id": 9007199254741000, "safari_allow_autofill": true, "force_assist_profanity_filter": false, "allow_cloud_document_sync": true, "allow_game_center": true, "allow_use_of_camera": true, "allow_touch_id": true, "allow_modifi_wallpaper": true, "allow_spotlight_result": true, "allow_cloud_keychain_sync": true } ``` ## Possible Response Codes - **200** — HTTP code ## API Rate Limit **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.