Skip to main content

Device Management (MDM) API

Provision Android enterprises, manage policies and enrollment tokens, and control enrolled devices.

All MDM endpoints are portal endpoints: authenticate with a dashboard access token (Authorization: Bearer ...) and pass your organization as org_id. See Authentication.

Enterprise

Create signup URL

POST /v1/mdm/enterprise/signup-url?org_id=YOUR_ORG_ID

Returns a Google-hosted URL the admin opens to bind a managed Google account. Google redirects back to callback_url with an enterpriseToken.

curl -X POST "https://api.simplr-ai.com/v1/mdm/enterprise/signup-url?org_id=YOUR_ORG_ID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "callback_url": "https://simplr-ai.com/dashboard/mdm/enroll" }'

Complete enterprise creation

POST /v1/mdm/enterprise?org_id=YOUR_ORG_ID
FieldTypeRequiredDescription
signup_url_namestringYesname returned by the signup-url call
enterprise_tokenstringYesenterpriseToken Google returned to the callback

Get enterprise

GET /v1/mdm/enterprise?org_id=YOUR_ORG_ID

Returns the org's enterprise, or null if not yet provisioned.

Overview

GET /v1/mdm/overview?org_id=YOUR_ORG_ID

Returns device counts: total_devices, active_devices, provisioning_devices, non_compliant_devices, and a by_mode breakdown.

Policies

GET    /v1/mdm/policies?org_id=YOUR_ORG_ID
POST /v1/mdm/policies?org_id=YOUR_ORG_ID
PATCH /v1/mdm/policies/{policy_id}?org_id=YOUR_ORG_ID

Create policy

FieldTypeRequiredDescription
namestringYesDisplay name
management_modestringYesfully_managed or work_profile
descriptionstringNoOptional description
policy_jsonobjectNoAMAPI policy document. Defaults to the baseline for the mode

Enrollment tokens

GET   /v1/mdm/enrollment-tokens?org_id=YOUR_ORG_ID
POST /v1/mdm/enrollment-tokens?org_id=YOUR_ORG_ID

Create token

FieldTypeRequiredDescription
policy_idstringYesPolicy the token enrolls into; determines the mode
duration_hoursnumberNoToken lifetime (default 168 / 7 days)
one_timebooleanNoSingle-use token (default false)

The response includes token_value and qr_content (the JSON encoded into the enrollment QR code).

Devices

GET     /v1/mdm/devices?org_id=YOUR_ORG_ID
GET /v1/mdm/devices/{device_id}?org_id=YOUR_ORG_ID
PATCH /v1/mdm/devices/{device_id}?org_id=YOUR_ORG_ID
POST /v1/mdm/devices/{device_id}/commands?org_id=YOUR_ORG_ID
DELETE /v1/mdm/devices/{device_id}?org_id=YOUR_ORG_ID

List supports state, mode, compliance, and group_id filters plus page / limit. The single-device response includes the device, recent commands, and an events timeline. Each device carries a compliance_state (compliant / grace_period / non_compliant / unknown), non_compliance_details, and grace_period_expires_at. PATCH updates editable metadata (name, ownership_type, assigned_user_id, custom_attributes). DELETE unenrolls (and wipes) a device.

Issue a command

curl -X POST "https://api.simplr-ai.com/v1/mdm/devices/DEVICE_ID/commands?org_id=YOUR_ORG_ID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "type": "LOCK" }'
typeEffect
LOCKLock the screen
REBOOTReboot the device
RESET_PASSWORDReset/clear the passcode
RELINQUISH_OWNERSHIPRemove a work profile
CLEAR_APP_DATAClear data for specified apps
WIPEWipe and unenroll

Groups

GET     /v1/mdm/groups?org_id=YOUR_ORG_ID
POST /v1/mdm/groups?org_id=YOUR_ORG_ID
PATCH /v1/mdm/groups/{group_id}?org_id=YOUR_ORG_ID
DELETE /v1/mdm/groups/{group_id}?org_id=YOUR_ORG_ID
POST /v1/mdm/groups/{group_id}/devices?org_id=YOUR_ORG_ID # assign devices
POST /v1/mdm/groups/{group_id}/commands?org_id=YOUR_ORG_ID # bulk command

A group may reference a policy_id. Assigning devices to a group applies that policy to them automatically. POST /groups/{id}/devices takes { "device_ids": [...] }; POST /groups/{id}/commands takes the same type values as a single-device command.

Audit log & reports

GET  /v1/mdm/audit-log?org_id=YOUR_ORG_ID                  # paginated, append-only
GET /v1/mdm/reports/fleet-inventory.csv?org_id=YOUR_ORG_ID
GET /v1/mdm/reports/compliance-summary.csv?org_id=YOUR_ORG_ID
GET /v1/mdm/audit-log/export.csv?org_id=YOUR_ORG_ID

The audit log lists every administrative and system action (filterable by action). The .csv endpoints stream a downloadable report.

Webhook events

Subscribe via the Webhooks API: mdm.device.enrolled, mdm.device.compliance_changed, mdm.command.completed.

For the end-to-end walkthrough, see the MDM guide.