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

# Run a workflow now

> Runs a workflow or evaluates a hook immediately, without waiting for its trigger.

Check [Get workflow run-now options](/api-reference/get-workflow-run-now-options) first. If that reports `requires_previous_run`, pass one of the run IDs it offers as `replay_from_run_id` and the workflow runs again with that run's payload. Otherwise send no body or an empty one.

This executes the workflow for real. It calls whatever the definition calls and consumes credits. Runs started this way are recorded with `is_test_run` set to `true`, which is what keeps them out of the replay list on later calls.

For workflows, the call returns as soon as the run is queued. Poll [Get workflow run](/api-reference/get-workflow-run) with the `run_id` to watch it finish. For hooks, the call waits for evaluation to complete before returning.

Archived workflows cannot be run. A `replay_from_run_id` whose payload no longer matches the workflow's current trigger is rejected, because replaying it would run the steps against fields that have since moved.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/workflows/{workflow_id}/run-now
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/workflows/{workflow_id}/run-now:
    post:
      summary: Run a workflow now
      description: >-
        Runs a workflow or evaluates a hook immediately, without waiting for its
        trigger.


        Check [Get workflow run-now
        options](/api-reference/get-workflow-run-now-options) first. If that
        reports `requires_previous_run`, pass one of the run IDs it offers as
        `replay_from_run_id` and the workflow runs again with that run's
        payload. Otherwise send no body or an empty one.


        This executes the workflow for real. It calls whatever the definition
        calls and consumes credits. Runs started this way are recorded with
        `is_test_run` set to `true`, which is what keeps them out of the replay
        list on later calls.


        For workflows, the call returns as soon as the run is queued. Poll [Get
        workflow run](/api-reference/get-workflow-run) with the `run_id` to
        watch it finish. For hooks, the call waits for evaluation to complete
        before returning.


        Archived workflows cannot be run. A `replay_from_run_id` whose payload
        no longer matches the workflow's current trigger is rejected, because
        replaying it would run the steps against fields that have since moved.
      operationId: run_now_workflow_api_apps__app_id__workflows__workflow_id__run_now_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose workflows you want to work with.
            title: App Id
          description: ID of the app whose workflows you want to work with.
          example: 6820f3a4e7b91d003c45a1f2
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the workflow, as returned in `id` by [List
              workflows](/api-reference/list-workflows).
            title: Workflow Id
          description: >-
            ID of the workflow, as returned in `id` by [List
            workflows](/api-reference/list-workflows).
          example: 68b1c0d4e7b91d003c45a1f2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunNowRequest'
              default: {}
      responses:
        '200':
          description: The workflow run is queued, or the hook evaluation has completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunNowResponse'
        '400':
          description: >-
            The workflow is archived, or its trigger needs `replay_from_run_id`
            and you did not send one.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: >-
            This workspace's plan does not include workflows. Upgrade to Builder
            or above.
        '403':
          description: >-
            You don't have access to this app, the app does not exist, or the
            app still runs the older automations engine instead of workflows.
        '404':
          description: >-
            There is no workflow with this ID on this app, or no run with the ID
            you asked to replay.
        '409':
          description: >-
            The run you asked to replay was started by a different trigger
            configuration, or its payload is no longer available. A payload
            stored with encrypted fields that can't be read is
            `trigger_payload_unreadable`.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            Rate limit exceeded. The base limit is 5 requests per minute. See
            [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
        '503':
          description: >-
            The run's trigger data is temporarily unavailable
            (`trigger_payload_unavailable`). Retry with backoff.
          content:
            application/json:
              examples:
                trigger_payload_unavailable:
                  summary: trigger_payload_unavailable
                  value:
                    error:
                      code: trigger_payload_unavailable
                      message: >-
                        The selected run's trigger data is temporarily
                        unavailable. Try again.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    RunNowRequest:
      properties:
        replay_from_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Replay From Run Id
          description: >-
            Run whose trigger payload to reuse for this run. Required when [Get
            workflow run-now
            options](/api-reference/get-workflow-run-now-options) reports
            `requires_previous_run`. Leave it out otherwise.
          example: 0195f2a1-4c3e-7b21-9f0d-2a5c8e1b4d77
      type: object
      title: RunNowRequest
    RunNowResponse:
      properties:
        status:
          type: string
          title: Status
          description: >-
            Either `started` for a queued workflow or `completed` for a
            synchronously evaluated hook.
          example: started
        message:
          type: string
          title: Message
          description: Confirmation text you can show someone.
          example: Run started
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
          description: >-
            ID of the run. Pass it to [Get workflow
            run](/api-reference/get-workflow-run) to read its details.
          example: 0195f2a1-4c3e-7b21-9f0d-2a5c8e1b4d77
      type: object
      required:
        - status
        - message
      title: RunNowResponse
      description: Confirmation of a queued workflow run or a completed hook evaluation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

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