openapi: 3.1.0
info:
  title: Tools
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /devices/{deviceId}/apps:
    get:
      description: >-
        Returns detailed information about apps installed on the device,
        including package name and label. System and protected apps are excluded
        unless the corresponding query parameters are set.
      operationId: list-apps
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: includeSystemApps
          schema:
            default: false
            type: boolean
        - explode: false
          in: query
          name: includeProtectedApps
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AppInfo'
                type:
                  - array
                  - 'null'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: List apps
      tags:
        - Apps
      x-mint:
        content: >
          The detailed counterpart to `list-packages`: each entry carries the
          package name plus a label, version info, and an `isSystemApp` flag.


          <Note>

          Only `packageName` is guaranteed — depending on the device type, label
          and version fields can be empty.

          </Note>


          On iOS devices, entries are keyed by bundle identifier, Apple's
          built-in apps never appear, and `versionCode` is always `0`.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const apps = await client.devices.apps.list('deviceId');

            console.log(apps);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            apps = client.devices.apps.list(
                device_id="deviceId",
            )
            print(apps)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tapps, err := client.Devices.Apps.List(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceAppListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", apps)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:apps list \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: >-
        Installs an app on the device. The request body must supply exactly one
        of an Android packageName or an iOS bundleId; protected packages are
        rejected.
      operationId: install-app
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - additionalProperties: false
                  properties:
                    bundleId:
                      description: iOS bundle identifier (e.g. com.example.app)
                      minLength: 1
                      type: string
                  required:
                    - bundleId
                  type: object
                - additionalProperties: false
                  properties:
                    packageName:
                      description: Android package name (e.g. com.example.app)
                      minLength: 1
                      type: string
                  required:
                    - packageName
                  type: object
              properties:
                bundleId:
                  description: iOS bundle identifier (e.g. com.example.app)
                  minLength: 1
                  type: string
                packageName:
                  description: Android package name (e.g. com.example.app)
                  minLength: 1
                  type: string
              type: object
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Install app
      tags:
        - Apps
      x-mint:
        content: >
          Installs an app on the device.


          Provide **exactly one** of:


          - `packageName` — Android package name. Resolved against the device
          owner's app library, so upload the APK first.

          - `bundleId` — iOS bundle identifier (e.g. `com.example.app`) or a
          numeric App Store ID. The app is installed from the App Store; a
          successful response means the install was accepted — poll `list-apps`
          until the app appears.


          <Warning>

          Protected system packages cannot be installed over. Requests targeting
          a protected package fail with `403 Forbidden`.

          </Warning>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.apps.install('deviceId', { bundleId: 'x' });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.apps.install(
                device_id="deviceId",
                bundle_id="x",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Apps.Install(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceAppInstallParams{\n\t\t\tOfObject: &mobileruncloud.DeviceAppInstallParamsBodyObject{\n\t\t\t\tBundleID: \"x\",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:apps install \
              --api-key 'My API Key' \
              --device-id deviceId \
              --bundle-id x
  /devices/{deviceId}/apps/{packageName}:
    delete:
      description: >-
        Uninstalls the app identified by the path package name from the device.
        Protected packages cannot be deleted.
      operationId: delete-app
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - in: path
          name: packageName
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/None'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Delete app
      tags:
        - Apps
      x-mint:
        content: >
          On Android, the path parameter is the package name (e.g.
          `com.example.app`); on iOS, pass the app's bundle identifier instead.


          Deleting an app does not touch your app library — an uploaded APK
          stays there, so you can reinstall the app later with `install-app`.


          Requests targeting a protected package fail with `403 Forbidden`.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            await client.devices.apps.delete('packageName', { deviceId:
            'deviceId' });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.apps.delete(
                package_name="packageName",
                device_id="deviceId",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Apps.Delete(\n\t\tcontext.TODO(),\n\t\t\"packageName\",\n\t\tmobileruncloud.DeviceAppDeleteParams{\n\t\t\tDeviceID: \"deviceId\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:apps delete \
              --api-key 'My API Key' \
              --device-id deviceId \
              --package-name packageName
    patch:
      description: >-
        Force-stops the app identified by the path package name. When clearData
        is set in the request body, the app's data is also cleared. Protected
        packages cannot be stopped.
      operationId: stop-app
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - in: path
          name: packageName
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StopAppArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Stop app
      tags:
        - Apps
      x-mint:
        content: >
          Stopping kills every process and service of the app immediately — the
          same as **Force stop** in Android settings.


          <Warning>

          `clearData: true` additionally wipes the app's local storage
          (databases, preferences, cache) — the same as **Clear data** in
          Android settings. This is irreversible and typically signs you out of
          the app.

          </Warning>


          Requests targeting a protected package fail with `403 Forbidden`. Not
          supported on iOS devices.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            await client.devices.apps.stop('packageName', { deviceId: 'deviceId'
            });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.apps.stop(
                package_name="packageName",
                device_id="deviceId",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Apps.Stop(\n\t\tcontext.TODO(),\n\t\t\"packageName\",\n\t\tmobileruncloud.DeviceAppStopParams{\n\t\t\tDeviceID: \"deviceId\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:apps stop \
              --api-key 'My API Key' \
              --device-id deviceId \
              --package-name packageName
    put:
      description: >-
        Launches the app identified by the path package name, optionally
        starting a specific activity given in the request body. Protected
        packages cannot be started.
      operationId: start-app
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - in: path
          name: packageName
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartAppArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Start app
      tags:
        - Apps
      x-mint:
        content: >
          Starting an app that is already running brings it to the foreground.


          Omit `activity` to launch the app's default (launcher) activity. To
          open a specific screen, pass the fully qualified activity class name,
          e.g. `com.example.app.MainActivity`.


          Requests targeting a protected package fail with `403 Forbidden`. Not
          supported on iOS devices — the request fails with an
          unsupported-feature error.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            await client.devices.apps.start('packageName', { deviceId:
            'deviceId' });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.apps.start(
                package_name="packageName",
                device_id="deviceId",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Apps.Start(\n\t\tcontext.TODO(),\n\t\t\"packageName\",\n\t\tmobileruncloud.DeviceAppStartParams{\n\t\t\tDeviceID: \"deviceId\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:apps start \
              --api-key 'My API Key' \
              --device-id deviceId \
              --package-name packageName
  /devices/{deviceId}/apps/{packageName}/permissions/{permission}:
    delete:
      description: >-
        Revokes an Android runtime permission from the package named in the
        path. The permission is given by its short name (e.g.
        POST_NOTIFICATIONS).
      operationId: revoke-permission
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - in: path
          name: packageName
          required: true
          schema:
            type: string
        - description: Android runtime permission, short name (e.g. POST_NOTIFICATIONS).
          in: path
          name: permission
          required: true
          schema:
            description: Android runtime permission, short name (e.g. POST_NOTIFICATIONS).
            enum:
              - POST_NOTIFICATIONS
            type: string
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Revoke app permission
      tags:
        - Apps
      x-mint:
        content: >
          Revokes the permission directly, without any user interaction on the
          device. Counterpart to `grant-permission`.


          The short name expands to the full Android permission string:
          `POST_NOTIFICATIONS` becomes `android.permission.POST_NOTIFICATIONS`.


          Not supported on iOS devices — the request fails with an
          unsupported-feature error.
    put:
      description: >-
        Grants an Android runtime permission to the package named in the path.
        The permission is given by its short name (e.g. POST_NOTIFICATIONS).
      operationId: grant-permission
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - in: path
          name: packageName
          required: true
          schema:
            type: string
        - description: Android runtime permission, short name (e.g. POST_NOTIFICATIONS).
          in: path
          name: permission
          required: true
          schema:
            description: Android runtime permission, short name (e.g. POST_NOTIFICATIONS).
            enum:
              - POST_NOTIFICATIONS
            type: string
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Grant app permission
      tags:
        - Apps
      x-mint:
        content: >
          Grants the permission directly — the app will not prompt the user for
          it on the device.


          The short name expands to the full Android permission string:
          `POST_NOTIFICATIONS` becomes `android.permission.POST_NOTIFICATIONS`.
          The target app must already be installed.


          Not supported on iOS devices — the request fails with an
          unsupported-feature error. Use `revoke-permission` to take the
          permission back.
  /devices/{deviceId}/packages:
    get:
      description: >-
        Returns the package names of apps installed on the device. System and
        protected packages are excluded unless the corresponding query
        parameters are set.
      operationId: list-packages
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: includeSystemPackages
          schema:
            default: false
            type: boolean
        - explode: false
          in: query
          name: includeProtectedPackages
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  type: string
                type:
                  - array
                  - 'null'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: List packages
      tags:
        - Apps
      x-mint:
        content: >
          Returns bare package names. Use `list-apps` when you also need labels
          and version info.


          Protected packages are the platform's own device-management apps: they
          stay hidden unless you set `includeProtectedPackages=true`, and other
          app endpoints reject them with `403 Forbidden` anyway.


          On iOS devices, entries are bundle identifiers and
          `includeSystemPackages` has no effect — Apple's built-in apps are
          never listed.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const packages = await client.devices.packages.list('deviceId');

            console.log(packages);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            packages = client.devices.packages.list(
                device_id="deviceId",
            )
            print(packages)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tpackages, err := client.Devices.Packages.List(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DevicePackageListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", packages)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:packages list \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/browser/execute-script:
    post:
      description: >-
        Evaluates a JavaScript expression in the device's foreground Chrome tab
        via the Chrome DevTools Protocol and returns its JSON-serialized result.
        Devices without browser support return an unsupported-feature error.
      operationId: browser-execute-script
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteScriptArgs'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecuteScriptOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Execute JavaScript in the device's Chrome browser (CDP)
      tags:
        - Browser
      x-mint:
        content: >
          The script is a single JavaScript expression, not a function body —
          skip the top-level `return` and wrap multi-statement logic in an IIFE:


          ```js

          (() => { const links = [...document.querySelectorAll('a')]; return
          links.map(a => a.href); })()

          ```


          The result must be JSON-serializable: `undefined` comes back as
          `null`, and `NaN`, `Infinity`, and `-0` are returned as strings.
          Scripts run in Chrome itself — in-app WebViews are not reachable. iOS
          devices don't support browser control and fail with `400`.


          <Tip>

          For a persistent session or full DevTools protocol access, connect a
          Playwright- or Puppeteer-style CDP client to the raw websocket at
          `/devices/{deviceId}/browser/cdp` instead of issuing one-shot calls.

          </Tip>
  /devices/{deviceId}/esim:
    delete:
      description: >-
        Deletes the eSIM subscription identified by the subId query parameter
        from the device.
      operationId: delete-esim
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: subId
          required: true
          schema:
            format: int64
            type: integer
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Delete eSIM subscription
      tags:
        - SIM
      x-mint:
        content: >
          Get the `subId` from list-esim.


          <Warning>

          Deletion is permanent. To use the plan on this device again, the
          profile must be downloaded again with configure-esim.

          </Warning>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.esim.remove('deviceId', { subId: 0 });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.esim.remove(
                device_id="deviceId",
                sub_id=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Esim.Remove(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceEsimRemoveParams{\n\t\t\tSubID: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:esim remove \
              --api-key 'My API Key' \
              --device-id deviceId \
              --sub-id 0
    get:
      description: Returns the eSIM subscriptions currently provisioned on the device.
      operationId: list-esim
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ESimSubscription'
                type:
                  - array
                  - 'null'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: List eSIM subscriptions
      tags:
        - SIM
      x-mint:
        content: >
          Start here: the `subId` of each entry is what the other SIM endpoints
          take (enable, delete, and APN calls). The list may also include
          physical SIM slots — entries with `isEmbedded: false` are not eSIM
          profiles.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const esims = await client.devices.esim.list('deviceId');

            console.log(esims);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            esims = client.devices.esim.list(
                device_id="deviceId",
            )
            print(esims)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tesims, err := client.Devices.Esim.List(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceEsimListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", esims)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:esim list \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: Download profile and/or enable subscription.
      operationId: configure-esim
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigureESimBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ESimSubscription'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Configure eSIM
      tags:
        - SIM
      x-mint:
        content: >
          Returns the newly installed subscription — keep its `subId` for later
          enable, delete, and APN calls. With `enable: true` the profile is
          activated in the same call; otherwise enable it later with
          enable-esim.


          `smDpAddr` is the bare SM-DP+ address, not a full activation code.
          Given `LPA:1$smdp.example.com$MATCH-123`, pass `smdp.example.com` as
          `smDpAddr` and `MATCH-123` as `matchingId`; a fourth segment would be
          `confirmationCode`.


          eSIM operations run one at a time per device — a concurrent call fails
          instead of queueing.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.devices.esim.activate('deviceId', {
              enable: true,
              smDpAddr: 'smDpAddr',
            });

            console.log(response.iccid);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.esim.activate(
                device_id="deviceId",
                enable=True,
                sm_dp_addr="smDpAddr",
            )
            print(response.iccid)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.Esim.Activate(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceEsimActivateParams{\n\t\t\tEnable:   true,\n\t\t\tSmDpAddr: \"smDpAddr\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Iccid)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:esim activate \
              --api-key 'My API Key' \
              --device-id deviceId \
              --enable \
              --sm-dp-addr smDpAddr
    put:
      description: >-
        Enables the eSIM subscription identified by the subId in the request
        body so it becomes the active subscription.
      operationId: enable-esim
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnableESimBody'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Enable an eSIM subscription
      tags:
        - SIM
      x-mint:
        content: >
          Use the `subId` from list-esim or from the configure-esim response. If
          you passed `enable: true` to configure-esim, the new profile is
          already active and this call is unnecessary.


          <Note>

          On iOS this re-requests the plan from the carrier rather than
          switching profiles — iOS provides no way to deactivate an active eSIM.

          </Note>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.esim.enable('deviceId', { subId: 0 });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.esim.enable(
                device_id="deviceId",
                sub_id=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Esim.Enable(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceEsimEnableParams{\n\t\t\tSubID: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:esim enable \
              --api-key 'My API Key' \
              --device-id deviceId \
              --sub-id 0
  /devices/{deviceId}/esim/apn:
    get:
      description: >-
        Returns the access point names (APNs) configured for the device's active
        eSIM subscriptions.
      operationId: list-esim-apns
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ESimAPN'
                type:
                  - array
                  - 'null'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: List APNs for active subscriptions
      tags:
        - SIM
      x-mint:
        content: >
          Use an entry's `id` as `apnId` in select-esim-apn; `isPreferred` marks
          the APN currently in use. On Android the list covers all APNs of the
          active subscriptions, including carrier-provisioned ones; on iOS it
          shows only APNs created through this API.
    post:
      description: >-
        Creates an access point name (APN) from the request body and applies it
        to the given eSIM subscription. Type, protocol, and roaming protocol
        default to common values when omitted.
      operationId: set-esim-apn
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetAPNBody'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Create and set an APN for an eSIM subscription
      tags:
        - SIM
      x-mint:
        content: >
          `subId` comes from list-esim. Defaults when omitted: `name` takes the
          `apn` value; `type` is `default,supl`; `protocol` and
          `roamingProtocol` are `IPV4V6`.


          On iOS the new APN becomes active immediately, replacing the previous
          one. On Android it is only created — and the response doesn't return
          its id — so call list-esim-apns to find it, then select-esim-apn to
          make it preferred.
    put:
      description: >-
        Marks an existing APN, identified by apnId, as the preferred APN for the
        given eSIM subscription in the request body.
      operationId: select-esim-apn
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelectAPNBody'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Select an existing APN as preferred
      tags:
        - SIM
      x-mint:
        content: >
          Get `apnId` from the `id` field of list-esim-apns and `subId` from
          list-esim. Use it after set-esim-apn on Android, where new APNs are
          not preferred automatically.


          <Note>

          iOS APNs apply device-wide, so `subId` is ignored there.

          </Note>
  /devices/{deviceId}/esim/roaming:
    put:
      description: >-
        Enables or disables data roaming for the device's eSIM based on the
        enabled flag in the request body.
      operationId: set-esim-roaming
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetRoamingBody'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Toggle eSIM data roaming
      tags:
        - SIM
      x-mint:
        content: >
          Roaming is a device-wide setting — it is not scoped to a `subId`.
          Check the effect with get-esim-status, which reports
          `dataRoamingEnabled` per subscription. On iOS this toggles voice
          roaming along with data roaming.
  /devices/{deviceId}/esim/status:
    get:
      description: Returns the connectivity status of the device's eSIM subscriptions.
      operationId: get-esim-status
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ESimStatus'
                type:
                  - array
                  - 'null'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Get eSIM connectivity status
      tags:
        - SIM
      x-mint:
        content: >
          Where list-esim shows what is provisioned, this shows how each active
          subscription is connecting. Poll it after enable-esim,
          set-esim-roaming, or an APN change to confirm mobile data actually
          came up (`dataState`, `networkType`) and that roaming flags took
          effect.
  /devices/{deviceId}/files:
    delete:
      description: >-
        Deletes the file at the path given in the path query parameter from the
        device.
      operationId: delete-file
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Delete file
      tags:
        - Files
      x-mint:
        content: >
          Removes the file at the absolute `path`, e.g.
          `/sdcard/Download/report.pdf`. Deletion is immediate and permanent —
          there is no trash to recover from.


          The endpoint targets individual files; to clear out a directory, list
          it and delete its files one by one.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.files.delete('deviceId', { path: 'path' });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.files.delete(
                device_id="deviceId",
                path="path",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Files.Delete(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceFileDeleteParams{\n\t\t\tPath: \"path\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:files delete \
              --api-key 'My API Key' \
              --device-id deviceId \
              --path path
    get:
      description: >-
        Lists the files at the directory path given in the path query parameter,
        returning each entry's metadata along with the path and total count.
      operationId: list-files
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: path
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileListBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: List files
      tags:
        - Files
      x-mint:
        content: >
          `path` must be an absolute directory path on the device, e.g.
          `/sdcard/Download`. The response contains the directory's direct
          entries only — it does not recurse into subdirectories.


          File access is available on Android devices only; file requests
          against an iOS device fail with `400`.


          <Note>

          Depending on the device type, some entry metadata (`owner`, `group`,
          `permissions`, `hardLinks`) may be zeroed rather than reflect real
          values.

          </Note>
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const files = await client.devices.files.list('deviceId', { path:
            'path' });


            console.log(files.files);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            files = client.devices.files.list(
                device_id="deviceId",
                path="path",
            )
            print(files.files)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tfiles, err := client.Devices.Files.List(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceFileListParams{\n\t\t\tPath: \"path\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", files.Files)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:files list \
              --api-key 'My API Key' \
              --device-id deviceId \
              --path path
    post:
      description: >-
        Uploads a file to the device via multipart form data, writing it into
        the directory given by the path query parameter using the uploaded
        file's name.
      operationId: upload-file
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            encoding:
              file:
                contentType: application/octet-stream
            schema:
              properties:
                file:
                  contentEncoding: binary
                  contentMediaType: application/octet-stream
                  format: binary
                  type: string
              required:
                - file
              type: object
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Upload file
      tags:
        - Files
      x-mint:
        content: >
          `path` is the destination **directory**, not the full file path — the
          file is written there under its original uploaded filename. Uploading
          `report.pdf` with `path=/sdcard/Download` creates
          `/sdcard/Download/report.pdf`.


          <Tip>

          Upload to shared storage such as `/sdcard/Download`. File access runs
          without root, so protected system paths are not writable and the
          upload fails.

          </Tip>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import fs from 'fs';
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.files.upload('deviceId', {
              path: 'path',
              file: fs.createReadStream('path/to/file'),
            });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.files.upload(
                device_id="deviceId",
                path="path",
                file=b"Example data",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"io\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Files.Upload(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceFileUploadParams{\n\t\t\tPath: \"path\",\n\t\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:files upload \
              --api-key 'My API Key' \
              --device-id deviceId \
              --path path \
              --file 'Example data'
  /devices/{deviceId}/files/download:
    get:
      description: >-
        Pulls the file at the given path query parameter from the device and
        returns its raw bytes as an octet-stream.
      operationId: download-file
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: path
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                contentEncoding: base64
                type: string
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Download file
      tags:
        - Files
      x-mint:
        content: >
          Returns the file's raw bytes in the response body. The `Content-Type`
          is always `application/octet-stream` regardless of the file's actual
          type, and no filename header is set — derive the name from the `path`
          you requested.


          The whole file arrives in a single response; range requests are not
          supported.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const response = await client.devices.files.download('deviceId', {
            path: 'path' });


            console.log(response);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.files.download(
                device_id="deviceId",
                path="path",
            )
            print(response)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.Files.Download(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceFileDownloadParams{\n\t\t\tPath: \"path\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:files download \
              --api-key 'My API Key' \
              --device-id deviceId \
              --path path
  /devices/{deviceId}/global:
    post:
      description: >-
        Performs a global system action on the device, such as navigating back
        or going to the home screen, identified by an action code.
      operationId: global
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GlobalArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Perform a global action
      tags:
        - Navigation
      x-mint:
        content: >
          Action codes follow Android's accessibility global actions:


          - `1` — back

          - `2` — home

          - `3` — recents (app switcher)


          These three work on every Android device. Higher codes — `4`
          (notifications), `5` (quick settings), `6` (power dialog), `8` (lock
          screen) — are device-dependent and rejected with an error where
          unsupported.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.actions.global('deviceId', { action: 0 });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.actions.global_(
                device_id="deviceId",
                action=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Actions.Global(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceActionGlobalParams{\n\t\t\tAction: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:actions global \
              --api-key 'My API Key' \
              --device-id deviceId \
              --action 0
  /devices/{deviceId}/keyboard:
    delete:
      description: Clears the contents of the currently focused text input field.
      operationId: clear-input
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Clear input
      tags:
        - Navigation
      x-mint:
        content: >
          Clears whatever text the currently focused input field contains. Make
          sure an editable field has focus first — check
          `phone_state.isEditable` and `focusedElement` in the UI state
          response.


          When you're replacing a field's contents, the input text endpoint's
          `clear` flag does the same thing in one call.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.keyboard.clear('deviceId');
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.keyboard.clear(
                device_id="deviceId",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Keyboard.Clear(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceKeyboardClearParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:keyboard clear \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: >-
        Types the given text into the focused input field. Supports optionally
        clearing the field first and a stealth mode that emulates human typing
        speed and error rate on supported devices.
      operationId: input-text
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyboardInputArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Input text
      tags:
        - Navigation
      x-mint:
        content: >
          Text goes to the currently focused input field — tap a field first,
          and confirm focus via the UI state response
          (`phone_state.focusedElement` and `keyboardVisible`).


          `wpm` and `errorRate` are stealth-only tuning knobs, and each applies
          to a different class of device: devices with human-like input support
          honor `errorRate` and ignore `wpm`; all other devices honor `wpm` and
          ignore `errorRate`.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.keyboard.write('deviceId', { text: 'text' });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.keyboard.write(
                device_id="deviceId",
                text="text",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Keyboard.Write(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceKeyboardWriteParams{\n\t\t\tText: \"text\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:keyboard write \
              --api-key 'My API Key' \
              --device-id deviceId \
              --text text
    put:
      description: >-
        Sends a single Android key event to the device, identified by its key
        code.
      operationId: input-key
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyboardKeyArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Input key
      tags:
        - Navigation
      x-mint:
        content: >
          Key codes are standard Android `KeyEvent` codes — for example `66`
          (Enter) or `4` (Back).


          A common pattern: type into a field with the input text endpoint, then
          send `66` to submit it.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.keyboard.key('deviceId', { key: 0 });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.keyboard.key(
                device_id="deviceId",
                key=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Keyboard.Key(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceKeyboardKeyParams{\n\t\t\tKey: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:keyboard key \
              --api-key 'My API Key' \
              --device-id deviceId \
              --key 0
  /devices/{deviceId}/screenshot:
    get:
      description: >-
        Captures the device screen and returns it as a PNG image. An optional
        hideOverlay query parameter excludes the accessibility overlay from the
        capture.
      operationId: take-screenshot
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: hideOverlay
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                contentEncoding: base64
                type: string
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Take screenshot
      tags:
        - Navigation
      x-mint:
        content: >
          The response body is the PNG image itself (`Content-Type: image/png`),
          not a JSON wrapper.


          The accessibility overlay is the on-screen element-highlight layer
          controlled by the set overlay visibility endpoint. If you've enabled
          it, pass `hideOverlay=true` to capture a clean frame; on devices whose
          capture path sits below the overlay, the flag has no effect either
          way.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.devices.state.screenshot('deviceId');

            console.log(response);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.state.screenshot(
                device_id="deviceId",
            )
            print(response)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.State.Screenshot(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceStateScreenshotParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:state screenshot \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/swipe:
    post:
      description: >-
        Swipes from a start coordinate to an end coordinate over the given
        duration in milliseconds. An optional stealth flag applies human-like
        jitter and curved paths on devices that support it.
      operationId: swipe
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwipeArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Swipe
      tags:
        - Navigation
      x-mint:
        content: >
          With `stealth: true`, the gesture is humanized: start and end points
          shift randomly (up to ±5 and ±15 pixels), the duration gets ±10%
          jitter, and supported devices trace a curved path with micro-jitter
          instead of a straight line. Devices with human-like input support
          inject the whole gesture with human motor timing instead.


          A stealth swipe covering less than ~5 pixels is treated as a long
          press with slight drift.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.actions.swipe('deviceId', {
              duration: 10,
              endX: 0,
              endY: 0,
              startX: 0,
              startY: 0,
            });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.actions.swipe(
                device_id="deviceId",
                duration=10,
                end_x=0,
                end_y=0,
                start_x=0,
                start_y=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Actions.Swipe(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceActionSwipeParams{\n\t\t\tDuration: 10,\n\t\t\tEndX:     0,\n\t\t\tEndY:     0,\n\t\t\tStartX:   0,\n\t\t\tStartY:   0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:actions swipe \
              --api-key 'My API Key' \
              --device-id deviceId \
              --duration 10 \
              --end-x 0 \
              --end-y 0 \
              --start-x 0 \
              --start-y 0
  /devices/{deviceId}/tap:
    post:
      description: >-
        Taps the device screen at the given x/y coordinates. An optional stealth
        flag routes the tap through human-like input on devices that support it.
      operationId: tap
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TapByCoordinatesArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Tap by coordinates
      tags:
        - Navigation
      x-mint:
        content: >
          Coordinates are absolute screen pixels — the same space as
          `boundsInScreen` in the UI state response, so you can read an
          element's bounds and tap the center of its box.


          With `stealth: true`, devices that support human-like input inject the
          tap with human motor timing rather than a plain synthetic event.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.actions.tap('deviceId', { x: 0, y: 0 });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.actions.tap(
                device_id="deviceId",
                x=0,
                y=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Actions.Tap(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceActionTapParams{\n\t\t\tX: 0,\n\t\t\tY: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:actions tap \
              --api-key 'My API Key' \
              --device-id deviceId \
              --x 0 \
              --y 0
  /devices/{deviceId}/ui-state:
    get:
      description: >-
        Returns the current accessibility UI state of the device as a structured
        tree of on-screen elements. An optional filter query reduces the result
        to interactive elements.
      operationId: ui-state
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
        - explode: false
          in: query
          name: filter
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AndroidState'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: UI state
      tags:
        - Navigation
      x-mint:
        content: >
          Alongside the main `a11y_tree`, the response carries a separate
          `ime_tree` for the on-screen keyboard window, `phone_state`
          (foreground app, focused element, keyboard visibility), and
          `device_context` (screen bounds, display density).


          <Tip>

          Element `boundsInScreen` values are in the same pixel space the tap
          and swipe endpoints use — read an element's bounds and tap the center
          of its box for element-driven automation.

          </Tip>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.devices.state.ui('deviceId');

            console.log(response.a11y_tree);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.state.ui(
                device_id="deviceId",
            )
            print(response.a11y_tree)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.State.Ui(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceStateUiParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.A11yTree)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:state ui \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/proxy:
    delete:
      description: >-
        Disconnects the device's active proxy connection and clears its stored
        proxy state. Returns successfully if no proxy is connected.
      operationId: disconnect-proxy
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Disconnect proxy
      tags:
        - Proxy
      x-mint:
        content: >
          After disconnecting, the device's traffic uses its direct network
          connection again.


          <Note>

          Disconnecting does not revert `smartIp` changes — the device keeps the
          location, time zone, locale, and carrier settings that were aligned to
          the previous proxy's exit IP.

          </Note>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.proxy.disconnect('deviceId');
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.proxy.disconnect(
                device_id="deviceId",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Proxy.Disconnect(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceProxyDisconnectParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:proxy disconnect \
              --api-key 'My API Key' \
              --device-id deviceId
    get:
      description: >-
        Returns the device's current proxy connection state, including whether a
        proxy is connected and its protocol and name.
      operationId: get-proxy
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetProxyInfo'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Get proxy connection state
      tags:
        - Proxy
      x-mint:
        content: >
          The `connected` flag is a live check against the device, not just
          stored state — it can be `false` while `protocol` and `name` still
          describe a configured proxy whose link has dropped.


          Proxy host and credentials are never returned; you only get back the
          protocol and the `name` you supplied when connecting.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.devices.proxy.status('deviceId');

            console.log(response.connected);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.proxy.status(
                device_id="deviceId",
            )
            print(response.connected)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.Proxy.Status(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceProxyStatusParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Connected)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:proxy status \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: >-
        Routes the device's traffic through a SOCKS5 proxy supplied in the
        request body, replacing any existing connection. A smartIp option can be
        used to select an IP automatically; the legacy flat
        host/port/user/password fields remain supported.
      operationId: connect-proxy
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectProxyBody'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Connect proxy
      tags:
        - Proxy
      x-mint:
        content: >
          Provide **exactly one** proxy definition: the `socks5` object, or the
          deprecated flat `host`/`port`/`user`/`password` fields (all four
          required together). Sending both fails validation.


          With `smartIp: true`, the API geolocates the proxy's exit IP through
          the proxy itself and aligns the device to match — GPS location, time
          zone, locale, and (unless an eSIM is active) mobile carrier and
          network type.


          <Warning>

          A smart IP failure leaves your existing proxy untouched, but a failure
          while connecting the new proxy can leave the device with no proxy at
          all. Check the proxy state before retrying.

          </Warning>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.devices.proxy.connect('deviceId');
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.proxy.connect(
                device_id="deviceId",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Proxy.Connect(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceProxyConnectParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:proxy connect \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/fingerprint:
    get:
      description: >-
        Returns a live snapshot of the device's spoofed identity, including
        model, display, identifiers, and carrier. Devices without fingerprint
        support return an unsupported-feature error.
      operationId: device-fingerprint
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FingerprintResult'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Device fingerprint snapshot
      tags:
        - Misc
      x-mint:
        content: >
          The snapshot reflects what apps running on the device observe.


          Sections are collected independently and best-effort: values the
          device cannot report come back empty instead of failing the request —
          treat empty fields as "unknown", not as an error.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.devices.fingerprint('deviceId');

            console.log(response.identifiers);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.fingerprint(
                device_id="deviceId",
            )
            print(response.identifiers)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.Fingerprint(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceFingerprintParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Identifiers)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices fingerprint \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/kiosk:
    delete:
      description: >-
        Disables Android lock-task (kiosk) mode on the device, releasing it from
        the locked app.
      operationId: disable-kiosk
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Disable kiosk (lock-task) mode
      tags:
        - Misc
      x-mint:
        content: >
          The previously locked app keeps running — the device is unpinned, but
          the app is not stopped.


          Android only: iOS devices return an unsupported-feature error.
    put:
      description: >-
        Locks the device to the package named in the request body using Android
        lock-task (kiosk) mode, preventing the user from leaving the app.
      operationId: enable-kiosk
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnableKioskArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Enable kiosk (lock-task) mode
      tags:
        - Misc
      x-mint:
        content: >
          The app must already be running in the foreground — kiosk mode locks
          the device to the app's existing task, and the call fails if the
          package has no task. Launch it first, e.g. with the start-app
          endpoint.


          Locking is applied once and is not restored automatically; re-enable
          it after a reboot or reset.


          <Note>

          Android only. iOS devices return an unsupported-feature error.

          </Note>
  /devices/{deviceId}/language:
    get:
      description: Returns the device's current language/locale as a BCP-47 locale string.
      operationId: get-language
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguageBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Get device language/locale
      tags:
        - Misc
      x-mint:
        content: >
          Most devices report a BCP-47 tag like `de-DE`, but some use an
          underscore separator (`zh_CN` instead of `zh-CN`) — normalize before
          comparing.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const language = await client.devices.language.get('deviceId');

            console.log(language.locale);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            language = client.devices.language.get(
                device_id="deviceId",
            )
            print(language.locale)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tlanguage, err := client.Devices.Language.Get(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceLanguageGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", language.Locale)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:language get \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: >-
        Sets the device language/locale to the BCP-47 locale in the request
        body. An optional restart flag applies the change immediately by
        restarting the zygote instead of waiting for the next reboot.
      operationId: set-language
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetLanguageArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Set device language/locale
      tags:
        - Misc
      x-mint:
        content: >
          Include a region subtag — use `de-DE` rather than `de` — since some
          devices reject language-only locales. Script subtags may be dropped:
          `zh-Hans-CN` is applied as `zh-CN`.


          If the device cannot apply the requested locale, the call fails with a
          verification error instead of silently keeping the old language.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            await client.devices.language.set('deviceId', { locale:
            'sqf-Kkif-BB' });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.language.set(
                device_id="deviceId",
                locale="sqf-Kkif-BB",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Language.Set(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceLanguageSetParams{\n\t\t\tLocale: \"sqf-Kkif-BB\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:language set \
              --api-key 'My API Key' \
              --device-id deviceId \
              --locale sqf-Kkif-BB
  /devices/{deviceId}/location:
    delete:
      description: >-
        Clears any simulated GPS location and restores the device's default
        location behavior. Devices without geo support return an
        unsupported-feature error.
      operationId: reset-location
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Reset the device location to default
      tags:
        - Misc
      x-mint:
        content: >
          On cloud devices this re-points the simulated position at the platform
          default — New York City (`40.7128, -74.0060`) — it does not disable
          location simulation.
    get:
      description: >-
        Returns the device's current simulated GPS location as latitude and
        longitude. Devices without geo support return an unsupported-feature
        error.
      operationId: get-location
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Get device location
      tags:
        - Misc
      x-mint:
        content: >
          If the device cannot report a position yet, the call still succeeds
          and returns latitude and longitude `0` — treat `0,0` as "not
          available", not as a real coordinate.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const location = await client.devices.location.get('deviceId');

            console.log(location.latitude);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            location = client.devices.location.get(
                device_id="deviceId",
            )
            print(location.latitude)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tlocation, err := client.Devices.Location.Get(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceLocationGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", location.Latitude)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:location get \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: >-
        Sets the device's simulated GPS location to the latitude and longitude
        in the request body. Devices without geo support return an
        unsupported-feature error.
      operationId: set-location
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Location'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Set device location
      tags:
        - Misc
      x-mint:
        content: >
          Coordinates are decimal degrees; negative latitude is south, negative
          longitude is west. The new position applies to the running device
          immediately.


          This changes the simulated GPS position only — the device's IP-based
          geolocation is determined by its proxy.


          <Note>

          Connecting a proxy with `smartIp: true` overwrites the position to
          match the proxy's exit IP.

          </Note>
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            await client.devices.location.set('deviceId', { latitude: 0,
            longitude: 0 });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.location.set(
                device_id="deviceId",
                latitude=0,
                longitude=0,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/shared\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Location.Set(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceLocationSetParams{\n\t\t\tLocation: shared.LocationParam{\n\t\t\t\tLatitude:  0,\n\t\t\t\tLongitude: 0,\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:location set \
              --api-key 'My API Key' \
              --device-id deviceId \
              --latitude 0 \
              --longitude 0
  /devices/{deviceId}/overlay:
    get:
      description: >-
        Returns whether the accessibility overlay is currently visible on the
        device.
      operationId: overlay-visible
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OverlayVisibleBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Check if overlay is visible
      tags:
        - Misc
      x-mint:
        content: >
          Reports the state of the visual overlay that the device's automation
          service can draw over the screen.


          <Note>

          Not every device draws an overlay. Devices without one always report
          `visible: false`.

          </Note>
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.devices.actions.overlayVisible('deviceId');


            console.log(response.visible);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.actions.overlay_visible(
                device_id="deviceId",
            )
            print(response.visible)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.Actions.OverlayVisible(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceActionOverlayVisibleParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Visible)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:actions overlay-visible \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: >-
        Shows or hides the accessibility overlay on the device based on the
        visibility flag in the request body.
      operationId: set-overlay-visible
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetOverlayVisibleArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Set overlay visibility
      tags:
        - Misc
      x-mint:
        content: >
          While visible, the overlay is part of the screen output: screenshots
          include it unless you pass `hideOverlay=true` to the screenshot
          endpoint.


          <Note>

          Devices that don't draw an overlay fail this call and always report
          `visible: false` on the read side.

          </Note>
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            await client.devices.actions.setOverlayVisible('deviceId', {
            visible: true });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.actions.set_overlay_visible(
                device_id="deviceId",
                visible=True,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Actions.SetOverlayVisible(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceActionSetOverlayVisibleParams{\n\t\t\tVisible: true,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:actions set-overlay-visible \
              --api-key 'My API Key' \
              --device-id deviceId \
              --visible
  /devices/{deviceId}/time:
    get:
      description: Returns the device's current wall-clock time as an RFC 3339 timestamp.
      operationId: device-time
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Device time
      tags:
        - Misc
      x-mint:
        content: >
          The timestamp is read live from the device's own clock, not from the
          API server.


          <Tip>

          Don't infer the device's timezone from the timestamp's UTC offset — it
          isn't guaranteed to match the device's setting. Use the get-timezone
          endpoint for that.

          </Tip>
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.devices.state.time('deviceId');

            console.log(response);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.devices.state.time(
                device_id="deviceId",
            )
            print(response)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Devices.State.Time(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceStateTimeParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:state time \
              --api-key 'My API Key' \
              --device-id deviceId
  /devices/{deviceId}/timezone:
    get:
      description: >-
        Returns the device's current timezone identifier. Devices that do not
        support timezone control return an unsupported-feature error.
      operationId: get-timezone
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeZoneBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Get device timezone
      tags:
        - Misc
      x-mint:
        content: >
          The identifier is an IANA timezone name, e.g. `Europe/Berlin`.


          `timezone` is `null` when the device doesn't report one — for example
          when no timezone has been set yet.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const timezone = await client.devices.timezone.get('deviceId');

            console.log(timezone.timezone);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            timezone = client.devices.timezone.get(
                device_id="deviceId",
            )
            print(timezone.timezone)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttimezone, err := client.Devices.Timezone.Get(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceTimezoneGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", timezone.Timezone)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:timezone get \
              --api-key 'My API Key' \
              --device-id deviceId
    post:
      description: >-
        Sets the device timezone to the identifier in the request body. Devices
        that do not support timezone control return an unsupported-feature
        error.
      operationId: set-timezone
      parameters:
        - in: path
          name: deviceId
          required: true
          schema:
            type: string
        - in: header
          name: X-Device-Display-ID
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetTimeZoneArgs'
        required: true
      responses:
        '204':
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - bearerAuth: []
      summary: Set device timezone
      tags:
        - Misc
      x-mint:
        content: >
          Provide an IANA timezone identifier, e.g. `Europe/Berlin` or
          `America/New_York`.


          The change applies immediately; no reboot is needed.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            await client.devices.timezone.set('deviceId', { timezone: 'timezone'
            });
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.devices.timezone.set(
                device_id="deviceId",
                timezone="timezone",
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\terr := client.Devices.Timezone.Set(\n\t\tcontext.TODO(),\n\t\t\"deviceId\",\n\t\tmobileruncloud.DeviceTimezoneSetParams{\n\t\t\tTimezone: \"timezone\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud devices:timezone set \
              --api-key 'My API Key' \
              --device-id deviceId \
              --timezone timezone
components:
  schemas:
    AppInfo:
      additionalProperties: false
      properties:
        isSystemApp:
          type: boolean
        label:
          type: string
        packageName:
          type: string
        versionCode:
          format: int64
          type: integer
        versionName:
          type: string
      required:
        - packageName
        - label
        - versionName
        - versionCode
        - isSystemApp
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    None:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/None.json
          format: uri
          readOnly: true
          type: string
      type: object
    StopAppArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/StopAppArgs.json
          format: uri
          readOnly: true
          type: string
        clearData:
          description: >-
            If true, clears all app data (pm clear) in addition to stopping the
            app.
          type: boolean
      type: object
    StartAppArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/StartAppArgs.json
          format: uri
          readOnly: true
          type: string
        activity:
          type: string
      type: object
    ExecuteScriptArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ExecuteScriptArgs.json
          format: uri
          readOnly: true
          type: string
        script:
          description: >-
            JavaScript expression to evaluate in the device's foreground Chrome
            tab (CDP Runtime.evaluate). It is an expression, not a function body
            — the expression's value is returned (no top-level 'return'). Must
            evaluate to a JSON-serializable value; wrap multi-statement logic in
            an IIFE, e.g. (() => { ... ; return x })().
          type: string
      required:
        - script
      type: object
    ExecuteScriptOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ExecuteScriptOutputBody.json
          format: uri
          readOnly: true
          type: string
        result:
          description: >-
            JSON-serialized return value of the script (null if it returned
            undefined). Non-JSON-serializable numbers (Infinity, NaN, -0) are
            returned as their string representation.
      required:
        - result
      type: object
    ESimSubscription:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ESimSubscription.json
          format: uri
          readOnly: true
          type: string
        carrier:
          type: string
        displayName:
          type: string
        iccid:
          type: string
        isEmbedded:
          type: boolean
        slot:
          format: int64
          type: integer
        subId:
          format: int64
          type: integer
        type:
          type: string
      required:
        - subId
        - iccid
        - carrier
        - displayName
        - slot
        - type
        - isEmbedded
      type: object
    ConfigureESimBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ConfigureESimBody.json
          format: uri
          readOnly: true
          type: string
        confirmationCode:
          description: >-
            Optional carrier-issued confirmation code (the 4th LPA segment).
            Required only for plans whose SM-DP+ challenges the device for one.
            Requires matchingId — the LPA spec only interprets segment 4 when
            segment 3 is present.
          type: string
        enable:
          type: boolean
        matchingId:
          type: string
        smDpAddr:
          type: string
      required:
        - smDpAddr
        - enable
      type: object
    EnableESimBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/EnableESimBody.json
          format: uri
          readOnly: true
          type: string
        subId:
          format: int64
          type: integer
      required:
        - subId
      type: object
    ESimAPN:
      additionalProperties: false
      properties:
        apn:
          type: string
        id:
          format: int64
          type: integer
        isPreferred:
          type: boolean
        mcc:
          type: string
        mnc:
          type: string
        name:
          type: string
        protocol:
          type: string
        roamingProtocol:
          type: string
        subId:
          format: int64
          type: integer
        type:
          type: string
      required:
        - id
        - name
        - apn
        - mcc
        - mnc
        - type
        - protocol
        - roamingProtocol
        - subId
        - isPreferred
      type: object
    SetAPNBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SetAPNBody.json
          format: uri
          readOnly: true
          type: string
        apn:
          type: string
        mcc:
          type: string
        mnc:
          type: string
        name:
          type: string
        protocol:
          type: string
        roamingProtocol:
          type: string
        subId:
          format: int64
          type: integer
        type:
          type: string
      required:
        - name
        - apn
        - mcc
        - mnc
        - type
        - protocol
        - roamingProtocol
        - subId
      type: object
    SelectAPNBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SelectAPNBody.json
          format: uri
          readOnly: true
          type: string
        apnId:
          format: int64
          type: integer
        subId:
          format: int64
          type: integer
      required:
        - apnId
        - subId
      type: object
    SetRoamingBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SetRoamingBody.json
          format: uri
          readOnly: true
          type: string
        enabled:
          type: boolean
      required:
        - enabled
      type: object
    ESimStatus:
      additionalProperties: false
      properties:
        carrier:
          type: string
        dataRoamingEnabled:
          type: boolean
        dataState:
          type: string
        isRoaming:
          type: boolean
        mobileDataEnabled:
          type: boolean
        networkType:
          type: string
        operator:
          type: string
        phoneType:
          type: string
        simState:
          type: string
        subId:
          format: int64
          type: integer
      required:
        - subId
        - carrier
        - dataState
        - networkType
        - isRoaming
        - dataRoamingEnabled
        - mobileDataEnabled
        - operator
        - simState
        - phoneType
      type: object
    FileListBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/FileListBody.json
          format: uri
          readOnly: true
          type: string
        files:
          items:
            $ref: '#/components/schemas/FileInfo'
          type:
            - array
            - 'null'
        path:
          type: string
        total:
          format: int64
          type: integer
      required:
        - path
        - total
        - files
      type: object
    GlobalArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GlobalArgs.json
          format: uri
          readOnly: true
          type: string
        action:
          format: int64
          type: integer
      required:
        - action
      type: object
    KeyboardInputArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/KeyboardInputArgs.json
          format: uri
          readOnly: true
          type: string
        clear:
          default: false
          type: boolean
        errorRate:
          default: -1
          description: >-
            Per-character mistake rate for humantouch typing. -1 uses server
            default.
          format: double
          type: number
        stealth:
          default: false
          type: boolean
        text:
          type: string
        wpm:
          default: 0
          description: Words per minute for stealth typing. 0 uses portal default.
          format: int64
          type: integer
      required:
        - text
      type: object
    KeyboardKeyArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/KeyboardKeyArgs.json
          format: uri
          readOnly: true
          type: string
        key:
          format: int64
          type: integer
      required:
        - key
      type: object
    SwipeArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SwipeArgs.json
          format: uri
          readOnly: true
          type: string
        duration:
          description: Swipe duration in milliseconds
          format: int64
          minimum: 10
          type: integer
        endX:
          format: int64
          type: integer
        endY:
          format: int64
          type: integer
        startX:
          format: int64
          type: integer
        startY:
          format: int64
          type: integer
        stealth:
          default: false
          type: boolean
      required:
        - startX
        - startY
        - endX
        - endY
        - duration
      type: object
    TapByCoordinatesArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TapByCoordinatesArgs.json
          format: uri
          readOnly: true
          type: string
        stealth:
          default: false
          type: boolean
        x:
          format: int64
          type: integer
        'y':
          format: int64
          type: integer
      required:
        - x
        - 'y'
      type: object
    AndroidState:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AndroidState.json
          format: uri
          readOnly: true
          type: string
        a11y_tree:
          $ref: '#/components/schemas/A11YNode'
        device_context:
          $ref: '#/components/schemas/DeviceContext'
        ime_tree:
          $ref: '#/components/schemas/A11YNode'
        phone_state:
          $ref: '#/components/schemas/PhoneState'
      required:
        - a11y_tree
        - ime_tree
        - phone_state
        - device_context
      type: object
    GetProxyInfo:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GetProxyInfo.json
          format: uri
          readOnly: true
          type: string
        connected:
          type: boolean
        name:
          description: Active proxy name
          type:
            - string
            - 'null'
        protocol:
          description: Active proxy protocol (socks5).
          type:
            - string
            - 'null'
      required:
        - connected
        - protocol
        - name
      type: object
    ConnectProxyBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ConnectProxyBody.json
          format: uri
          readOnly: true
          type: string
        host:
          deprecated: true
          format: hostname
          maxLength: 255
          type: string
        name:
          description: Proxy name
          maxLength: 255
          type: string
        password:
          deprecated: true
          maxLength: 255
          type: string
          writeOnly: true
        port:
          deprecated: true
          format: int64
          maximum: 65535
          minimum: 1
          type: integer
        smartIp:
          type: boolean
        socks5:
          $ref: '#/components/schemas/ConnectSOCKS5Config'
          description: SOCKS5 proxy configuration (required for socks5).
        user:
          deprecated: true
          maxLength: 255
          type: string
      type: object
    FingerprintResult:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/FingerprintResult.json
          format: uri
          readOnly: true
          type: string
        carrier:
          $ref: '#/components/schemas/DeviceCarrier'
        display:
          $ref: '#/components/schemas/FingerprintDisplay'
        identifiers:
          $ref: '#/components/schemas/DeviceIdentifiers'
        model:
          $ref: '#/components/schemas/FingerprintModel'
      required:
        - model
        - display
        - identifiers
        - carrier
      type: object
    EnableKioskArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/EnableKioskArgs.json
          format: uri
          readOnly: true
          type: string
        packageName:
          description: Package to lock the device to (Android lock-task mode).
          minLength: 1
          type: string
      required:
        - packageName
      type: object
    LanguageBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/LanguageBody.json
          format: uri
          readOnly: true
          type: string
        locale:
          type: string
      required:
        - locale
      type: object
    SetLanguageArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SetLanguageArgs.json
          format: uri
          readOnly: true
          type: string
        locale:
          description: >-
            BCP-47 locale: a 2–3 letter language tag, optionally followed by a
            4-letter script and/or a 2-letter region (e.g. en-US, de-DE, ja-JP,
            zh-Hans-CN).
          pattern: ^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$
          type: string
        restart:
          description: >-
            Restart zygote so the locale change takes full effect immediately.
            Without it, the locale is written but won't fully apply until the
            next reboot.
          type: boolean
      required:
        - locale
      type: object
    Location:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/Location.json
          format: uri
          readOnly: true
          type: string
        latitude:
          format: double
          type: number
        longitude:
          format: double
          type: number
      required:
        - latitude
        - longitude
      type: object
    OverlayVisibleBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/OverlayVisibleBody.json
          format: uri
          readOnly: true
          type: string
        visible:
          type: boolean
      required:
        - visible
      type: object
    SetOverlayVisibleArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SetOverlayVisibleArgs.json
          format: uri
          readOnly: true
          type: string
        visible:
          type: boolean
      required:
        - visible
      type: object
    TimeZoneBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TimeZoneBody.json
          format: uri
          readOnly: true
          type: string
        timezone:
          type:
            - string
            - 'null'
      required:
        - timezone
      type: object
    SetTimeZoneArgs:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SetTimeZoneArgs.json
          format: uri
          readOnly: true
          type: string
        timezone:
          type: string
      required:
        - timezone
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    FileInfo:
      additionalProperties: false
      properties:
        extendedAttributes:
          type: boolean
        group:
          type: string
        hardLinks:
          format: int64
          type: integer
        modifiedAt:
          format: date-time
          type: string
        name:
          type: string
        owner:
          type: string
        permissions:
          $ref: '#/components/schemas/FilePermissions'
        size:
          format: int64
          type: integer
        symlinkTarget:
          type: string
        type:
          type: string
      required:
        - name
        - owner
        - group
        - size
        - type
        - permissions
        - hardLinks
        - modifiedAt
        - extendedAttributes
      type: object
    A11YNode:
      additionalProperties: false
      properties:
        boundsInScreen:
          $ref: '#/components/schemas/A11YBounds'
        children:
          items:
            $ref: '#/components/schemas/A11YNode'
          type:
            - array
            - 'null'
        className:
          type: string
        contentDescription:
          type: string
        isCheckable:
          type: boolean
        isChecked:
          type: boolean
        isClickable:
          type: boolean
        isEnabled:
          type: boolean
        isFocusable:
          type: boolean
        isFocused:
          type: boolean
        isLongClickable:
          type: boolean
        isPassword:
          type: boolean
        isScrollable:
          type: boolean
        isSelected:
          type: boolean
        packageName:
          type: string
        resourceId:
          type: string
        text:
          type: string
      required:
        - boundsInScreen
        - className
        - resourceId
        - text
        - contentDescription
        - packageName
        - isCheckable
        - isChecked
        - isClickable
        - isEnabled
        - isFocusable
        - isFocused
        - isScrollable
        - isLongClickable
        - isPassword
        - isSelected
        - children
      type: object
    DeviceContext:
      additionalProperties: false
      properties:
        display_metrics:
          $ref: '#/components/schemas/DisplayMetrics'
        filtering_params:
          $ref: '#/components/schemas/FilteringParams'
        screen_bounds:
          $ref: '#/components/schemas/Rect'
      required:
        - screen_bounds
        - filtering_params
        - display_metrics
      type: object
    PhoneState:
      additionalProperties: false
      properties:
        activityName:
          type: string
        currentApp:
          type: string
        focusedElement:
          $ref: '#/components/schemas/PhoneStateFocusedElementStruct'
        isEditable:
          type: boolean
        keyboardVisible:
          type: boolean
        packageName:
          type: string
      required:
        - keyboardVisible
        - isEditable
      type: object
    ConnectSOCKS5Config:
      additionalProperties: false
      properties:
        host:
          format: hostname
          maxLength: 255
          type: string
        password:
          maxLength: 255
          type: string
          writeOnly: true
        port:
          format: int64
          maximum: 65535
          minimum: 1
          type: integer
        user:
          maxLength: 255
          type: string
      required:
        - host
        - port
      type: object
    DeviceCarrier:
      additionalProperties: false
      properties:
        GsmOperatorAlpha:
          type: string
        GsmOperatorNumeric:
          format: int64
          type: integer
        GsmSimOperatorAlpha:
          type: string
        GsmSimOperatorIsoCountry:
          type: string
        GsmSimOperatorNumeric:
          format: int64
          type: integer
        PersistSysTimezone:
          type: string
      required:
        - GsmOperatorAlpha
        - GsmOperatorNumeric
        - GsmSimOperatorAlpha
        - GsmSimOperatorNumeric
        - GsmSimOperatorIsoCountry
        - PersistSysTimezone
      type: object
    FingerprintDisplay:
      additionalProperties: false
      properties:
        densityDpi:
          format: int64
          type: integer
        height:
          format: int64
          type: integer
        width:
          format: int64
          type: integer
      type: object
    DeviceIdentifiers:
      additionalProperties: false
      properties:
        BootloaderSerialNumber:
          type: string
        IdentifierAndroidID:
          type: string
        IdentifierAppSetID:
          type: string
        IdentifierBluetoothMAC:
          type: string
        IdentifierGAID:
          type: string
        IdentifierGSFID:
          type: string
        IdentifierICCID:
          type: string
        IdentifierIMEI:
          type: string
        IdentifierIMSI:
          type: string
        IdentifierMEID:
          type: string
        IdentifierMediaDRMID:
          type: string
        IdentifierPhoneNumber:
          type: string
        IdentifierSerial:
          type: string
        IdentifierWifiMAC:
          type: string
        SerialNumber:
          type: string
      required:
        - IdentifierSerial
        - IdentifierAndroidID
        - IdentifierIMEI
        - IdentifierMEID
        - IdentifierIMSI
        - IdentifierICCID
        - IdentifierPhoneNumber
        - IdentifierGAID
        - IdentifierGSFID
        - IdentifierAppSetID
        - IdentifierMediaDRMID
        - IdentifierWifiMAC
        - IdentifierBluetoothMAC
        - SerialNumber
        - BootloaderSerialNumber
      type: object
    FingerprintModel:
      additionalProperties: false
      properties:
        aospVersion:
          type: string
        brand:
          type: string
        device:
          type: string
        hardware:
          type: string
        imageRepository:
          type: string
        manufacturer:
          type: string
        model:
          type: string
      type: object
    FilePermissions:
      additionalProperties: false
      properties:
        group:
          $ref: '#/components/schemas/PermissionSet'
        others:
          $ref: '#/components/schemas/PermissionSet'
        owner:
          $ref: '#/components/schemas/PermissionSet'
        special:
          $ref: '#/components/schemas/SpecialPermissions'
      required:
        - owner
        - group
        - others
        - special
      type: object
    A11YBounds:
      additionalProperties: false
      properties:
        bottom:
          format: int64
          type: integer
        left:
          format: int64
          type: integer
        right:
          format: int64
          type: integer
        top:
          format: int64
          type: integer
      required:
        - left
        - top
        - right
        - bottom
      type: object
    DisplayMetrics:
      additionalProperties: false
      properties:
        density:
          format: double
          type: number
        densityDpi:
          format: int64
          type: integer
        heightPixels:
          format: int64
          type: integer
        scaledDensity:
          format: double
          type: number
        widthPixels:
          format: int64
          type: integer
      required:
        - density
        - densityDpi
        - scaledDensity
        - widthPixels
        - heightPixels
      type: object
    FilteringParams:
      additionalProperties: false
      properties:
        min_element_size:
          format: int64
          type: integer
        overlay_offset:
          format: int64
          type: integer
      required:
        - min_element_size
        - overlay_offset
      type: object
    Rect:
      additionalProperties: false
      properties:
        height:
          format: int64
          type: integer
        width:
          format: int64
          type: integer
      required:
        - width
        - height
      type: object
    PhoneStateFocusedElementStruct:
      additionalProperties: false
      properties:
        className:
          type: string
        resourceId:
          type: string
        text:
          type: string
      type: object
    PermissionSet:
      additionalProperties: false
      properties:
        execute:
          type: boolean
        read:
          type: boolean
        write:
          type: boolean
      required:
        - read
        - write
        - execute
      type: object
    SpecialPermissions:
      additionalProperties: false
      properties:
        setGid:
          type: boolean
        setUid:
          type: boolean
        sticky:
          type: boolean
      required:
        - setUid
        - setGid
        - sticky
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header
