Quickstart

  • Use the provided Colab quickstart guide to enroll an enterprise, create a policy, and provision a device for the Android Management API.

  • To use the quickstart, you need an Android 6.0+ device, a non-enterprise Gmail account, and a Cloud Platform project you own or can edit.

  • Optional cleanup steps include deprovisioning a device using itsdeviceId and deleting the enterprise through the managed Google Play admin settings.

  • Further resources like the Introduction, Developer's guide, API reference, and client libraries are available to start developing with the Android Management API.

To get started with the Android Management API, we've created aColabnotebook that you can follow to enroll an enterprise, create a policy, andprovision a device.

Colab is a free cloud service offered by Google. Colab notebooks can be used to store and run code samples, and are compatible with Google Drive.

To use the quickstart guide, you need:

Open quickstart guide

Cleanup (optional)

To reset your device and unbind your Gmail account from theenterprise youcreated, follow these steps:

1. Deprovision a device

Before you can deprovision a device, you need the device'sdeviceId. To get alist of all your provisioned devices, callenterprises.devices.list andspecify:

  • parent: The enterprise name in the form ofenterprises/{enterprise-id}.

A successful response contains an array ofdevicesresources. Because you only need thename field to deprovision a device, theexample response here is shortened.

{  "devices": [    {      "name": "enterprises/{enterprise-id}/devices/{device-id}",      "state": "ACTIVE",      // Additional device resource fields    }  ]}

To deprovision and factory-reset a device, callenterprises.devices.delete andspecify:

  • name: The device ID in the form ofenterprises/{enterprise-id}/devices/{device-id}.

If successful, the request returns an empty response body.

2. Delete an enterprise

You can only associate your Gmail account with a single enterprise. To unbindyour account from an enterprise, you need to delete the enterprise:

  1. Visitplay.google.com/work with the accountused to create the enterprise.
  2. SelectAdmin Settings.
  3. In Organization information, select the three vertical dots.
  4. ClickDelete Organization.
You can now use your Gmail account to create another enterprise.

Start developing

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-29 UTC.