> ## 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.

# Dry-run a flow

> Simulate this flow firing without storing events, enqueuing jobs, or consuming cooldown/rate-limit slots.

Works for every trigger activation type:
- `event`: validates the payload against the event catalog schema and evaluates the trigger conditions.
- `custom`: validates the payload against the custom payload schema (conditions do not apply).
- `schedule`: ignores the payload and reports the next fire time.

The response reports `wouldFire` — whether the flow would actually run right now — alongside the gates that decide it (enabled, device attached, blocked, cooldown). `rateLimited` is informational and is not folded into `wouldFire`.



## OpenAPI

````yaml /api-reference/workflows.yaml post /flows/{flowId}/dry-run
openapi: 3.1.0
info:
  title: Workflows
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /flows/{flowId}/dry-run:
    post:
      tags:
        - Flows
      summary: Dry-run a flow
      description: >-
        Simulate this flow firing without storing events, enqueuing jobs, or
        consuming cooldown/rate-limit slots.


        Works for every trigger activation type:

        - `event`: validates the payload against the event catalog schema and
        evaluates the trigger conditions.

        - `custom`: validates the payload against the custom payload schema
        (conditions do not apply).

        - `schedule`: ignores the payload and reports the next fire time.


        The response reports `wouldFire` — whether the flow would actually run
        right now — alongside the gates that decide it (enabled, device
        attached, blocked, cooldown). `rateLimited` is informational and is not
        folded into `wouldFire`.
      operationId: dryRunFlow
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: flowId
          in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DryRunFlowBody'
      responses:
        '200':
          description: Dry-run result
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FlowDryRunResult'
                required:
                  - data
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - message
                required:
                  - error
                  - details
components:
  schemas:
    DryRunFlowBody:
      type: object
      properties:
        payload:
          type: object
          additionalProperties: {}
          default: {}
      additionalProperties: false
    FlowDryRunResult:
      type: object
      properties:
        activation:
          type: string
          enum:
            - event
            - schedule
            - custom
        validation:
          $ref: '#/components/schemas/DryRunValidation'
        conditionsPassed:
          type:
            - boolean
            - 'null'
        nextFireTime:
          type:
            - string
            - 'null'
        rateLimited:
          type: boolean
        gates:
          $ref: '#/components/schemas/DryRunGates'
        wouldFire:
          type: boolean
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ResolvedAction'
      required:
        - activation
        - validation
        - conditionsPassed
        - nextFireTime
        - rateLimited
        - gates
        - wouldFire
        - actions
    DryRunValidation:
      type: object
      properties:
        valid:
          type: boolean
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
      required:
        - valid
    DryRunGates:
      type: object
      properties:
        enabled:
          type: boolean
        deviceAttached:
          type: boolean
        deviceIds:
          type: array
          items:
            type: string
            format: uuid
        blocked:
          type: boolean
        cooldownActive:
          type:
            - boolean
            - 'null'
      required:
        - enabled
        - deviceAttached
        - deviceIds
        - blocked
        - cooldownActive
    ResolvedAction:
      type: object
      properties:
        name:
          type: string
        service:
          type: string
          enum:
            - tasks_api
            - devices_api
            - agents_api
            - webhooks
        method:
          type: string
        params:
          type: object
          additionalProperties: {}
        continueOnError:
          type: boolean
        children:
          type: array
          items: {}
          description: >-
            Nested child actions (loop/branch bodies), each the same shape as a
            ResolvedAction.
      required:
        - name
        - service
        - method
        - continueOnError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header

````