{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sightkick-so/json-schema/sightkick-so-update-page-edit-schema.json",
  "title": "update_page.edit",
  "description": "Change a page: contentHtml replaces the whole body, or edits change parts of it, each find an exact passage of the body as get_pages page includeContent returns it, appearing once (none is made if one misses). A live page, at any age, needs baseHash (get_pages page) and goes to the site with publish_page republish. Say why in reason: it becomes the note on the page's new version, whose result is read from the day it goes out (get_pages versions). Wait about 4 weeks between changes to the same page for a clean result. Its Updated date moves only when its words change: links, formatting and pictures keep it, and so does a correction marked minor. primaryKeyword re-aims the page at another keyword at any stage, live too, keeping its id and record; change the title and body to match in the same edit. The slug and destination only before it's live, the type and brief only before it's written. Permission: write.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sightkick-so-openapi.json#/components/schemas/update_page.edit",
  "type": "object",
  "properties": {
    "action": {
      "const": "edit"
    },
    "articleId": {
      "type": "string",
      "description": "A page's id (get_pages)"
    },
    "contentHtml": {
      "type": "string"
    },
    "edits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "find": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "replace": {
            "type": "string",
            "maxLength": 60000
          }
        },
        "required": [
          "find",
          "replace"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 50,
      "description": "Instead of contentHtml: exact passages of the body and what replaces each, applied in order"
    },
    "primaryKeyword": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "description": "The keyword the page targets. It joins the page's keywords and its volume is looked up. Another page's main keyword is refused"
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "metaTitle": {
      "type": "string",
      "maxLength": 200
    },
    "metaDescription": {
      "type": "string",
      "maxLength": 400
    },
    "excerpt": {
      "type": "string",
      "maxLength": 1000
    },
    "slug": {
      "type": "string",
      "maxLength": 200
    },
    "articleType": {
      "type": "string",
      "enum": [
        "guide",
        "how_to",
        "listicle",
        "comparison",
        "alternatives",
        "statistics"
      ]
    },
    "question": {
      "type": "string",
      "maxLength": 400
    },
    "questions": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 400
      },
      "maxItems": 20
    },
    "notes": {
      "type": "string",
      "maxLength": 4000
    },
    "baseHash": {
      "type": "string",
      "maxLength": 100
    },
    "reason": {
      "type": "string",
      "maxLength": 300,
      "description": "Why a live page changes: its new version's note"
    },
    "minor": {
      "type": "boolean",
      "description": "A small correction (25 words or fewer changed): the page's Updated date stays"
    },
    "sightkickWrites": {
      "type": "boolean",
      "description": "Sightkick writes it (on) or you do (off), while it isn't written"
    },
    "destination": {
      "type": "string",
      "maxLength": 70,
      "description": "A blog-style page's folder before it's live: blog or one of the owner's own"
    }
  },
  "required": [
    "action",
    "articleId"
  ],
  "additionalProperties": false,
  "x-permission": "write"
}