> ## Documentation Index
> Fetch the complete documentation index at: https://docs.screenjson.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate a ScreenJSON document

> POST a ScreenJSON document (JSON). Returns `{ valid: true }` on success, or `{ valid: false, errors: [{ path, message }] }` on failure.

Max request body: **10 MB**.



## OpenAPI

````yaml /api-reference/cli/openapi.json post /validate
openapi: 3.1.0
info:
  title: screenjson-cli REST API
  description: >-
    REST API exposed by `screenjson serve`. Wraps the same conversion, export,
    validation, and schema engine as the CLI.


    Start locally with `screenjson serve --host 0.0.0.0 --port 8080`.
  version: 1.0.0
  contact:
    name: ScreenJSON
    url: https://screenjson.com
servers:
  - url: http://localhost:8080
    description: Local development
  - url: https://api.try.screenjson.com
    description: Public demo API
security: []
paths:
  /validate:
    post:
      tags:
        - Conversion
      summary: Validate a ScreenJSON document
      description: >-
        POST a ScreenJSON document (JSON). Returns `{ valid: true }` on success,
        or `{ valid: false, errors: [{ path, message }] }` on failure.


        Max request body: **10 MB**.
      operationId: validate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: ScreenJSON document to validate.
      responses:
        '200':
          description: Validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationResult'
              examples:
                valid:
                  value:
                    valid: true
                invalid:
                  value:
                    valid: false
                    errors:
                      - path: /document/scenes/0/heading
                        message: 'missing required property: setting'
        '400':
          description: Missing body or validator error
components:
  schemas:
    ValidationResult:
      type: object
      properties:
        valid:
          type: boolean
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
                description: JSON Pointer to the offending node.
              message:
                type: string
      required:
        - valid

````