Skip to content

Validate commands

POSThttps://api.vidmoat.com/v1/projects/{id}/validate
Bearer tokenScope projects.readFreeTry it in the playground

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.

Path parameters#

  • idstringrequired
    The project id.

Body#

  • commandsarray of objectsrequired
    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#

Returns 200.

Response fields#

  • projectIdstring
    The project.
  • validboolean
    Every command would succeed.
  • resultsarray
    One entry per command: { op, ok, error?, data? }. A failed command is reported here, not as an HTTP error.
  • blockedarray of strings
    Plan-gated features that would be dropped.
  • lintarray
    Layout warnings: { severity: "warn" | "note", time, message }.
  • suggestedPreviewTimesarray of numbers
    Timestamps worth looking at with the preview endpoint before you render.
  • appliedboolean
    Always false.

Errors#

Besides the errors any request can get (authentication, rate limits):

StatusCodeWhen
404not_foundNo such project, or it is not yours. The two are indistinguishable on purpose.
400invalid_requestThe command list is malformed.