---
title: "POST /v1/code/validate"
method: POST
path: "/v1/code/validate"
tags: ["code"]
---

# POST /v1/code/validate

`POST /v1/code/validate`

## Request

- Base URL: `https://help.steep.app` (the document declares no server; this is the origin it was published from)
- URL: `https://help.steep.app/v1/code/validate`
- Auth: none declared

Check a set of Steep YAML files before syncing them, e.g. in CI: returns whether they are `valid` and every problem, each pointing at its file. Only the files are checked: nothing is read from your workspace or warehouse, so metric operands, categories, owners, tables and columns are not checked. No API key needed. Send all Steep YAML files, not only the changed ones. Nothing is written; to see what a sync would change, use `dryRun` on `POST /v1/code/syncs`. The request may be up to 10 MB.

## Request body

- object
  - `files` object[], required: Every Steep YAML file, not only the changed ones, since identifiers must be unique across them. Each `path` is relative to the repository root, uses forward slashes, ends in `.yml` or `.yaml`, and appears once.
    - `path` string, required
    - `content` string, required

## Response `200`

Response for status 200

- object
  - `valid` boolean, required: `false` when any problem is `fatal` or an `error`. Warnings alone keep it `true`.
  - `problems` object[], required
    - `severity` 'fatal' | 'error' | 'warning', required: `fatal`: the files can't be synced at all. `error`: a definition, or part of one, would be left out. `warning`: nothing would change.
    - `code` string, required: Stable kind of problem, e.g. `yaml-invalid` or `metric-identifier-duplicated`, for acting on problems without parsing `message`.
    - `kind` string, required: The kind of definition the problem is about, e.g. `metrics` or `modules`; `files` for a file that can't be read.
    - `subject` string, required: The `identifier` or key of the definition the problem is about; the file's `path` when `kind` is `files`.
    - `message` string, required
    - `location` object: Where the problem was found. `line` and `column` are set only when known.
      - `path` string, required: The file, as sent.
      - `line` integer: 1-based.
      - `column` integer: 1-based.

## Other responses

- `401`: Response for status 401
- `403`: Response for status 403
- `422`: Response for status 422
- `429`: Response for status 429
- `500`: Response for status 500

---

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