---
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-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
- **2026-06-18** (v1) `162df20bbef8` — 5 info
  - added the optional property `dag/handlerOn/abort/outputs` to the response with the `200` status
  - added the optional property `dag/handlerOn/exit/outputs` to the response with the `200` status
  - added the optional property `dag/handlerOn/failure/outputs` to the response with the `200` status
  - added the optional property `dag/handlerOn/success/outputs` to the response with the `200` status
  - …1 more
- **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

[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/6a8a215a502c/schema)
