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

# Verify a flow

> Run a bound, deduplicated **verification** of this flow on exactly one device through the real worker.

Unlike a normal trigger firing, verification:
- runs a flow that is `enabled` OR `disabled` (an archived flow returns 404);
- targets one device (`deviceId`, or the single bound device);
- is idempotent per `invocationId`: a repeat returns the existing run (`deduplicated: true`, HTTP 200) instead of enqueuing another (HTTP 202);
- never mutates flow health, `lastTriggeredAt`, or the repair loop.

Per-activation payload gate:
- `custom`: validates the payload against the custom payload schema (422 on failure).
- `event`: validates the payload against the event catalog schema and evaluates the trigger conditions; a failing gate returns 409 `conditions_not_met` with the dry-run report.
- `schedule`: the payload is ignored.



## OpenAPI

````yaml /api-reference/workflows.yaml post /flows/{flowId}/verify
openapi: 3.1.0
info:
  title: Workflows
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /flows/{flowId}/verify:
    post:
      tags:
        - Flows
      summary: Verify a flow
      description: >-
        Run a bound, deduplicated **verification** of this flow on exactly one
        device through the real worker.


        Unlike a normal trigger firing, verification:

        - runs a flow that is `enabled` OR `disabled` (an archived flow returns
        404);

        - targets one device (`deviceId`, or the single bound device);

        - is idempotent per `invocationId`: a repeat returns the existing run
        (`deduplicated: true`, HTTP 200) instead of enqueuing another (HTTP
        202);

        - never mutates flow health, `lastTriggeredAt`, or the repair loop.


        Per-activation payload gate:

        - `custom`: validates the payload against the custom payload schema (422
        on failure).

        - `event`: validates the payload against the event catalog schema and
        evaluates the trigger conditions; a failing gate returns 409
        `conditions_not_met` with the dry-run report.

        - `schedule`: the payload is ignored.
      operationId: verifyFlow
      parameters:
        - in: path
          name: flowId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyFlowBody'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/VerifyFlowResult'
                required:
                  - data
                type: object
          description: Verification run already existed (deduplicated)
        '202':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/VerifyFlowResult'
                required:
                  - data
                type: object
          description: Verification run enqueued
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    enum:
                      - conditions_not_met
                    type: string
                  report:
                    $ref: '#/components/schemas/FlowDryRunResult'
                required:
                  - error
                  - report
                type: object
          description: >-
            Event trigger conditions (or payload) not met — the run was not
            enqueued
        '422':
          content:
            application/json:
              schema:
                properties:
                  details:
                    items:
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - message
                      type: object
                    type: array
                  error:
                    type: string
                required:
                  - error
                type: object
          description: >-
            Device not selectable (`device_required` / `device_not_bound`) or
            payload validation failed
        '429':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Too Many Requests
components:
  schemas:
    VerifyFlowBody:
      additionalProperties: false
      properties:
        deviceId:
          description: >-
            Device to run the verification on. Must be one the flow is bound to.
            Optional only when the flow is bound to exactly one device (that
            device is used); otherwise required.
          format: uuid
          type: string
        invocationId:
          description: >-
            Client-supplied idempotency key. A repeat request for the same
            (flow, invocationId) returns the existing verification run
            (`deduplicated: true`, HTTP 200) instead of enqueuing another.
          format: uuid
          type: string
        payload:
          additionalProperties: {}
          default: {}
          type: object
      required:
        - invocationId
      type: object
    VerifyFlowResult:
      properties:
        deduplicated:
          description: >-
            True when this run already existed for the (flow, invocationId) key
            (HTTP 200); false for a newly enqueued run (HTTP 202).
          type: boolean
        deviceId:
          format: uuid
          type: string
        executionId:
          format: uuid
          type: string
        flowId:
          format: uuid
          type: string
        invocationId:
          format: uuid
          type: string
        kind:
          enum:
            - verification
          type: string
        status:
          enum:
            - pending
            - running
            - success
            - failed
            - cancelled
            - skipped
            - invalid
          type: string
        triggerId:
          format: uuid
          type: string
      required:
        - executionId
        - invocationId
        - flowId
        - triggerId
        - deviceId
        - kind
        - status
        - deduplicated
      type: object
    FlowDryRunResult:
      properties:
        actions:
          items:
            $ref: '#/components/schemas/ResolvedAction'
          type: array
        activation:
          enum:
            - event
            - schedule
            - custom
          type: string
        conditionsPassed:
          type:
            - boolean
            - 'null'
        gates:
          $ref: '#/components/schemas/DryRunGates'
        nextFireTime:
          type:
            - string
            - 'null'
        rateLimited:
          type: boolean
        validation:
          $ref: '#/components/schemas/DryRunValidation'
        wouldFire:
          type: boolean
      required:
        - activation
        - validation
        - conditionsPassed
        - nextFireTime
        - rateLimited
        - gates
        - wouldFire
        - actions
      type: object
    ResolvedAction:
      properties:
        children:
          description: >-
            Nested child actions (loop/branch bodies), each the same shape as a
            ResolvedAction.
          items: {}
          type: array
        continueOnError:
          type: boolean
        flowActionId:
          format: uuid
          type: string
        method:
          type: string
        name:
          type: string
        params:
          additionalProperties: {}
          type: object
        recordingEnabled:
          type: boolean
        service:
          enum:
            - tasks_api
            - devices_api
            - agents_api
            - webhooks
          type: string
      required:
        - name
        - service
        - method
        - continueOnError
        - flowActionId
        - recordingEnabled
      type: object
    DryRunGates:
      properties:
        blocked:
          type: boolean
        cooldownActive:
          type:
            - boolean
            - 'null'
        deviceAttached:
          type: boolean
        deviceIds:
          items:
            format: uuid
            type: string
          type: array
        enabled:
          type: boolean
      required:
        - enabled
        - deviceAttached
        - deviceIds
        - blocked
        - cooldownActive
      type: object
    DryRunValidation:
      properties:
        errors:
          items:
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
            type: object
          type: array
        valid:
          type: boolean
      required:
        - valid
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````