---
title: "Validate commands"
method: POST
path: "/projects/{id}/validate"
tags: ["Projects"]
---

# Validate commands

`POST /projects/{id}/validate`

## Request

- Base URL: `https://api.vidmoat.com/v1`
- URL: `https://api.vidmoat.com/v1/projects/{id}/validate`
- Auth: HTTP bearer

Dry-run a command batch against the current document and get back per-command results and layout lint, without saving anything. Needs only a read scope.

Read the lint. Numeric x/y/fontSize choices routinely overlap on the real canvas, and this is cheaper than a render to find out.

## Path parameters

- `id` string, required

## Request body

- object
  - `commands` object[], required: One to 200 commands, applied in order. Each is an object with a string `op` and that op's parameters, exactly as listed by `GET /v1/schema/commands`.

## Response `200`

Validate commands

- object
  - `projectId` string: The project.
  - `valid` boolean: Every command would succeed.
  - `results` unknown[]: One entry per command: `{ op, ok, error?, data? }`. A failed command is reported here, not as an HTTP error.
    - unknown
  - `blocked` string[]: Plan-gated features that would be dropped.
  - `lint` unknown[]: Layout warnings: `{ severity: "warn" | "note", time, message }`.
    - unknown
  - `suggestedPreviewTimes` number[]: Timestamps worth looking at with the preview endpoint before you render.
  - `applied` boolean: Always `false`.

## Other responses

- `400`: `invalid_request`: The command list is malformed.
- `404`: `not_found`: No such project, or it is not yours. The two are indistinguishable on purpose.

---

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