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

# Run a workflow



## OpenAPI

````yaml put /v4/workflows/{workflowId}/run
openapi: 3.0.3
info:
  title: Kadoa API
  version: 3.0.0
  contact:
    name: Support
    email: support@kadoa.com
servers:
  - url: https://api.kadoa.com
security: []
paths:
  /v4/workflows/{workflowId}/run:
    put:
      tags:
        - Workflows
      summary: Run a workflow
      parameters:
        - name: workflowId
          in: path
          required: true
          description: The ID of the workflow to run
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variables:
                  type: object
                  description: Optional variables to pass to the workflow execution
                  additionalProperties: true
                limit:
                  type: number
                  description: Optional limit for the number of records to process
                  example: 100
                preview:
                  type: boolean
                  description: >-
                    Rerun the preview of a PREVIEW-state workflow instead of
                    starting a production run
      responses:
        '200':
          description: Workflow started successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Workflow started
                  jobId:
                    type: string
                    description: The ID of the created job
                  status:
                    type: string
                    description: The status of the job
                    example: running
        '400':
          description: >-
            Bad request, such as invalid input, or a run compliance review
            blocks (the workflow is in review, was rejected, or must be reviewed
            before it can become active)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: x-api-key missing or not authorized
        '404':
          description: Workflow not found in the caller's team
        '409':
          description: >-
            Workflow lifecycle conflict. Pass preview=true to rerun a stale
            preview instead.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  reason:
                    type: string
                    enum:
                      - WORKFLOW_NOT_FINALISED
                      - PREVIEW_AWAITS_CUSTOMER_CONFIRMATION
                  recoveryHint:
                    type: string
                  existingState:
                    type: string
                    enum:
                      - DRAFT
                      - PREVIEW
        '429':
          description: Too many concurrent jobs
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  reason:
                    type: string
                    enum:
                      - PIPELINE_CROWDED
                      - USER_RATE_LIMIT
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal service error. Please try again later.
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````

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