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

# Validate Flow

> Preview and validate a KDL import without creating a bot.
Performs structural, referential, and graph integrity checks.



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json post /bot/preview-import
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /bot/preview-import:
    post:
      tags:
        - Bot
      summary: Validate Flow
      description: "Preview and validate a KDL import without creating a bot.\r\nPerforms structural, referential, and graph integrity checks."
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewImportInput'
          text/json:
            schema:
              $ref: '#/components/schemas/PreviewImportInput'
          application/*+json:
            schema:
              $ref: '#/components/schemas/PreviewImportInput'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PreviewImportResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewImportResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PreviewImportResponse'
components:
  schemas:
    PreviewImportInput:
      type: object
      properties:
        kdl:
          type: string
          description: The raw KDL content to preview
          nullable: true
      additionalProperties: false
    PreviewImportResponse:
      type: object
      properties:
        valid:
          type: boolean
        error:
          type: string
          nullable: true
        nodeCount:
          type: integer
          format: int32
        nodeTypes:
          type: array
          items:
            type: string
          nullable: true
        hasConversationReason:
          type: boolean
        hasBusinessInformation:
          type: boolean
        sourceVariableCount:
          type: integer
          format: int32
        customToolCount:
          type: integer
          format: int32
        errors:
          type: array
          items:
            type: string
          nullable: true
        warnings:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````