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

# Execute Workflow

> Execute a workflow definition.

This creates a WorkflowExecution and starts a Temporal workflow
that will dynamically load the steps and execute them.

Requires: X-API-Key header for authentication

Body (optional):
{
    "input_config": {
        "type": "single_file",
        "file_url": "https://example.com/file.pdf"
    }
}
or
{
    "input_config": {
        "type": "file_list",
        "file_urls": ["https://example.com/file1.pdf", "https://example.com/file2.pdf"]
    }
}



## OpenAPI

````yaml https://www.datalab.to/openapi.json post /api/v1/workflows/workflows/{workflow_id}/execute
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/workflows/workflows/{workflow_id}/execute:
    post:
      summary: Execute Workflow
      description: |-
        Execute a workflow definition.

        This creates a WorkflowExecution and starts a Temporal workflow
        that will dynamically load the steps and execute them.

        Requires: X-API-Key header for authentication

        Body (optional):
        {
            "input_config": {
                "type": "single_file",
                "file_url": "https://example.com/file.pdf"
            }
        }
        or
        {
            "input_config": {
                "type": "file_list",
                "file_urls": ["https://example.com/file1.pdf", "https://example.com/file2.pdf"]
            }
        }
      operationId: execute_workflow_api_v1_workflows_workflows__workflow_id__execute_post
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: integer
            title: Workflow Id
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteWorkflowRequest'
              default: {}
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - APIKeyHeader: []
components:
  schemas:
    ExecuteWorkflowRequest:
      properties:
        input_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input Config
      type: object
      title: ExecuteWorkflowRequest
      description: Request to execute a workflow.
    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:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````