---
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-07-26** (v1) `f6dcf7250db7` — 2 info
  - added the optional property `dag/tasks` to the response with the `200` status
  - added the optional property `dag/type` to the response with the `200` status
- **2026-07-23** (v1) `75b8e91aaf57` — 3 warning, 5 info
  - added the new `conflict` enum value to the `code` response property for the response status `default`
  - added the new `human_task_resume_failed` enum value to the `code` response property for the response status `default`
  - added the new `payload_too_large` enum value to the `code` response property for the response status `default`
  - added the optional property `dag/handlerOn/abort/humanTask` to the response with the `200` status
  - …4 more
- **2026-07-09** (v1) `9d0cf8f4b61c` — 11 breaking, 11 info
  - the response property `dag/handlerOn/abort/preconditions/items/condition` became optional for the status `200`
  - the response property `dag/handlerOn/abort/repeatPolicy/condition/condition` became optional for the status `200`
  - the response property `dag/handlerOn/exit/preconditions/items/condition` became optional for the status `200`
  - the response property `dag/handlerOn/exit/repeatPolicy/condition/condition` became optional for the status `200`
  - …18 more
- **2026-07-05** (v1) `d7353977efc3` — 1 info
  - added the optional property `dag/schedule/items/profile` to the response with the `200` status
- …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/f6dcf7250db7/schema)
