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

# List an app's known screens

> Lists the screens of an app that are already known, as `app://`
addresses `scrape` can follow, the way Firecrawl's `map` lists a
site's pages. It answers at once: it reads what this workspace's
runs recorded (every scrape and agent run records the screens it
passes through) plus the base map Lusor ships, and it never opens
the app or walks a phone.

A recorded map is per platform, because the names on screen are:
the named `device`'s platform, otherwise the platform every phone
of the workspace shares, otherwise both. Each address is the
shortest recorded chain of tapped row names from the app's first
screen. The list is never claimed to be complete; `coverage` says
where each link came from and `checkedAt` when a run last read the
app. An app no run has passed through answers an empty `links` and
a `message` saying why.

Each answered call is charged, an empty list included. A call
refused or failed (any 4xx or 5xx) is not charged, and an
`Idempotency-Key` repeat answers the first response without a
second charge. A refused or failed call does not use up its key.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/map
openapi: 3.1.0
info:
  title: Lusor API
  version: 0.1.0
  description: |
    Run AI agents on real phones, or drive a phone directly with
    deterministic actions.

    ## Authentication

    Every `/v1/*` endpoint except `GET /v1/health` requires an API key.
    Create one in the Lusor dashboard under **Settings → API Keys**. A key
    is shown once and is bound to one workspace. Revoking it there stops it
    working immediately.

    Send it in either header:

    - `X-Api-Key: <your API key>`
    - `Authorization: Bearer <your API key>`

    Because a key is bound to its workspace, `workspaceId` query and body
    parameters are optional for API-key callers. A request that names a
    different workspace returns an opaque `404`.

    ## Runs

    `POST /v1/agent` runs one task on a phone and returns its id; read the
    result with `GET /v1/agent/{id}`.

    To keep a conversation with an agent instead, use
    `POST /v1/agents/{id}/turns` to start or continue an agent run.
    Read the run under `/v1/sessions/{id}`; poll
    `GET /v1/sessions/{id}/status` or `GET /v1/sessions/{id}/events` for
    progress.

    ## Errors

    Errors are JSON: `{ "error": "<code>", "message": "<text>" }`. A
    request that fails validation returns `400` in one of two shapes,
    depending on the endpoint: `{ "error": "validation_error", "details":
    { ... } }` (direct phone control actions, for example), or
    `{ "error": "bad_request", "message": "<text>" }` (agent endpoints, for
    example). Branch on `error`.
  contact:
    name: Lusor
    url: https://lusor.ai
  license:
    name: Proprietary
    url: https://lusor.ai/terms
servers:
  - url: https://api.lusor.ai
    description: Production
security:
  - ApiKey: []
  - BearerAuth: []
tags:
  - name: Agent
    description: |
      One call runs a task on a phone and returns its result: the answer
      as `data` (text, or the object a schema describes) and the run's
      recording.
  - name: Scrape
    description: |
      One call reads one screen of an app: the screen as Markdown, fields
      read off it, and its picture.
  - name: Interact
    description: |
      Keep working on the screen an agent or scrape task left open, then
      stop.
  - name: Map
    description: |
      List an app's known screens as `app://` addresses, from the screens
      earlier runs passed through. Never walks a phone.
  - name: Agents
    description: Persistent agents, the phone each one uses, and their turns (runs).
  - name: Secrets
    description: |
      Secrets saved in a workspace (passwords, sign-in details). A run uses
      them by name through `secrets`; values never travel in a request.
  - name: Sessions
    description: |
      Run records: list, inspect, stop, and read events and artifacts. Start
      a run with `POST /v1/agents/{id}/turns`, or without an agent through
      `POST /v1/workspaces/{workspaceId}/devices/{deviceId}/sessions`.
  - name: LiveView
    description: |
      View-only WebRTC live view of a session's phone: signaling, ICE
      servers, and stream control. API keys get live view only on the
      customer's own phone, not on a Lusor Phone.
  - name: Devices
    description: |
      The phones in your workspace, and reads of their current screen and
      UI tree.
  - name: DeviceVerbs
    description: |
      Direct phone control: deterministic actions (tap, swipe, type, key,
      clear, back, home, recent, screenshot, apps/start, apps/stop) and
      chains of them. On a Lusor Phone, API-key calls meter phone minutes.
  - name: Shell
    description: |
      Restricted shell escape hatch. Commands are checked against a
      denylist and audit-logged. No command output is returned.
  - name: Datasets
    description: Lists a run produced, saved as reusable Datasets.
  - name: Skills
    description: Reusable automation skills (Markdown documents).
  - name: PhoneNumbers
    description: |
      Workspace phone numbers and their stored SMS messages. Read-only for
      API keys.
  - name: Emails
    description: >
      Workspace Agent Mail addresses and stored inbound mail. Addresses

      are added and removed through a quote (billed to the workspace's

      Inbox plan). Mail is read-only: there is no compose, reply, or send
      endpoint, and message

      bodies are returned as raw plain text without HTML execution, remote

      asset fetches, or code extraction.
  - name: Workspaces
    description: The workspace an API key is bound to.
  - name: Billing
    description: The account's plan and the credits it has left.
  - name: Catalog
    description: The catalog of apps that can be installed on a Lusor Phone.
  - name: AppInstalls
    description: |
      Install catalog apps on a phone, follow the installs, and uninstall
      them. Viewers cannot install.
  - name: Notifications
    description: |
      Notifications the workspace's phones forward, the apps each phone
      forwards, and the rules that act on them. Read-only for API keys.
  - name: Files
    description: Files the workspace's agents saved from its phones. Read-only.
  - name: ModelKeys
    description: |
      The workspace's own OpenAI or Anthropic API key, used by its runs
      instead of Lusor's (paid plans).
  - name: Health
    description: Service health check.
paths:
  /v1/map:
    post:
      tags:
        - Map
      summary: List an app's known screens
      description: |
        Lists the screens of an app that are already known, as `app://`
        addresses `scrape` can follow, the way Firecrawl's `map` lists a
        site's pages. It answers at once: it reads what this workspace's
        runs recorded (every scrape and agent run records the screens it
        passes through) plus the base map Lusor ships, and it never opens
        the app or walks a phone.

        A recorded map is per platform, because the names on screen are:
        the named `device`'s platform, otherwise the platform every phone
        of the workspace shares, otherwise both. Each address is the
        shortest recorded chain of tapped row names from the app's first
        screen. The list is never claimed to be complete; `coverage` says
        where each link came from and `checkedAt` when a run last read the
        app. An app no run has passed through answers an empty `links` and
        a `message` saying why.

        Each answered call is charged, an empty list included. A call
        refused or failed (any 4xx or 5xx) is not charged, and an
        `Idempotency-Key` repeat answers the first response without a
        second charge. A refused or failed call does not use up its key.
      operationId: mapApp
      parameters:
        - $ref: '#/components/parameters/MapIdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MapInput'
      responses:
        '200':
          description: The app's known screens
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MapResult'
        '400':
          description: |
            A request-validation refusal (`bad_request`: an address that is
            not `app://<app>` or holds a control character, a `limit` out of
            range), or a `device` that is
            not one of the workspace's phones (`unknown_device`, listing
            `devices`).
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AgentDeviceError'
                  - $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: |
            `credits_exhausted`: the workspace is out of credits. Nothing was
            read and nothing was charged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          $ref: '#/components/responses/TenantPaused'
        '409':
          description: |
            `idempotency_key_in_use`: a request with this `Idempotency-Key`
            is still running. `idempotency_outcome_unknown`: one never
            finished, so it is not run again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: |
            `idempotency_key_reused`: this `Idempotency-Key` was already used
            for a different request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: |
            `map_timeout`: reading the app's map took too long; try again or
            narrow it. `idempotency_unavailable`: the `Idempotency-Key` could
            not be recorded, so nothing ran. Neither is charged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    MapIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 255
        pattern: ^[\x21-\x7E]+$
      description: |
        Makes a retry of this map safe from a second charge. Send a fresh
        key (for example a UUID) per call and the same key when you retry
        it.

        * The first answered request with a key is charged and its result
          is kept for 24 hours.
        * A repeat with the same key and the same request returns that
          result unchanged, without reading or charging again, with the
          header `Idempotent-Replayed: true`.
        * A refused or failed request (validation, access, `402
          credits_exhausted`, `503 map_timeout`) is not charged and does
          not use up the key: a retry with it runs.
        * A repeat while the first is still running returns
          `409 idempotency_key_in_use`; if the first never finished,
          `409 idempotency_outcome_unknown` (it is not run again: use a new
          key).
        * The same key with a different request (path, query or body)
          returns `422 idempotency_key_reused`.
        * A key that is not 1 to 255 visible ASCII characters returns `400
          invalid_idempotency_key`. Without the header, or with an empty
          one, nothing is deduplicated and every answered call is charged.

        Keys are scoped to the workspace and the operation. If the key
        cannot be recorded nothing runs and the response is `503
        idempotency_unavailable`.
  schemas:
    MapInput:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          maxLength: 2048
          description: |
            The app, `app://<app>`: a Lusor app name (`settings`), which
            is the app on either platform, or a raw package or bundle id,
            which is that app on its own platform only. A path
            (`app://settings/general`) keeps only the links under it.
          examples:
            - app://settings
        search:
          type: string
          maxLength: 500
          description: |
            Keeps the links whose name or address contains these words,
            best match first: a name that is the search, then one that
            starts with it, then one that contains it.
        limit:
          type: integer
          minimum: 1
          maximum: 5000
          default: 5000
          description: The most links to return.
        device:
          type: string
          description: |
            The phone whose platform's map to read. Optional; without it,
            the platform every phone of the workspace shares, otherwise
            both platforms.
        workspaceId:
          type: string
          format: uuid
          description: The workspace, for a key that can reach several.
    MapResult:
      type: object
      required:
        - success
        - links
        - coverage
        - checkedAt
      properties:
        success:
          type: boolean
          const: true
        links:
          type: array
          items:
            $ref: '#/components/schemas/MapLink'
          description: The known screens, the app's first screen first.
        coverage:
          type: object
          required:
            - recorded
            - base
          properties:
            recorded:
              type: integer
              description: Links from this workspace's own runs.
            base:
              type: integer
              description: Links from the base map Lusor ships.
          description: Where the links came from. A map is never complete.
        checkedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: |
            When a run of this workspace last read one of the app's mapped
            screens; null when nothing of the app is recorded.
        message:
          type: string
          description: |
            Why `links` is empty. For an app no run has passed through, run
            `scrape` or `agent` on it first.
    AgentDeviceError:
      type: object
      description: |
        A phone could not be chosen. `device_required`: the workspace has
        several phones; `no_device`: it has none; `unknown_device`: `device`
        is not one of them. `devices` lists the ids to choose from.
      required:
        - error
        - message
        - devices
      properties:
        error:
          type: string
          enum:
            - device_required
            - no_device
            - unknown_device
        message:
          type: string
        devices:
          type: array
          items:
            type: string
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
    MapLink:
      type: object
      required:
        - url
        - title
      properties:
        url:
          type: string
          description: The screen's address, for `scrape`.
          examples:
            - app://settings/general/about
        title:
          type: string
          description: The screen's name as a person sees it.
  responses:
    Unauthorized:
      description: Authentication required or invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TenantPaused:
      description: |
        `tenant_paused`: the account is paused. It can't start runs or buy
        or deploy phones; everything it already has keeps working. Contact
        support.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Workspace API key, created in the dashboard under Settings → API Keys.
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        The same workspace API key, sent as `Authorization: Bearer <your API
        key>`.

````

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