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

# Validate Workflow

> Checks a workflow against the published contract for each node type without saving it. Accepts either the save envelope ({"flow_data": {...}}) or bare workflow JSON. The same check runs when you create or update a workflow.

Validation checks every node against the published contract for its node type, as returned by the [node catalog](https://docs.lyzr.ai/enterprise/api/superflow/node-catalog.md). The same check runs when you [create](https://docs.lyzr.ai/enterprise/api/superflow/workflows/create.md) or [update](https://docs.lyzr.ai/enterprise/api/superflow/workflows/update.md) a workflow, and those responses carry the same `issues` array. See [Validation](https://docs.lyzr.ai/enterprise/api/superflow/flow-data.md#validation) for every issue code.


## OpenAPI

````yaml openapi/superflow.yaml POST /workflows/validate
openapi: 3.0.3
info:
  title: Lyzr SuperFlow API
  version: '1.0'
  description: >-
    SuperFlow orchestration API covering workflow CRUD, versions and deployment,
    validation, the node catalog, the execution lifecycle (run, pause, resume,
    terminate, rerun), scheduling, and human-in-the-loop approvals. Agent CRUD
    and agent inference are served by the platform API and are not part of this
    surface.
servers:
  - url: https://inference.studio.lyzr.ai/api
security:
  - ApiKeyAuth: []
tags:
  - name: workflows
    description: >-
      Create, read, update, delete, validate, lock, and share workflow
      definitions.
  - name: workflow-versions
    description: Save the draft as a version and choose which version production runs.
  - name: node-catalog
    description: The contract for every node type, used to build and validate workflows.
  - name: workflow-execution
    description: Run workflows and control the execution lifecycle.
  - name: workflow-schedules
    description: Cron-driven recurring triggers for stored workflows.
  - name: approvals
    description: Human-in-the-loop approval requests raised by running workflows.
paths:
  /workflows/validate:
    post:
      tags:
        - workflows
      summary: Validate a workflow
      description: >-
        Checks a workflow against the published contract for each node type
        without saving it. Accepts either the save envelope ({"flow_data":
        {...}}) or bare workflow JSON. The same check runs when you create or
        update a workflow.
      operationId: validateWorkflow
      requestBody:
        required: true
        description: The save envelope or bare workflow JSON.
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationResult'
              example:
                ok: false
                issues:
                  - severity: error
                    code: missing_parameter
                    nodeId: '3'
                    nodeName: HTTP Request
                    path: parameters.url
                    message: url is required
                  - severity: warning
                    code: unknown_parameter
                    nodeId: '5'
                    nodeName: Set
                    path: parameters.optoins
                    message: unknown parameter "optoins"
                    hint: options
components:
  schemas:
    ValidationResult:
      type: object
      properties:
        ok:
          type: boolean
          description: False when any issue has severity error.
        issues:
          type: array
          description: Errors first, then warnings.
          items:
            $ref: '#/components/schemas/ValidationIssue'
    ValidationIssue:
      type: object
      properties:
        severity:
          type: string
          enum:
            - error
            - warning
          description: >-
            error means the workflow cannot run or a node is certain to fail.
            warning means it runs, but probably not as intended.
        code:
          type: string
          description: >-
            Issue code, for example missing_parameter, unknown_parameter,
            trigger_count, cycle, unreachable_node, or expression_unknown_field.
            See the flow_data reference for the full list.
          example: missing_parameter
        nodeId:
          type: string
          example: '3'
        nodeName:
          type: string
          example: HTTP Request
        path:
          type: string
          example: parameters.url
        message:
          type: string
          example: url is required
        hint:
          type: string
          description: A suggested fix, such as the closest known parameter name.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Lyzr API key. Studio session keys (agk_, ags_) and durable sk- keys are
        accepted. Required on every endpoint except GET /node-types and a
        webhook-triggered execute that carries X-Webhook-Secret.

````

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