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

# Run a stored workflow by id



## OpenAPI

````yaml post /api/workflows/{agent_name}/{workflow_id}/run
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/workflows/{agent_name}/{workflow_id}/run:
    post:
      tags:
        - Workflows
      summary: Run a stored workflow by id
      operationId: workflow_run
      parameters:
        - name: agent_name
          in: path
          required: true
          schema:
            type: string
            title: Agent Name
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            title: Workflow Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/WorkflowRunRequest'
                - type: 'null'
              title: Data
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    WorkflowRunRequest:
      properties:
        inputs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Inputs
          description: Runtime inputs merged over stored defaults as $workflow.inputs
        include_data:
          type: boolean
          title: Include Data
          description: >-
            If true, include full per-step traces (like n8n includeData).
            Default false returns compact status + result from apigene.output.
          default: false
        dry_run:
          type: boolean
          title: Dry Run
          description: >-
            If true, exercise the workflow without live side effects: OpenAPI
            actions build the outbound request but do not send it; MCP actions
            are stubbed; LLM nodes return a stub; approve gates auto-take
            main[0]. Response includes dry_run=true. Use include_data=true to
            inspect per-step traces.
          default: false
      type: object
      title: WorkflowRunRequest
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````