Create a command request
⚠️ Android only. This endpoint issues commands to Android-managed devices.
Alternative Available
A newer, multi-OS commands API is available and recommended for most use cases https://api.esper.io/openapi/command-request/createcommandrequest
Creates a command request targeting one or more devices or groups, dispatching a managed operation such as an install, reboot, lock, or configuration change. Accepts a V0CommandRequest body specifying the target scope (DEVICE, GROUP, or DYNAMIC), the command type, any required arguments, and an optional schedule. Returns the created command request including its id (request_id), which is used to poll for per-device execution status. Alternative endpoint- https://{foo}-api.esper.cloud/api/commands/v0/commands/
About Create Command Request
Esper's command system dispatches operations to enrolled Android devices asynchronously. A command request defines what to do (command), who to do it to (devices or groups), any parameters the command requires (command_args), and when to do it (schedule and schedule_args). The command_type field determines targeting scope: DEVICE targets up to 1,000 specific devices, GROUP targets up to 500 groups, and DYNAMIC targets a custom cross-group subset. After creation, use the request_id to query per-device execution status at the status endpoint.
Key Fields
command_type — targeting scope: DEVICE, GROUP, or DYNAMIC
devices — list of device UUIDs to target (up to 1,000); used with command_type: DEVICE
groups — list of group UUIDs to target (up to 500); used with command_type: GROUP
command — the operation to perform (e.g. INSTALL, REBOOT, LOCK; see V0DeviceCommandEnum for the full list)
command_args — command-specific parameters (e.g. app_version UUID for INSTALL, package_name for CLEAR_APP_DATA)
schedule — scheduling mode (immediate or deferred)
schedule_args — scheduling parameters when using deferred execution
See https://help.esper.io/hc/en-us/articles/29710806069393-Creating-API-Commands for command examples.
Path parameters
ID of the enterprise
Response
command request successfully created