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

# Create Workflow Configuration

> Create a new workflow configuration with custom settings, schedule, and triggers.

This creates a configuration that can be used to run workflows with specific settings.

Required:
- `workflow_definition_id`: ID of the workflow definition to configure

Optional:
- `config`: Configuration overrides
- `schedule`: Schedule configuration for automated execution
- `triggers`: Event-based triggers for workflow execution



## OpenAPI

````yaml /openapi/em-data-readiness-v2.yaml post /api/data-readiness/workflows
openapi: 3.1.0
info:
  title: EM Data Readiness Service
  description: Data Readiness Service API for managing workflows, metrics, and data quality
  version: 4.3.0-dev1
servers: []
security:
  - BearerAuth: []
tags:
  - name: Health
    description: Service health monitoring. Check service status and version information.
  - name: Root
    description: Root endpoint providing service information and navigation links.
  - name: Configuration
    description: Service configuration endpoints. View current configuration values.
  - name: Workflows
    description: >-
      Workflow configuration and execution management. Create, configure, and
      run data quality workflows including definitions, configurations, runs,
      and tasks.
  - name: Data Assets
    description: >-
      Data catalog entity management. Manage databases, schemas, and tables
      metadata.
  - name: Metrics
    description: >-
      Data quality metrics and scorecards. Calculate scores, view trends, and
      analyze dimensions.
  - name: Violations
    description: >-
      Data quality violation management. View, acknowledge, and remediate
      detected violations.
  - name: Glossary
    description: >-
      Business glossary management. Create, verify, and organize business terms
      and definitions.
paths:
  /api/data-readiness/workflows:
    post:
      tags:
        - Workflows
      summary: Create Workflow Configuration
      description: >-
        Create a new workflow configuration with custom settings, schedule, and
        triggers.


        This creates a configuration that can be used to run workflows with
        specific settings.


        Required:

        - `workflow_definition_id`: ID of the workflow definition to configure


        Optional:

        - `config`: Configuration overrides

        - `schedule`: Schedule configuration for automated execution

        - `triggers`: Event-based triggers for workflow execution
      operationId: create_workflow_configuration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowConfigurationCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowConfigurationCreateResponse'
        '404':
          description: Workflow definition not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Configuration already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    WorkflowConfigurationCreateRequest:
      properties:
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
          description: Configuration overrides for this workflow configuration.
          examples:
            - processor_config:
                enable_profiling: true
                profile_sample: 1000
              source_config:
                database: analytics
                host: db.example.com
                port: 5432
                type: postgres
        schedule:
          anyOf:
            - $ref: '#/components/schemas/ScheduleConfig'
            - type: 'null'
          description: Schedule configuration for automated execution
        triggers:
          anyOf:
            - items:
                $ref: '#/components/schemas/TriggerConfig'
              type: array
            - type: 'null'
          title: Triggers
          description: Event-based triggers for workflow execution
        workflow_definition_id:
          type: string
          format: uuid
          title: Workflow Definition Id
          description: ID of the workflow definition to configure
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
      type: object
      required:
        - workflow_definition_id
      title: WorkflowConfigurationCreateRequest
      description: Request body for creating a workflow configuration.
      example:
        config:
          enable_profiling: true
        schedule:
          cron_expression: 0 0 * * *
          enabled: true
        workflow_definition_id: 550e8400-e29b-41d4-a716-446655440001
    WorkflowConfigurationCreateResponse:
      properties:
        configuration_id:
          type: string
          format: uuid
          title: Configuration Id
          description: Created configuration identifier
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        config:
          additionalProperties: true
          type: object
          title: Config
          description: Applied configuration
          examples:
            - confidence_threshold: 0.85
        schedule:
          anyOf:
            - $ref: '#/components/schemas/ScheduleSummary'
            - type: 'null'
          description: Schedule summary
        triggers:
          items:
            $ref: '#/components/schemas/TriggerSummary'
          type: array
          title: Triggers
          description: List of triggers
        created_at:
          type: string
          title: Created At
          description: Creation timestamp (ISO 8601)
          examples:
            - '2024-01-15T10:30:00Z'
      type: object
      required:
        - configuration_id
        - created_at
      title: WorkflowConfigurationCreateResponse
      description: Response for workflow configuration creation.
      example:
        config:
          confidence_threshold: 0.85
        configuration_id: 123e4567-e89b-12d3-a456-426614174000
        created_at: '2024-01-15T10:30:00Z'
        triggers: []
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorInfo'
          description: >-
            Error information object containing code, message, and optional
            details
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: Request ID for debugging and support
          examples:
            - req_abc123xyz
      type: object
      required:
        - error
      title: ErrorResponse
      description: >-
        Standard error response model for API errors.


        Matches the structure returned by _handle_service_error in
        workflows/routes.py.

        The actual API response format is:

        {
            "error": {
                "code": "ERROR_CODE",
                "message": "Error message",
                "details": {...}
            },
            "request_id": "optional-request-id"
        }
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ScheduleConfig:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Whether the schedule is active
          default: false
        cron_expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Cron Expression
          description: >-
            Cron expression for schedule (e.g., '0 0 * * *' for daily at
            midnight)
          examples:
            - 0 0 * * *
            - 0 */6 * * *
            - 0 0 * * 0
        timezone:
          type: string
          title: Timezone
          description: Timezone for schedule execution
          default: UTC
          examples:
            - UTC
            - America/New_York
            - Europe/London
        start_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Date
          description: When the schedule should start (ISO 8601)
          examples:
            - '2024-01-01T00:00:00Z'
      type: object
      title: ScheduleConfig
      description: Schedule configuration for automated workflow execution.
    TriggerConfig:
      properties:
        type:
          type: string
          title: Type
          description: Trigger type (event, webhook, etc.)
          examples:
            - event
            - webhook
        event_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Type
          description: Type of event that triggers execution
          examples:
            - data_asset_updated
            - data_asset_created
        conditions:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Conditions
          description: Conditions that must be met for trigger activation
          examples:
            - data_asset_type: table
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: Webhook URL for webhook triggers
      type: object
      required:
        - type
      title: TriggerConfig
      description: Event-based trigger configuration.
    ScheduleSummary:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Whether the schedule is active
          examples:
            - true
        cron_expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Cron Expression
          description: Cron expression for schedule
          examples:
            - 0 0 * * *
      type: object
      required:
        - enabled
      title: ScheduleSummary
      description: Summary schedule information for list responses.
      example:
        cron_expression: 0 0 * * *
        enabled: true
    TriggerSummary:
      properties:
        type:
          type: string
          title: Type
          description: Trigger type
          examples:
            - event
        event_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Type
          description: Event type that triggers execution
          examples:
            - table_created
        conditions:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Conditions
          description: Conditions for trigger activation
          examples:
            - database: production
      type: object
      required:
        - type
      title: TriggerSummary
      description: Trigger information for responses.
      example:
        conditions:
          database: production
        event_type: table_created
        type: event
    ErrorInfo:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Error code identifier (e.g., 'WORKFLOW_NOT_FOUND',
            'VALIDATION_ERROR')
          examples:
            - WORKFLOW_NOT_FOUND
        message:
          type: string
          title: Message
          description: Human-readable error message
          examples:
            - >-
              Workflow configuration with id
              '123e4567-e89b-12d3-a456-426614174000' not found
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Additional error details as a dictionary (flexible structure for
            business logic errors)
          examples:
            - workflow_id: 123e4567-e89b-12d3-a456-426614174000
      type: object
      required:
        - code
        - message
      title: ErrorInfo
      description: >-
        Nested error information object.


        Note: This model uses an untyped dict for `details` to match the
        flexible error

        structure used throughout the service layer (see WorkflowServiceError
        and similar).

        This is distinct from ErrorDetail, which is used for structured
        validation errors.
    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:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Authorization: Bearer <token>`. The JWT must contain valid
        client_id, and project_id claims for tenant isolation and SDK routing.

````