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

# Send a command to an internal tester's device

> Sends one of spec 16.6's commands (screenshot, diagnostics, raise_log_level) to one device of a current internal tester, during its live session. The device answers within 2 minutes; the result (a screenshot, diagnostics) goes to the open live views only and is never stored, and its outcome (done, failed, refused) is audited as device_command.result, or not_live when the device had no live session. No outcome after 2 minutes means it expired. Owners and admins. For a person: the console session or the CLI signed in as you (apsio login); never a project token or an agent (person_required, spec 16.7). Audited as device_command.send before it is sent; at most 10 a minute per person in a project (429 with Retry-After). Send `Content-Type: application/json`.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/live/commands
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /projects/{projectId}/live/commands:
    post:
      summary: Send a command to an internal tester's device
      description: >-
        Sends one of spec 16.6's commands (screenshot, diagnostics,
        raise_log_level) to one device of a current internal tester, during its
        live session. The device answers within 2 minutes; the result (a
        screenshot, diagnostics) goes to the open live views only and is never
        stored, and its outcome (done, failed, refused) is audited as
        device_command.result, or not_live when the device had no live session.
        No outcome after 2 minutes means it expired. Owners and admins. For a
        person: the console session or the CLI signed in as you (apsio login);
        never a project token or an agent (person_required, spec 16.7). Audited
        as device_command.send before it is sent; at most 10 a minute per person
        in a project (429 with Retry-After). Send `Content-Type:
        application/json`.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a101
          required: true
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tester_id:
                  type: string
                  pattern: >-
                    ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
                install:
                  type: string
                  pattern: ^[A-Za-z0-9_-]{1,64}$
                  description: The device's app.installation.id, from the live view.
                name:
                  type: string
                  enum:
                    - screenshot
                    - diagnostics
                    - raise_log_level
              required:
                - tester_id
                - install
                - name
      responses:
        '200':
          description: Sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiveCommand'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No valid bearer token or console session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Not allowed: the sandbox; a project token or an agent
            (person_required); for commands, a member (owners and admins only).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such project, or no current internal tester with this id in it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The device is not in a live session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: >-
            The project or its organization is being deleted (`erasing`):
            nothing more to read; do not retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: The body is not JSON.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Over a rate limit (the caller's, the client address's, or the
            plan's); Retry-After says when to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Live inspection is not set up here.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    LiveCommand:
      type: object
      properties:
        id:
          type: string
          example: 0192f3a4-0000-7000-8000-0000000c0001
        delivered:
          type: boolean
          description: The device was waiting and took it at once.
      required:
        - id
        - delivered
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
            subject:
              type: string
              enum:
                - organization
                - project
              description: >-
                With `erasing` (410) only: what is being deleted, the
                organization or the project.
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A project token (apsio_pt_v0...), which reads exactly one project, or an
        OAuth access token issued for the API, which reads what its user can.
        Access tokens issued for Apsio's MCP server are accepted only from the
        MCP server itself.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.