# Modify the configuration of a Passcode payload item within a profile To modify Mac Passcode policy payload item ## Endpoint `PUT /api/v1/mdm/profiles/{profile_id}/payloads/macpasscodepolicy/payloaditems/{payload_id}` ## Request ### Request URL `https://`[serverurl](https://www.manageengine.com/mobile-device-management/help/api/cloud/oauth-authentication-endpoint-domain.html)`/api/v1/mdm/profiles/{profile_id}/payloads/macpasscodepolicy/payloaditems/{payload_id}` ### Scope `MDMOnDemand.MDMDeviceMgmt.UPDATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** — string — **Mandatory** — `application/json` - **Accept** — string — **Mandatory** — `application/json` #### 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/mac-get-passcode-payload-mac.html) response. #### Request Body `application/json` JSON object: - **allow_simple_value** — boolean — Optional Allow Simple Value. Default: true - **require_alphanumeric** — boolean — Optional Require Alphanumeric. Default: false - **min_passcode_length** — integer — Optional Minimum passcode length. Allowed values: 0-16. Default: 0 - **min_complex_chars** — integer — Optional Minimum number of complex (non-alphanumeric) characters. Allowed values: 0-4. Default: 0 - **max_passcode_age** — integer — Optional Maximum number of days a passcode can remain unchanged. Allowed values: 0-730. Default: 0 - **auto_lock_idle_for** — integer — Optional Auto-lock idle time in minutes. Allowed values: 0-15. Default: 0 - **no_of_passcode_maintained** — integer — Optional Number of unique passcodes before reuse is allowed. Allowed values: 0-50. Default: 0 - **max_grace_period** — integer — Optional Maximum grace period in minutes before passcode is required. - **max_failed_attempts** — integer — Optional Maximum number of failed passcode attempts before device wipe. Allowed values: 2-11. Default: 11 - **restrict_passcode** — boolean — Optional Restrict Passcode. Default: false - **force_passcode** — boolean — Optional Force Passcode. Default: true - **change_at_next_auth** — boolean — Optional Change At Next Auth. Default: false - **mins_failed_login_reset** — integer — Optional Minutes after which failed login count resets. 0 means no reset. Default: 0 ### Sample Request ```curl curl --request PUT \ --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/macpasscodepolicy/payloaditems/{payload_id} \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{}' ``` ### Sample Request Body Modify Passcode payload item ```json { "min_passcode_length": -1, "max_passcode_age": 0, "require_alphanumeric": false, "min_complex_chars": -1, "restrict_passcode": false, "no_of_passcode_maintained": 0, "allow_simple_value": true, "auto_lock_idle_for": -1, "max_grace_period": -1, "max_failed_attempts": -1 } ``` ## Response ### Response Parameters #### HTTP Code 200 Response Body — `application/json` JSON object: - **payload_id** — long Unique identifier of the payload item - **allow_simple_value** — boolean Allow Simple Value. Default: true - **require_alphanumeric** — boolean Require Alphanumeric. Default: false - **min_passcode_length** — string Minimum passcode length. Allowed values: 0-16. Default: 0 - **min_complex_chars** — string Minimum number of complex (non-alphanumeric) characters. Allowed values: 0-4. Default: 0 - **max_passcode_age** — string Maximum number of days a passcode can remain unchanged. Allowed values: 0-730. Default: 0 - **auto_lock_idle_for** — string Auto-lock idle time in minutes. Allowed values: 0-15. Default: 0 - **no_of_passcode_maintained** — string Number of unique passcodes before reuse is allowed. Allowed values: 0-50. Default: 0 - **max_grace_period** — string Maximum grace period in minutes before passcode is required. - **max_failed_attempts** — string Maximum number of failed passcode attempts before device wipe. Allowed values: 2-11. Default: 11 - **restrict_passcode** — boolean Restrict Passcode. Default: false - **force_passcode** — boolean Force Passcode. Default: true - **change_at_next_auth** — boolean Change At Next Auth. Default: false - **mins_failed_login_reset** — string Minutes after which failed login count resets. 0 means no reset. Default: 0 ### Possible Response Codes - **200** — HTTP code ### Sample Response: HTTP 200 Passcode payload item successfully modified ```json { "min_passcode_length": -1, "max_passcode_age": 0, "payload_id": 9007199254741000, "require_alphanumeric": false, "min_complex_chars": -1, "restrict_passcode": false, "no_of_passcode_maintained": 0, "allow_simple_value": true, "auto_lock_idle_for": -1, "max_grace_period": -1, "max_failed_attempts": -1 } ``` ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 60 | **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.