---
title: "Validate a literal Form Contract v1 payload without persisting it."
method: POST
path: "/api/v1/forms/validate"
tags: ["Forms"]
---

# Validate a literal Form Contract v1 payload without persisting it.

`POST /api/v1/forms/validate`

## Request

- Base URL: `https://commentary.dev`
- URL: `https://commentary.dev/api/v1/forms/validate`
- Auth: HTTP bearer

## Headers

- `X-Commentary-Workspace-Id` string
- `X-Correlation-Id` string

## Request body

- FormContractRequest
  - `contract` FormContract: Normalized Commentary Form Contract v1.
  - `contractSource` string: Literal JSON or YAML form contract source.
  - `sourceFormat` 'json' | 'yaml' | 'auto'
  - `referenceId` string
  - `title` string
  - `description` string
  - `visibility` 'private' | 'shared' | 'public_placeholder'
  - `sourceType` 'commentary' | 'github' | 'embedded' | 'custom'
  - `sourceMetadata` object
  - `destinationConfig` object
  - `agentAlias` string
  - `clientName` string

## Response `200`

Successful response.

- object
  - `ok` unknown
  - `valid` boolean
  - `contract` FormContract: Normalized Commentary Form Contract v1.
  - `diagnostics` object[]

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required.
- `403`: The token or session does not have permission for this resource.
- `404`: The resource was not found.
- `429`: The request was rate limited.

---

[API](https://skmtc.dev/commentary/apis/commentary-public-api.md) · [All operations](https://skmtc.dev/commentary/apis/commentary-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/commentary/apis/commentary-public-api/revisions/7aaafc198c52?raw)
