Create a command request
Issues a device or group-level command using the stable command API. This endpoint supports multi-OS environments and scheduling options, and should be used for all new command integrations. Common use cases: Installing or uninstalling apps, pushing certificates, modifying device settings, sending notifications, enforcing policies, and other device actions supported by Esper. Best Practices: Ensure the command is supported for the device’s OS before sending. Decide whether to target specific devices (DEVICE) or a device group (GROUP). Determine whether the command should run IMMEDIATE or use scheduling options (if supported by the command). Validate command_args carefully—payload structure differs by command. Understand the command lifecycle (queued → acknowledged → in progress → success/failure). Monitor execution and final state in the Event Feed after issuing the request. Important: Response bodies can vary depending on the command. For detailed examples and command-specific payload guidance, refer to the API Commands help documentation: https://help.esper.io/hc/en-us/articles/29710806069393-Creating-API-Commands
You can send the command immediately or schedule command for supported devices.
Scheduled commands are currently compatible with Android devices.
Request body
Response
Command request successfully created.