---
title: "Validate a DAG specification"
method: POST
path: "/dags/validate"
tags: ["dags"]
---

# Validate a DAG specification

`POST /dags/validate`

Validates a DAG YAML specification without persisting any changes.

Returns a list of validation errors. When the spec can be partially parsed,
the response may also include parsed DAG details built with error-tolerant loading.

## Query parameters

- `remoteNode` string

## Request body

- object
  - `spec` string, required — DAG specification in YAML format
  - `name` string — Optional name to use when the spec omits a name

## Response `200`

Validation result

- object
  - `valid` boolean, required — True if the spec is valid (no errors)
  - `dag` DAGDetails — unresolved $ref
  - `errors` string[], required — List of validation errors

## Other responses

- `default` — Generic error response

## Changes

- **2026-08-21** (v1) `4a98622e8b7e` — 5 info
  - added the optional property `dag/handlerOn/abort/dependencies` to the response with the `200` status
  - added the optional property `dag/handlerOn/exit/dependencies` to the response with the `200` status
  - added the optional property `dag/handlerOn/failure/dependencies` to the response with the `200` status
  - added the optional property `dag/handlerOn/success/dependencies` to the response with the `200` status
  - …1 more
- **2026-08-15** (v1) `5a657bb07744` — 1 warning, 1 info
  - added the new `agent` enum value to the `dag/type` response property for the response status `200`
  - removed the `controller` enum value from the `dag/type` response property for the response status `200`
- **2026-08-08** (v1) `baa17af029e5` — 1 warning, 1 info
  - added the new `build` enum value to the `dag/type` response property for the response status `200`
  - removed the `incremental` enum value from the `dag/type` response property for the response status `200`
- …earlier changes not shown

[Full history](https://skmtc.dev/dagucloud/apis/dagu/changes/dags/validate/post.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) · [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/5dc2b1ef8770/schema)
