---
title: Unlock a Device
slug: epmm/v1web-service-api-guide/unlock-a-device
createdAt: 2026-11-03T13:30:15.969Z
---

This API unlocks a device.

On Android and iOS devices, unlocking the device clears its passcode.

On Blackberry devices, when a device without a user-generated passcode is locked, a special Ivanti EPMM passcode must be generated and shared with the user to unlock the device.  A special passcode may be generated based on unique device ID (uuid). For those device, this API returns the unlock passcode.

Refer to the Ivanti EPMM Administration Guide for details on unlock support.

:::hint{type="info"}
You can use this API with ServiceNow.
:::

**Examples**:

https\://\<Ivanti EPMM>/api/v1/dm/devices/unlock/ee8198d9-5d79-4961-94c4-e21bf04b2467?Reason=User%20forgot%20password

https\://\<Ivanti EPMM>/api/v1/dm/devices/unlock/mac/38AA3C62BFAD?Reason=User%20forgot%20password

| 1.URI:<br />https\:///api/v1/dm/devices/unlock/     | Unlock passcode for the device with the input device uuid is returned.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Http Method:                                        | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Format:                                             | xml, json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Request:                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Device UUID                                         | Required. Unique ID of the device. This ID is sent in the response of the Registration API.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Reason                                              | Required. Free form text field (512 character limit) to display reason why the device is being unlocked.                                                                                                                                                                                                                                                                                                                                                                                                     |
|                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 2.URI:<br />https\:///api/v1/dm/devices/unlock/mac/ | Unlock passcode for the device with the input device Wi-Fi MAC address is returned.                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Http Method:                                        | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Format:                                             | xml, json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Request:                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| macAddress                                          | Required.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Reason                                              | Required. Free form text field (512 character limit) to display reason why the device is being unlocked.                                                                                                                                                                                                                                                                                                                                                                                                     |
|                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Response Status Code:                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ‘404 – No Data Found’                               | There is no data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ‘200 – OK’                                          | Data is present and the response is returned.                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Response:                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \<deviceManagementWebServiceResponse>               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \<messages>                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \<message>1 passcode(s) sent.\</message>            | Status Message.<br />Passcode count is shown if the method execution is successful.<br />A descriptive error message is shown if the method execution failed.                                                                                                                                                                                                                                                                                                                                                |
| \</messages>                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \<passcodes>                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \<passcode>                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \<uuid>cf667a65-1e1a-4121-af63-398b11540d2f\</uuid> | Unique device ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| \<name> jdoe\:Android:6505551212\</name>            | Username\:Platform: phonenumber string to help distinguish between a user’s multiple devices.                                                                                                                                                                                                                                                                                                                                                                                                                |
| \<value>6910\</value>                               | For iOS devices:<br /><br />Q – The device is MDM managed and has a passcode.<br />F – The device is MDM managed but has no passcode.<br />NA – The device is not MDM managed. Unlock is not possible.<br /><br />For Android devices:<br />Q – The device has a passcode.<br />F – The device has no passcode.<br />NA – Unlock failed.<br /><br />For Blackberry devices:<br /><br />Passcode to unlock the device.  If value is empty, then the device was most likely locked with the user-set passcode. |
| \</passcode>                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \</passcodes>                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| \< /deviceManagementWebServiceResponse >            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

