# Add a new Wi-Fi payload configuration to an existing profile To create Mac Wifi policy ## Endpoints `POST /api/v1/mdm/profiles/{profile_id}/payloads/macwifipolicy` ## Request URL `https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/macwifipolicy` ## Scope `MDMDeviceMgmt.CREATE` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers | Name | Type | Required | Value | |---|---|---|---| | Content-Type | string | Mandatory | application/json | | Accept | string | Mandatory | application/json | ### Path Parameters | Name | Type | Required | Description | |---|---|---|---| | profile_id | string | Mandatory | Unique identifier of the profile. Obtain from the [Create Profile](https://www.manageengine.com/products/desktop-central/help/api/onpremise/mdm-profiles-create-profile.html) or [Get Profiles](https://www.manageengine.com/products/desktop-central/help/api/onpremise/mdm-profiles-get-profile.html) response | ### Request Body `application/json` | Name | Type | Required | Description | |---|---|---|---| | sub_config | string | Optional | WiFi configuration sub-type indicating the authentication mode. Values: WIFI_NON_ENTERPRISE (personal/PSK networks) or WIFI_ENTERPRISE (802.1X networks). Default: WIFI_NON_ENTERPRISE | | service_set_identifier | string | Mandatory | The network name (SSID) of the WiFi network to connect to | | auto_join | boolean | Optional | Whether the device automatically joins this WiFi network when in range. Default: true | | hidden_network | boolean | Mandatory | Whether the WiFi network is hidden (does not broadcast its SSID). When true, the device will probe for the network. Default: false | | security_type | integer | Mandatory | WiFi security type. Allowed values: 0=None (Open), 1=WEP (Personal), 2=WPA/WPA2 (Personal), 3=Any (Personal), 4=WEP (Enterprise), 5=WPA/WPA2 (Enterprise), 6=Any (Enterprise), 7=WPA3 (Personal), 8=WPA3 (Enterprise) | | wifi_non_enterprise | JSON Object | Optional | Configuration object for personal/PSK WiFi networks containing the pre-shared key or WEP password | | wifi_enterprise | JSON Object | Optional | Configuration object for 802.1X enterprise WiFi networks containing EAP settings, certificates, and authentication credentials | | proxy_type | integer | Optional | Proxy configuration type. Allowed values: 0=None, 1=Manual, 2=Automatic (PAC URL) | | proxy_server | string | Optional | Hostname or IP address of the HTTP proxy server. Required when proxy_type is 1 (Manual) | | proxy_server_port | integer | Optional | Port number of the HTTP proxy server. Valid range: 0-65535. Default: 0 | | proxy_user_name | string | Optional | Username for proxy server authentication | | proxy_password | string | Optional | Password for proxy server authentication (sensitive - write-only, not returned in responses) | | proxy_password_id | long | Optional | Internal identifier for the stored proxy password credential | | proxy_pac_url | string | Optional | URL of the Proxy Auto-Configuration (PAC) file. Required when proxy_type is 2 (Automatic) | | setup_modes | integer | Optional | WiFi setup mode. Allowed values: 1=System mode, 2=Login window mode, 3=Both system and login window | | disable_mac_randomize | boolean | Optional | Whether to disable MAC address randomization for this network. When true, the device uses its real hardware MAC address. Default: false | ## Sample Request ```curl curl --request POST \ --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/macwifipolicy \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"wifi_non_enterprise":{},"sub_config":"WIFI_NON_ENTERPRISE","wifi_enterprise":{},"proxy_server":"value","auto_join":true,"hidden_network":false,"proxy_server_port":0,"service_set_identifier":"value","security_type":3,"proxy_type":0}' ``` ### Sample Request Body Add Wi-Fi payload to the profile ```json { "wifi_non_enterprise": {}, "sub_config": "WIFI_NON_ENTERPRISE", "wifi_enterprise": {}, "proxy_server": "value", "auto_join": true, "hidden_network": false, "proxy_server_port": 0, "service_set_identifier": "value", "security_type": 3, "proxy_type": 0 } ``` ## Response Parameters ### HTTP Code 200 Response Body: `application/json` | Name | Type | Description | |---|---|---| | payload_id | long | Unique identifier for the created payload item | | sub_config | string | WiFi configuration sub-type indicating the authentication mode. Values: WIFI_NON_ENTERPRISE (personal/PSK networks) or WIFI_ENTERPRISE (802.1X networks). Default: WIFI_NON_ENTERPRISE | | service_set_identifier | string | The network name (SSID) of the WiFi network to connect to | | auto_join | boolean | Whether the device automatically joins this WiFi network when in range. Default: true | | hidden_network | boolean | Whether the WiFi network is hidden (does not broadcast its SSID). When true, the device will probe for the network. Default: false | | security_type | string | WiFi security type. Allowed values: 0=None (Open), 1=WEP (Personal), 2=WPA/WPA2 (Personal), 3=Any (Personal), 4=WEP (Enterprise), 5=WPA/WPA2 (Enterprise), 6=Any (Enterprise), 7=WPA3 (Personal), 8=WPA3 (Enterprise) | | wifi_non_enterprise | JSON Object | Configuration object for personal/PSK WiFi networks containing the pre-shared key or WEP password | | wifi_enterprise | JSON Object | Configuration object for 802.1X enterprise WiFi networks containing EAP settings, certificates, and authentication credentials | | proxy_type | string | Proxy configuration type. Allowed values: 0=None, 1=Manual, 2=Automatic (PAC URL) | | proxy_server | string | Hostname or IP address of the HTTP proxy server. Required when proxy_type is 1 (Manual) | | proxy_server_port | string | Port number of the HTTP proxy server. Valid range: 0-65535. Default: 0 | | proxy_user_name | string | Username for proxy server authentication | | proxy_password | string | Password for proxy server authentication (sensitive - write-only, not returned in responses) | | proxy_password_id | long | Internal identifier for the stored proxy password credential | | proxy_pac_url | string | URL of the Proxy Auto-Configuration (PAC) file. Required when proxy_type is 2 (Automatic) | | setup_modes | string | WiFi setup mode. Allowed values: 1=System mode, 2=Login window mode, 3=Both system and login window | | disable_mac_randomize | boolean | Whether to disable MAC address randomization for this network. When true, the device uses its real hardware MAC address. Default: false | ### Possible Response Codes | Code | Description | |---|---| | 200 | HTTP code | ### Sample Response: HTTP 200 Wi-Fi payload successfully added ```json { "payload_id": 9007199254741000, "wifi_non_enterprise": {}, "sub_config": "WIFI_NON_ENTERPRISE", "wifi_enterprise": {}, "proxy_server": "value", "auto_join": true, "hidden_network": false, "proxy_server_port": 0, "service_set_identifier": "value", "security_type": 3, "proxy_type": 0 } ``` ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **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.