---
title: "Check a Jabbertoon cartoon, scene, move, pack or character"
method: POST
path: "/api/validate"
---

# Check a Jabbertoon cartoon, scene, move, pack or character

`POST /api/validate`

## Request

- Base URL: `https://jabbertoon.com`
- URL: `https://jabbertoon.com/api/validate`
- Auth: none required

Checks a cartoon, with the studio's own checks, before anyone sees it. Give one of cartoon, program, pack, character or file. Returns errors (it will not play as written: also a character or background the site lacks) and warnings, each {code, where, says, fix, url}, with did_you_mean and an RFC 6902 patch when certain; issues a viewer would see (off stage, overlapping, an empty stage, a line cut off) with a summary of who is where and says what when (seconds; x as a share of the stage); and, when ok, the canonical program and a link. repair: true also returns the program with every certain patch applied. Nothing you send is kept. Example: list_characters' cartoon_example.

## Request body

- object
  - `cartoon` union: A cartoon: its program, a cartoon file {cast, program}, a project file, or its screenplay text (read only on your own computer).
    - object
    - string
  - `program` object: A move (get_move gives ready-made ones) or a scene program.
  - `pack` object: A whole pack: its manifest and its content.
  - `character` object: Your own character, {"name", "content"}, or a character pack.
  - `file` string: On your own computer only: a .json or .txt file's name in the output folder.
  - `repair` boolean: true: also return repaired: the program with every certain patch applied, and the changes.

## Response `200`

What validate answers. ok is false when what you sent has problems; they are listed with where, says and fix.

- object
  - `ok` boolean, required: True when there are no errors.
  - `url` string, required: The page that describes this format.
  - `checked` string: What was checked: program, character, pack or cartoon.
  - `kind` string, nullable: The program's kind (behaviour, scene, cartoon), character, or the pack's type.
  - `errors` Problem[]: The errors, in order: the first 50 at most (error_count says how many there are).
    - `code` string, required
    - `where` string, nullable, required
    - `says` string, required
    - `fix` string, nullable, required
    - `url` string: The code's entry on https://jabbertoon.com/docs/errors/.
    - `did_you_mean` string[]
    - `patch` object[]: RFC 6902 operations on what you sent that make the fix, given only when the fix is certain.
  - `error_count` integer: How many errors the checks found.
  - `warnings` Problem[]: The warnings, in order: the first 50 at most (warning_count says how many there are).
    - `code` string, required
    - `where` string, nullable, required
    - `says` string, required
    - `fix` string, nullable, required
    - `url` string: The code's entry on https://jabbertoon.com/docs/errors/.
    - `did_you_mean` string[]
    - `patch` object[]: RFC 6902 operations on what you sent that make the fix, given only when the fix is certain.
  - `warning_count` integer: How many warnings the checks found.
  - `summary` object, nullable: What the cartoon shows: its length, its cast, and per scene who is where, who says what when and the captions (seconds; x as a share of the stage).
  - `issues` unknown[]: What a viewer would see go wrong, in time order: {code, at_s, who, says, fix, url}.
    - unknown
  - `checks_run` unknown[]: Each check of issues: full, approximate (and why) or not_run (and why).
    - unknown
  - `play_check` object, nullable: On your own computer: the cartoon played as a video would (ok, ran_s, cut, errors). Online: null.
  - `text` string, nullable: The program as screenplay text (on your own computer; null online, and text_reason says why).
  - `text_reason` string
  - `program` object, nullable: The program that was checked, as canonical JSON (a cartoon file's cast and places merged in).
  - `link` string, nullable: When ok: a jabbertoon.com link that opens it (share_link gives the same).
  - `repaired` object: With repair: true: {program, text (when the cartoon was sent as screenplay text, on the local door: the repaired program written as text), changes: [{code, where, from, to}], ok, error_count, warning_count}.
  - `engine` Engine
    - `version` string: The block language's version.
    - `git` string: The git tree id of the engine that answered (the same on every door).
  - `notes` string[]
  - `error` Problem
    - `code` string, required
    - `where` string, nullable, required
    - `says` string, required
    - `fix` string, nullable, required
    - `url` string: The code's entry on https://jabbertoon.com/docs/errors/.
    - `did_you_mean` string[]
    - `patch` object[]: RFC 6902 operations on what you sent that make the fix, given only when the fix is certain.

## Other responses

- `4XX`: A request the server cannot use (400 bad_arguments, 404 not_found, 405, 413 too_large, 415, 503 busy or timeout: try again after Retry-After).
- `5XX`: A request the server cannot use (400 bad_arguments, 404 not_found, 405, 413 too_large, 415, 503 busy or timeout: try again after Retry-After).

---

[API](https://skmtc.dev/jabbertoon/apis/jabbertoon-tools-for-ai-assistants-and-developers.md) · [All operations](https://skmtc.dev/jabbertoon/apis/jabbertoon-tools-for-ai-assistants-and-developers/llms.txt) · [OpenAPI document](https://skmtc.dev/jabbertoon/apis/jabbertoon-tools-for-ai-assistants-and-developers/revisions/004970e97459?raw)
