---
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-05-24** (v1) `8a2d5d3e9608` — 1 warning
  - added the new `rate_limited` enum value to the `code` response property for the response status `default`
- **2026-05-19** (v1) `7699c11d9c61` — 1 info
  - added the optional property `dag/resources` to the response with the `200` status
- **2026-04-30** (v1) `50e1d517afc1` — 18 warning, 12 info
  - removed the optional property `dag/handlerOn/abort/outputs` from the response with the `200` status
  - removed the optional property `dag/handlerOn/abort/preconditions/items/eval` from the response with the `200` status
  - removed the optional property `dag/handlerOn/abort/repeatPolicy/condition/eval` from the response with the `200` status
  - removed the optional property `dag/handlerOn/exit/outputs` from the response with the `200` status
  - …26 more

[Change 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/8a2d5d3e9608/schema)
