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

# Validate Workflow API

> Check the saved draft against every graph and node rule without mutating anything. Errors block publish; warnings do not.

<Note>
  Validation reads the stored draft, so save your definition with the [Save Draft API](/docs/api-reference/workflows/save-draft) first. Common error codes include `unbounded_cycle` (a loop not closed through a `retry` node), `dangling_target` (a case routes to a missing node id), `unknown_agent` and `empty_cases` on the start node.
</Note>


## OpenAPI

````yaml POST /workflows/{workflow_id}/validate
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
paths:
  /workflows/{workflow_id}/validate:
    post:
      description: >-
        Validates the saved draft without mutating anything. Issues with
        `severity` `error` block publish; warnings do not.
      parameters:
        - in: path
          name: workflow_id
          required: true
          schema:
            type: string
            format: uuid
          description: The unique `id` of the workflow
      requestBody:
        description: Empty JSON object.
        content:
          application/json:
            schema:
              type: object
        required: true
      responses:
        '200':
          description: Validation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  issues:
                    type: array
                    items:
                      $ref: '#/components/schemas/WorkflowValidationIssue'
                required:
                  - issues
        '404':
          description: Workflow not found, or it has no draft
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowError'
components:
  schemas:
    WorkflowValidationIssue:
      type: object
      required:
        - severity
        - code
        - message
      properties:
        severity:
          type: string
          enum:
            - error
            - warning
          description: '`error` blocks publish; `warning` does not.'
        code:
          type: string
          description: >-
            Stable issue code, e.g. `unbounded_cycle`, `dangling_target`,
            `unknown_agent`, `empty_cases`.
          example: unbounded_cycle
        node_id:
          type: string
          nullable: true
          description: The node the issue points at, when it is node-specific.
        path:
          type: string
          description: Config path within the node, when the issue is field-specific.
        message:
          type: string
          description: Human-readable explanation.
    WorkflowError:
      type: object
      description: >-
        Error envelope returned by every workflow endpoint. `detail.code` is a
        stable machine-readable code; extra keys (such as `current_revision` on
        `revision_conflict`, `execution_id` on `duplicate_run`, or `issues` on
        `invalid_definition`) ride alongside it.
      required:
        - detail
      properties:
        detail:
          type: object
          additionalProperties: true
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: revision_conflict
            message:
              type: string
              description: Human-readable explanation.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````