---
title: "Validate YANG module with pyang"
method: POST
path: "/api/yang/validate"
---

# Validate YANG module with pyang

`POST /api/yang/validate`

## Request

- Base URL: `https://author-tools.ietf.org`
- URL: `https://author-tools.ietf.org/api/yang/validate`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ietf-tools/apis/ietf-author-tools-api/docs/api/yang/validate/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body `multipart/form-data`

- object
  - `file` string, binary: YANG module file with .yang extension
  - `ietf` boolean: Validate against IETF YANG guidelines (pyang --ietf).
  - `verbose` boolean: Enable verbose pyang output (pyang --verbose).
  - `strict` boolean: Force strict YANG compliance (pyang --strict).

## Response `200`

Returns pyang output

- object
  - `pyang` string: pyang output
  - `errors` string: pyang errors and warnings

## Other responses

- `400`: Error has occurred.
- `401`: Failed to authenticate.

## Changes

- **2026-09-21** `d7abeb2b1f0e`: 3 info
  - added the new optional request property `ietf`
  - added the new optional request property `strict`
  - added the new optional request property `verbose`
- **2026-09-17** `96d6e3220ae2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ietf-tools/apis/ietf-author-tools-api/changes/api/yang/validate/post.md)

---

[API](https://skmtc.dev/ietf-tools/apis/ietf-author-tools-api.md) - [All operations](https://skmtc.dev/ietf-tools/apis/ietf-author-tools-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ietf-tools/apis/ietf-author-tools-api/revisions/d7abeb2b1f0e?raw)
