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

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Runs a workflow 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 an empty body.

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.

The call returns as soon as the run is queued, so `status` is `started` rather than a result. Poll [Get workflow run](/api-reference/get-workflow-run) with the `run_id` to watch it finish.

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

This endpoint is limited to 5 requests per minute.



## 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:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/workflows/{workflow_id}/run-now:
    post:
      summary: Run a workflow now
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Runs a workflow 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 an empty body.


        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.


        The call returns as soon as the run is queued, so `status` is `started`
        rather than a result. Poll [Get workflow
        run](/api-reference/get-workflow-run) with the `run_id` to watch it
        finish.


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


        This endpoint is limited to 5 requests per minute.
      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:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunNowRequest'
      responses:
        '200':
          description: The run is queued.
          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, the app
            still runs the older automations engine instead of workflows, or you
            used a workspace API key.
        '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.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
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: Always `started`. The run is queued, not finished.
          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 that started. Pass it to [Get workflow
            run](/api-reference/get-workflow-run) to follow it.
          example: 0195f2a1-4c3e-7b21-9f0d-2a5c8e1b4d77
      type: object
      required:
        - status
        - message
      title: RunNowResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````