---
title: "Validate Flow"
method: POST
path: "/bot/preview-import"
tags: ["Bot"]
---

# Validate Flow

`POST /bot/preview-import`

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

## Request body

- PreviewImportInput
  - `kdl` string, nullable — The raw KDL content to preview

## Response `200`

Success

- PreviewImportResponse
  - `valid` boolean
  - `error` string, nullable
  - `nodeCount` integer
  - `nodeTypes` string[], nullable
  - `hasConversationReason` boolean
  - `hasBusinessInformation` boolean
  - `sourceVariableCount` integer
  - `customToolCount` integer
  - `errors` string[], nullable
  - `warnings` string[], nullable

---

[API](https://skmtc.dev/closebot/apis/closebot-api.md) · [All operations](https://skmtc.dev/closebot/apis/closebot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/closebot/closebot-api/revisions/da5f5fb58534/schema)
