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
| Field | Type | Required | Description |
|---|---|---|---|
signup_url_name | string | Yes | name returned by the signup-url call |
enterprise_token | string | Yes | enterpriseToken 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name |
management_mode | string | Yes | fully_managed or work_profile |
description | string | No | Optional description |
policy_json | object | No | AMAPI 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
| Field | Type | Required | Description |
|---|---|---|---|
policy_id | string | Yes | Policy the token enrolls into; determines the mode |
duration_hours | number | No | Token lifetime (default 168 / 7 days) |
one_time | boolean | No | Single-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" }'
type | Effect |
|---|---|
LOCK | Lock the screen |
REBOOT | Reboot the device |
RESET_PASSWORD | Reset/clear the passcode |
RELINQUISH_OWNERSHIP | Remove a work profile |
CLEAR_APP_DATA | Clear data for specified apps |
WIPE | Wipe 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.