{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kamai-io/json-schema/kamai-io-markup-create-schema.json",
  "title": "MarkupCreate",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kamai-io-openapi.json#/components/schemas/MarkupCreate",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "cloud",
        "highlight",
        "note"
      ],
      "title": "Kind",
      "description": "cloud: a revision cloud (box or points); highlight: a marker stroke (points); note: a text box (box and text, optionally pointer)."
    },
    "box": {
      "anyOf": [
        {
          "items": {
            "type": "number"
          },
          "type": "array",
          "maxItems": 4,
          "minItems": 4
        },
        {
          "type": "null"
        }
      ],
      "title": "Box",
      "description": "[x0, y0, x1, y1], fractions of the page from the top-left. A cloud wraps it; a note's text sits in it."
    },
    "points": {
      "anyOf": [
        {
          "items": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "type": "array",
          "maxItems": 2000,
          "minItems": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Points",
      "description": "[[x, y], ...], fractions of the page. A highlight's stroke; a cloud may follow an outline instead of a box."
    },
    "pointer": {
      "anyOf": [
        {
          "items": {
            "type": "number"
          },
          "type": "array",
          "maxItems": 2,
          "minItems": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Pointer",
      "description": "A note's arrow tip, [x, y] fractions of the page. The room under it is recorded with the note."
    },
    "text": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Text",
      "description": "A note's text, up to 2,000 characters; required on a note."
    },
    "style": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Style",
      "description": "Optional color (#rrggbb), width in PDF points (0.25..20; a highlight up to 60), opacity (0.05..1), font_size in points (4..72, notes only). Left out: the kind's default."
    },
    "request_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Request Id",
      "description": "Repeat the same value on a retry and the first markup is returned instead of a second one."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "kind"
  ]
}