Esper Commands API

APIs to run device commands. `This version of commands is being deprecated and documentation will be archived soon. Please use Commands V2.`

Business capability
IT Operations Management BC-600.40

Operations 2

POST /enterprise/{enterprise_id}/device/{device_id}/command/ Run commands on device #
GET /enterprise/{enterprise_id}/device/{device_id}/command/{command_id}/ Get command status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/esper-commands-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

esper-commands-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: '# Introduction

    Esper APIs are a set of REST-based APIs that help you programmatically control and monitor Android-based Dedicated Devices running the Esper agent using Esper Manage.'
  version: 1.0.0
  title: ESPER API REFERENCE Commands API
  termsOfService: https://esper.io/terms-of-service
  contact:
    email: developer@esper.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://foo-api.esper.cloud/api
tags:
- name: Commands
  description: 'APIs to run device commands.

    `This version of commands is being deprecated and documentation will be archived soon. Please use Commands V2.`'
  externalDocs:
    description: Find out more about device commands
    url: https://docs.esper.io/home/console/device-management/-/#device-actions
paths:
  /enterprise/{enterprise_id}/device/{device_id}/command/:
    post:
      summary: Run commands on device
      description: Fire commands on device like reboot, ping etc. Deprecated in favour of commands V2.
      operationId: runCommand
      deprecated: true
      parameters:
      - name: enterprise_id
        in: path
        description: ID of the enterprise
        required: true
        schema:
          type: string
          format: uuid
      - name: device_id
        in: path
        description: ID of the device
        required: true
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceCommand'
      security:
      - apiKey: []
      tags:
      - Commands
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommandRequest'
        description: Command request body
        required: true
  /enterprise/{enterprise_id}/device/{device_id}/command/{command_id}/:
    parameters:
    - name: command_id
      in: path
      description: A UUID string identifying this device command.
      required: true
      schema:
        type: string
        format: uuid
    - name: device_id
      in: path
      description: A UUID string identifying this device.
      required: true
      schema:
        type: string
        format: uuid
    - name: enterprise_id
      description: A UUID string identifying enterprise.
      in: path
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getCommand
      summary: Get command status
      description: Return DeviceCommand instance. Deprecated in favour of commands V2.
      deprecated: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceCommand'
      security:
      - apiKey: []
      tags:
      - Commands
components:
  schemas:
    SettingsRotateStateEnum:
      type: integer
      description: 'Device settings rotate state enum


        ```

        * AUTO = 0

        * PORTRAIT_ONLY = 1

        * LANDSCAPE_ONLY = 2

        ```

        '
      enum:
      - 0
      - 1
      - 2
    SettingsGPSStateEnum:
      type: integer
      description: 'Device settings GPS state enum


        ```

        * LOCATION_MODE_HIGH_ACCURACY = 0

        * LOCATION_MODE_SENSORS_ONLY = 1

        * LOCATION_MODE_BATTERY_SAVING = 2

        * LOCATION_MODE_OFF = 3

        ```

        '
      enum:
      - 0
      - 1
      - 2
      - 3
    DeviceCommand:
      required:
      - command
      - enterprise
      - device
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        current_base_uri:
          title: Current base uri
          type: string
          minLength: 1
        command_args:
          $ref: '#/components/schemas/CommandArgs'
        action:
          title: Action
          type: string
          enum:
          - acknowledge
          - in_progress
          - success
          - failed
        schedule:
          title: Schedule
          type: string
        group_schedule_id:
          title: Group schedule id
          type: string
          format: uuid
        command:
          $ref: '#/components/schemas/DeviceCommandEnum'
        state:
          title: State
          type: string
          enum:
          - Command Initiated
          - Command Acknowledged
          - Command In Progress
          - Command TimeOut
          - Command Success
          - Command Failure
          - Command Scheduled
        details:
          title: Details
          type:
          - string
          - 'null'
        created_on:
          title: Created on
          type: string
          format: date-time
          readOnly: true
        updated_on:
          title: Updated on
          type: string
          format: date-time
          readOnly: true
        enterprise:
          title: Enterprise
          type: string
          format: url
        device:
          title: Device
          type: string
          format: url
        group_command:
          title: Group command
          type:
          - string
          - 'null'
          format: url
        issued_by:
          title: Issued by
          type:
          - string
          - 'null'
          format: url
    CommandArgs:
      title: Command args
      type: object
      properties:
        wipe_external_storage:
          type: boolean
          default: false
        wipe_FRP:
          type: boolean
          default: true
        brightness_value:
          type: integer
          minimum: 1
          maximum: 100
        stream:
          $ref: '#/components/schemas/SettingsVolumeStreamEnum'
        volume_level:
          type: integer
          minimum: 0
          maximum: 100
        wifi_state:
          type: boolean
        bluetooth_state:
          type: boolean
        rotate_state:
          $ref: '#/components/schemas/SettingsRotateStateEnum'
        gps_state:
          $ref: '#/components/schemas/SettingsGPSStateEnum'
        screen_off_timeout:
          description: Value in seconds
          type: integer
          minimum: 5000
          maximum: 1800000
        app_version:
          type: string
        package_name:
          type: string
    DeviceCommandEnum:
      type: string
      description: "Command Options\n\n```\n* REBOOT: Reboot device\n* LOCK:  Lock device screen\n* INSTALL:  Install an app on device\n* UNINSTALL: Uninstall an app from device\n* WIPE: Wipe device\n* UPDATE_HEARTBEAT: Ping Device\n* SET_WIFI_STATE: wifi on/off\n* SET_BLUETOOTH_STATE: Bluetooth on/off\n* SET_ROTATION_STATE: Auto rotate setting\n* SET_GPS_STATE: GPS options\n* SET_BRIGHTNESS_SCALE: Brightness control\n* SET_STREAM_VOLUME: Volume control\n* SET_SCREEN_OFF_TIMEOUT: Screen timeout setting\n* ADD_TO_WHITELIST: Whitelist an installed sytem app\n* CLEAR_APP_DATA: Clear app data\n* CAPTURE_SCREENSHOT: Allows you to take a screenshot of the device's current screen. The \"tag\" is an optional param that can be set to corresponding screenshot. \n```\n"
      enum:
      - REBOOT
      - LOCK
      - INSTALL
      - UPDATE_HEARTBEAT
      - WIPE
      - SET_WIFI_STATE
      - SET_BLUETOOTH_STATE
      - SET_ROTATION_STATE
      - SET_GPS_STATE
      - SET_BRIGHTNESS_SCALE
      - SET_STREAM_VOLUME
      - SET_SCREEN_OFF_TIMEOUT
      - UNINSTALL
      - ADD_TO_WHITELIST
      - CLEAR_APP_DATA
      - CAPTURE_SCREENSHOT
    CommandRequest:
      required:
      - command
      type: object
      properties:
        command_args:
          $ref: '#/components/schemas/CommandArgs'
        command:
          $ref: '#/components/schemas/DeviceCommandEnum'
    SettingsVolumeStreamEnum:
      type: integer
      description: 'Device settings volume stream enum


        ```

        * STREAM_RING = 0

        * STREAM_NOTIFICATION = 1

        * STREAM_ALARM = 2

        * STREAM_MUSIC = 3

        ```

        '
      enum:
      - 0
      - 1
      - 2
      - 3
  securitySchemes:
    apiKey:
      description: "#### API KEY - Access Token\nAccess token for APIs passed as authorization header in calls. You need to generate this from your Esper Dev Console at `<domain>-api.esper.cloud` where foo is the sub-domain name you gave for your Esper Dev environment when you signed up for your Esper Dev account. Please follow the instructions [here](https://docs.esper.io/home/module/genapikey.html) to generate an access token.\nOnce you have the access token, you need to send an authorization header as below\n\n```bash\n\n    curl -X GET \\\n      https://<domain>-api.esper.cloud/api/enterprise/<enterprise_id>/device/ \\\n      -H 'Authorization: Bearer <ACCESS_TOKEN>' \\\n      -H 'Content-Type: application/json' \\\n```\n\n> Please note the use of keyword **Bearer** before the token value.\n\n\nYou can read more about api key authentication scheme [here](https://console-docs.esper.io/API/generate.html).\n"
      name: Authorization
      type: apiKey
      in: header
x-tagGroups:
- name: API Reference
  tags:
  - Enterprise
  - Application
  - Application V1
  - Device
  - Device Group
  - Commands
  - Group Commands
  - Token
  - Commands V2
  - Enterprise Policy
  - Geofence
  - Reports
  - Subscription
  - Content