> ## Documentation Index
> Fetch the complete documentation index at: https://docs.managexr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Command

> Send command to a specific device

<small>Available Commands: Launch App, Play/Pause Video, Launch Web Url, Disable/Enable Kiosk, Restart, Power Off, Set Volume, Set Brightness, Uninstall App, Sync, Enable/Disable Tutorial Mode</small>




## OpenAPI

````yaml Post /v1/devices/{id}/command
openapi: 3.1.0
info:
  title: ManageXR API
  description: API documentation for ManageXR
  version: 1.0.0
servers:
  - url: https://managexrapi.com
    description: ManageXR API Server
security:
  - basicAuth: []
paths:
  /v1/devices/{id}/command:
    post:
      summary: Send command
      description: >
        Send command to a specific device


        <small>Available Commands: Launch App, Play/Pause Video, Launch Web Url,
        Disable/Enable Kiosk, Restart, Power Off, Set Volume, Set Brightness,
        Uninstall App, Sync, Enable/Disable Tutorial Mode</small>
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID (serial number) of the device.
        - name: organizationId
          in: query
          required: false
          schema:
            type: string
          description: >
            Unique identifier of the organization. This parameter is only
            necessary when using multi-organization API keys. 


            Defaults to the organizationId associated with the API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: Launch App
                  type: object
                  properties:
                    action:
                      type: string
                      required: true
                      description: Launch an application on the device.
                      enum:
                        - LAUNCH_APP
                      example: LAUNCH_APP
                    data:
                      type: object
                      properties:
                        packageName:
                          type: string
                          required: true
                          description: The package name of the app to be launched
                          example: com.myapp.quest
                        launchParams:
                          type: object
                          description: >
                            (Optional) Additional custom launch parameters


                            e.g., { userId: 'ABC123', booleanValue: true,
                            arrayValue: [1.23, 4.56], mapValue: { key: 'more
                            stuff' }}
                          example:
                            userId: ABC123
                            booleanValue: true
                            floatValue: 100.29
                            arrayValue:
                              - 1.23
                              - 4.56
                            mapValue:
                              key: more stuff
                          required: false
                - title: Play / Pause Video
                  type: object
                  properties:
                    action:
                      type: string
                      description: Play or pause video on the device.
                      enum:
                        - PLAY_VIDEO
                        - PAUSE_VIDEO
                      example: PLAY_VIDEO
                    data:
                      type: object
                      properties:
                        videoId:
                          type: string
                          description: >
                            The id of the video to play or pause. 


                            To find a videoId, go to the video in your VR
                            Content library on the Web Console and retrieve it
                            from the url parameters (e.g.
                            console.managexr.com/o/{orgId}/vr-content/edit/video/**FeWVcu7Rq4X3rmwGZGM6**).
                        playFromBeginning:
                          type: boolean
                          description: >-
                            (Optional) Plays video from the beginning. If falsy
                            and the video is already open, play resumes from
                            position.
                - title: Launch Web Url
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        Launch a specific webxr link on the device. Requires the
                        data field to be populated (see below)
                      enum:
                        - LAUNCH_WEB_URL
                      example: LAUNCH_WEB_URL
                    data:
                      type: object
                      properties:
                        url:
                          type: string
                          description: The url of the webxr link to launch
                - title: Disable / Enable Kiosk Mode
                  type: object
                  properties:
                    action:
                      type: string
                      description: >
                        Override the device experience set on the
                        Configuration. 


                        `DISABLE_KIOSK` - Disable Kiosk Mode / ManageXR Home
                        Screen on the device. Grants users full access to the
                        default system menus. Sets `kioskModeOverride` flag on
                        device to `true`.


                        `ENABLE_KIOSK` - Re-Enable Kiosk Mode / ManageXR Home
                        Screen on the device. Sets `kioskModeOverride` flag on
                        device to `false`.


                        _Note_, if the Configuration applied to a device uses
                        Default Device Menus, the kioskModeOverride flag is a
                        no-op.
                      enum:
                        - DISABLE_KIOSK
                        - ENABLE_KIOSK
                      example: DISABLE_KIOSK
                - title: Restart
                  type: object
                  properties:
                    action:
                      type: string
                      description: Reboot the device.
                      enum:
                        - RESTART
                      example: RESTART
                - title: Power OFF
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        Remotely turn off device. Supported on Meta Quest v77+
                        enrolled through MHMS, Pico Neo 3s PUI 5+, Pico 4 Ultra
                        Enterprise devices.
                      enum:
                        - POWER_OFF
                      example: POWER_OFF
                - title: Set Volume
                  type: object
                  properties:
                    action:
                      type: string
                      description: Set volume on device. Supply a level between 0 and 100.
                      enum:
                        - SET_VOLUME
                      example: SET_VOLUME
                    data:
                      type: object
                      properties:
                        level:
                          type: number
                          description: >-
                            The volume level to set. Choose a value between 0
                            and 100.
                - title: Set Brightness
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        Set display brightness on device. Supply a level between
                        0 and 100.
                      enum:
                        - SET_BRIGHTNESS
                      example: SET_BRIGHTNESS
                    data:
                      type: object
                      properties:
                        level:
                          type: number
                          description: >-
                            The display brightness level to set. Choose a value
                            between 0 and 100.
                - title: Uninstall App
                  type: object
                  properties:
                    action:
                      type: string
                      description: >
                        Uninstall an application on the device. 


                        Cannot uninstall system apps. If you uninstall an app
                        that is still on a devices's configuration, it will
                        automatically re-download the next time the device
                        syncs.
                      enum:
                        - UNINSTALL_APP
                      example: UNINSTALL_APP
                    data:
                      type: object
                      properties:
                        packageName:
                          type: string
                          description: The package name of the app to uninstall
                - title: Restart App
                  type: object
                  properties:
                    action:
                      type: string
                      description: Restart an app
                      enum:
                        - RESTART_APP
                      example: RESTART_APP
                    data:
                      type: object
                      properties:
                        packageName:
                          type: string
                          description: The package name of the app to restart
                - title: Sync
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        Force device to check in with ManageXR. Online devices
                        sync every 15 minutes or immediately when configuration
                        changes are made.
                      enum:
                        - SYNC
                      example: SYNC
                    data:
                      type: object
                      properties:
                        forceSync:
                          type: boolean
                          description: >-
                            Optional parameter. If true, forces device to sync
                            immediately regardless of update schedule set on
                            configuration
                - title: Enable / Disable Tutorial Mode
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        When Tutorial Mode in enabled, the device launches into
                        its tutorial app on boot. Set the tutorial app in
                        Configuration > Device Settings.
                      enum:
                        - ENABLE_TUTORIAL_MODE
                        - DISABLE_TUTORIAL_MODE
                      example: ENABLE_TUTORIAL_MODE
            examples:
              example-sync:
                summary: Sync command
                value:
                  action: SYNC
              example-launch_app:
                summary: Launch App command
                value:
                  action: LAUNCH_APP
                  data:
                    packageName: com.example.app
              example-launch_app_with_params:
                summary: Launch app with parameters
                value:
                  action: LAUNCH_APP
                  data:
                    packageName: com.example.app
                    launchParams:
                      userId: AX3EIUf89
                      booleanValue: true
                      floatValue: 100.29
                      arrayValue:
                        - 1.23
                        - 4.56
                      mapValue:
                        key: value
              example-launch_webxr:
                summary: Launch webxr link
                value:
                  action: LAUNCH_WEB_URL
                  data:
                    url: https://google.com
      responses:
        '200':
          description: Success
        '400':
          description: Request must contain valid action
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                    example: Request must contain a valid action
                  error:
                    type: string
                    example: ManageXR Error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 403
                  message:
                    type: string
                    example: Forbidden
                  error:
                    type: string
                    example: ManageXR Error
              example:
                statusCode: 403
                message: Forbidden
                error: ManageXR Error
        '404':
          description: Device not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                    example: Not found
                  error:
                    type: string
                    example: ManageXR Error
              example:
                statusCode: 404
                message: Not found error
                error: ManageXR Error
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >
        API key based authentication where <encoded-value> is the Base64
        encoding of `API_KEY_ID`:`API_KEY_SECRET`

        - **Username**: The API Key ID.

        - **Password**: The API Key Secret.

````