⚠️ Legacy feature. Compliance Policies (along with Templates, which apply them) are a legacy Esper product. For new device configuration work, use Blueprints instead — Compliance Policies remain available for existing Template-based deployments. See Introduction to Compliance Policies: https://help.esper.io/hc/en-us/articles/12653153592977-Introduction-to-Compliance-Policies
Partially updates a Compliance Policy.
Updates one or more fields of the specified Compliance Policy — including its restriction/permission configuration — without requiring the full object in the request body; only included fields are changed. Does not update configurations on devices linked to the policy. Apply a new policy to update the device.
About Compliance Policies A Compliance Policy is a set of device-configuration permissions and restrictions — screen and unlock behavior (keyguard, safe boot), connectivity (USB, tethering, NFC), communication (SMS, outgoing/incoming calls, dialer), hardware (camera, screenshots), and system controls (factory reset, ADB, side-loading, Play Store, app uninstall, date/time configuration) — that gets applied to a device after it has already been provisioned through a Template. They're commonly used to make a post-provisioning change to a Kiosk-mode device, such as temporarily re-enabling the status bar or ADB to pull a bug report, without re-provisioning the device. Templates and Compliance Policies are legacy Esper products; Blueprints are the current, recommended way to define device configuration for new work.
Key Fields / Query Parameters
policy_id— UUID of the Compliance Policy to updatename— Updated policy namedescription— Updated descriptionpolicy— Updated Policy Data object — the restriction/permission togglesis_active— Updated active state
Common Use Cases
- Temporarily loosening a restriction (e.g., re-enabling ADB or the status bar) on Kiosk devices to pull a bug report
- Re-tightening restrictions after a troubleshooting session is complete
- Renaming or deactivating a legacy policy without deleting it outright
- Mock serverhttps://develop-api.esper.io/_mock/openapi/enterprise/{enterprise_id}/policy/{policy_id}/
- https://develop-api.esper.cloud/apihttps://develop-api.esper.cloud/api/enterprise/{enterprise_id}/policy/{policy_id}/
curl -i -X PATCH \
'https://develop-api.esper.io/_mock/openapi/enterprise/{enterprise_id}/policy/{policy_id}/' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: */*' \
-d '{
"enterprise": "string",
"name": "string",
"description": "string",
"policy": {
"keyguardDisabled": true,
"safeBootDisabled": true,
"statusBarDisabled": true,
"factoryResetDisabled": true,
"screenshotDisabled": true,
"usbConnectivityDisabled": true,
"smsDisabled": true,
"outgoingCallsDisabled": true,
"cameraDisabled": true,
"nfcBeamDisabled": true,
"disablePlayStore": true,
"usbFileTransferDisabled": true,
"tetheringDisabled": true,
"dateTimeConfigDisabled": true,
"appUninstallDisabled": true,
"googleAssistantDisabled": true,
"disableLocalAppInstall": true,
"adbDisabled": true,
"phonePolicy": {
"incomingNumbers": [
"string"
],
"outgoingNumbers": [
"string"
],
"dialer": "DEFAULT",
"allowUssdCodes": false
},
"frpGoogles": [
{
"type": "USER",
"email": "user@example.com",
"googleId": "string"
}
],
"googleAccountPermission": {
"maxAccount": 0,
"emails": [
"user@example.com"
],
"domains": [
"string"
]
},
"devicePasswordPolicy": {
"passwordQuality": "PASSWORD_QUALITY_ALPHABETIC"
},
"minimumPasswordLength": 4,
"permissionPolicy": "PERMISSION_POLICY_PROMPT",
"deviceUpdatePolicy": {
"type": "TYPE_INSTALL_AUTOMATIC",
"maintenanceStart": 0,
"maintenanceEnd": 0
},
"settingsAccessLevel": "SYSTEM",
"settingsAppPassword": "pa$$word"
},
"is_active": true
}'successful operation
Count of Devices with this policy applied
{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "enterprise": "string", "url": "string", "name": "string", "description": "string", "device_count": 0, "google_policy_id": "string", "policy": { "keyguardDisabled": true, "safeBootDisabled": true, "statusBarDisabled": true, "factoryResetDisabled": true, "screenshotDisabled": true, "usbConnectivityDisabled": true, "smsDisabled": true, "outgoingCallsDisabled": true, "cameraDisabled": true, "nfcBeamDisabled": true, "disablePlayStore": true, "usbFileTransferDisabled": true, "tetheringDisabled": true, "dateTimeConfigDisabled": true, "appUninstallDisabled": true, "googleAssistantDisabled": true, "disableLocalAppInstall": true, "adbDisabled": true, "phonePolicy": { … }, "frpGoogles": [ … ], "googleAccountPermission": { … }, "devicePasswordPolicy": { … }, "minimumPasswordLength": 4, "permissionPolicy": "PERMISSION_POLICY_PROMPT", "deviceUpdatePolicy": { … }, "settingsAccessLevel": "SYSTEM", "settingsAppPassword": "pa$$word" }, "updated_on": "2019-08-24T14:15:22Z", "created_on": "2019-08-24T14:15:22Z", "is_active": true }