Triggers

Fire a custom trigger with payload

Changed on

Invoke a custom trigger directly with an arbitrary JSON payload.

Fan-out: a trigger may be referenced by multiple flows (workflows). Firing it enqueues one execution per enabled, non-deleted flow attached to this trigger, each receiving the same payload. The enqueuedCount in the response reports how many were enqueued (0 if no flows are attached, or if all matching flows are gated by a cooldown).

Payload validation:

  • If the trigger has a customPayloadSchema, the payload is validated against it (JSON Schema).
  • If no schema is configured, the payload only needs to be a JSON object — any keys and values are accepted.

Only triggers with activation = "custom" can be fired through this endpoint; event and schedule triggers return 409.

Supports an optional Idempotency-Key header (1-255 printable ASCII characters), which maps to the derived invocationId used for fan-out deduplication. The payload is bound to the key on the first accepted fire, before fan-out. A repeat with the same key and an identical payload returns 202 with Idempotent-Replayed: true (deduplicated: true when flows were skipped; enqueuedCount counts only executions enqueued by that call); a changed payload under the same key returns 422 idempotency_key_reused.

post/triggers/{triggerId}/fire

Request

  • Base URL
    https://api.mobilerun.ai
  • URL
    https://api.mobilerun.ai/triggers/{triggerId}/fire
  • Auth
    HTTP bearer

Path parameters

triggerIdstring uuid required

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

payloadobject required

Arbitrary JSON object forwarded to every flow attached to this trigger. Validated against the trigger's customPayloadSchema when one is configured; otherwise only "must be a JSON object" is enforced.

Response

Custom trigger fired; one execution enqueued per enabled flow attached to this trigger

invocationIdstring uuid required

Unique ID for this fire invocation (derived from the Idempotency-Key header when one is sent, otherwise generated).

enqueuedCountinteger required

Number of flow executions enqueued. May be 0 if no flows are attached to this trigger, if all attached flows are currently in cooldown, or if every attached flow was deduplicated.

deduplicatedboolean required

True when at least one attached flow was skipped because it already had an execution for this (flow, invocationId). Only ever true when the request carried an Idempotency-Key.

Changes

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      added the new optional header request parameter idempotency-key

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional 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 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

      endpoint added