Flows

Create a flow that binds a trigger (triggerId) to an ordered list of actions, with at least one action required. Optional settings include target deviceIds, a cooldown (cooldownSeconds/cooldownScope), and webhook notifications on success or failure.

Supports an optional Idempotency-Key header (1-255 printable ASCII characters). Replays with the same key and an identical body return the original 201; a changed body under the same key returns 422 idempotency_key_reused.

post/flows

Request

  • Base URL
    https://api.mobilerun.ai
  • URL
    https://api.mobilerun.ai/flows
  • Auth
    HTTP bearer

Headers

idempotency-keystring

Idempotency-Key: 1-255 printable ASCII characters. Same key with a different request body is a 422 idempotency_key_reused. A retryable in-flight duplicate is a 409 with Retry-After and x-should-retry: true; a terminal duplicate is a 409 with x-should-retry: false. A replay returns the current resource state with Idempotent-Replayed: true.

Example:b3f6a9f0-6f1a-4e9a-9e7a-9c9b6b6a5a3f

Request body

namestring required
descriptionstring
triggerIdstring uuid required
enabledboolean
deviceIdsstring[]
cooldownSecondsinteger nullable
cooldownScope'flow' | 'device'
notifyWebhookIdstring uuid nullable
notifyOnSuccessboolean
notifyOnFailureboolean
healthMonitoringEnabledboolean
selfHealingEnabledboolean
selfHealingMaxAttemptsinteger
recordingEnabledboolean

Response

Flow created

Changes

    • breaking

      the / response property's max was increased from 2.00 to 3.00 for the response status

    • breaking

      the / response's property format changed from no format to date-time for status

    • breaking

      the / response's property format changed from no format to date-time for status

    • breaking

      the / response's property format changed from no format to date-time for status

    • breaking

      the / response's property format changed from no format to date-time for status

    • breaking

      the / response's property format changed from no format to date-time for status

    • warning

      added the new undefined enum value to the / response property for the response status

    • info

      added the new optional header request parameter idempotency-key

    • info

      added the new optional request property ////

    • info

      added the new optional request property ////

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property default value false was removed

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status