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

> [Beta] Validate a workflow definition — Validate workflow blocks without creating a workflow.

# [Beta] Validate a workflow definition



## OpenAPI

````yaml post /workflows/validate
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /workflows/validate:
    post:
      tags:
        - Workflows (Beta)
      summary: '[Beta] Validate a workflow definition'
      description: >-
        Validate workflow blocks without creating a workflow. Runs both the
        structural check and the deep semantic validation the dashboard editor
        runs on Save (action inputs against each action's input schema, trigger
        configuration against the trigger's configuration_def). Returns
        validation issues and the list of action types used. Use this before
        creating or updating a workflow to catch errors early.
      operationId: validateWorkflow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateWorkflowPublicInput'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateWorkflowPublicOutput'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    ValidateWorkflowPublicInput:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/ValidateWorkflowPublicInputInput'
      type: object
      properties:
        trigger_type:
          type: string
          enum:
            - manual-trigger
            - ai-trigger
            - cron-trigger
            - form-trigger
            - webhook
            - contact-created
            - phone-call-started
            - phone-call-finished
            - ticket-created
            - ticket-reassigned
            - ticket-resolved
            - ticket-handoff
            - pre-ticket-handoff
            - ticket-tag-added
            - ticket-inactive
            - agent-inactive
            - sequence-completed
            - csat-score-submit
            - prohibited-topic-detected
            - sla-first-reply-breached
            - sla-next-reply-breached
            - sla-resolution-breached
            - voice-call-transferred
            - pre-voice-call-transfer
            - pre-phone-call-finished
            - manual-ticket-trigger
            - contact-message-received
            - first-contact-message-received
            - macro-called
            - ai-response-completed
            - agent-availability-changed
            - agent-avail-in-team-changed
            - ai-response-requested
            - ticket-reopened
          description: Trigger type to validate against
        trigger_configuration:
          description: >-
            Trigger configuration to validate against the trigger's
            configuration_def. When omitted, the trigger is validated as if
            unconfigured — triggers with required configuration (e.g.
            cron-trigger, ai-trigger) will report errors.
          anyOf:
            - {}
            - type: 'null'
        workflow_blocks:
          type: array
          items: {}
          description: Workflow blocks to validate
      required:
        - trigger_type
        - workflow_blocks
    ValidateWorkflowPublicOutput:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/ValidateWorkflowPublicOutput'
      type: object
      properties:
        valid:
          type: boolean
          description: Whether the workflow definition is valid (no error-severity issues)
        issues:
          type: array
          items:
            type: object
            properties:
              step_id:
                anyOf:
                  - type: string
                  - type: 'null'
                description: The step ID where the issue was found, if applicable
              message:
                type: string
                description: Description of the validation issue
              severity:
                type: string
                enum:
                  - error
                  - warning
                description: >-
                  "error" blocks create/update/activate; "warning" is advisory
                  only
            required:
              - step_id
              - message
              - severity
            additionalProperties: false
          description: List of validation issues found
        action_types_used:
          type: array
          items:
            type: string
          description: List of action types referenced in the workflow
      required:
        - valid
        - issues
        - action_types_used
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````