{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/writavo-com/json-schema/writavo-com-article-create-schema.json",
  "title": "ArticleCreate",
  "description": "Every field is optional. The article is created at `status: draft` regardless of what you\nsend. `status`, `published_at` and `scheduled_publish_at` are not accepted: naming any of\nthem is `422 VALIDATION_FAILED`, so a client that assumed it could create published\ncontent fails loudly rather than leaving a post silently offline.\n",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/writavo-com-openapi.json#/components/schemas/ArticleCreate",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "article_kind": {
      "type": "string",
      "enum": [
        "article",
        "page"
      ],
      "description": "`page` makes it a page (About, Contact) rather than a post. Defaults to `article` on create. `news` is set only by a news recipe."
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 300
    },
    "slug": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
      "description": "Derived from `title` when omitted. Supply it if the URL matters."
    },
    "external_id": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^[!-~]+$",
      "description": "Your id for this article in the system it came from. Unique within the Site."
    },
    "content": {
      "type": [
        "string",
        "null"
      ],
      "description": "Markdown. Embed a YouTube, Vimeo or X post with a line of its own, `::embed{url=\"https://...\"}`."
    },
    "excerpt": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1000
    },
    "featured_image_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "featured_image_alt": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 500,
      "description": "Alt text for `featured_image_url`. Blank is stored as null, and your blog then uses the title."
    },
    "seo_title": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200
    },
    "seo_description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 400
    },
    "seo_keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "faqs": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object"
      }
    },
    "key_takeaways": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "howto_steps": {
      "type": [
        "object",
        "array",
        "null"
      ],
      "description": "`{ name?, description?, steps: [{ name, text?, image_url? }] }`, or a bare array of steps. Stored as the object."
    },
    "comparison": {
      "type": [
        "object",
        "null"
      ],
      "description": "`{ title?, headers: [string], rows: [[string]] }`."
    },
    "source": {
      "description": "Private provenance for this article. See `ArticleSourceWrite`.",
      "oneOf": [
        {
          "$ref": "#/$defs/ArticleSourceWrite"
        },
        {
          "type": "null"
        }
      ]
    },
    "category_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The PRIMARY category. Sent alone it files the article under that category too; an\narticle that was in only its old primary category is moved, one in several keeps them.\n"
    },
    "category_ids": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "Every category the article is filed under: a full replacement, not a merge (send `[]` to\nclear). With `category_id` too, the primary is put first if missing; without it the\ncurrent primary stays when listed, otherwise the first becomes primary.\n"
    },
    "author_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "format_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "tag_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "original_published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date this article was originally published in the system you are importing it\nfrom. Must be in the past and on or after 1990-01-01. Used as `published_at` on the\narticle's first publish from any path (dashboard, API, MCP, schedule or pipeline), so\nyou can import as a draft and publish later without the post being dated today. No\neffect on an article that has already been published.\n"
    },
    "original_content_updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the imported article's content last changed at its source. Must be in the past,\nneeds `original_published_at`, and may not be earlier than it. Becomes the article's\n`content_updated_at` (its sitemap `lastmod`) until it is edited in Writavo.\n"
    },
    "canonical_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "maxLength": 2048,
      "description": "The canonical URL override, an absolute http(s) URL. Set it when this article's\nprimary copy lives at another address (a syndicated post). Blank or `null` means the\narticle's own URL. An article whose canonical points anywhere else is left out of\nyour sitemap.\n"
    },
    "noindex": {
      "type": "boolean",
      "description": "`true` asks search engines not to index the page (`robots: noindex`) and leaves it out\nof your sitemap. The page stays reachable, listed on your blog and in your RSS feed.\n"
    },
    "og_title": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200,
      "description": "The social-share title (`og:title`). Null means `seo_title`, then `title`."
    },
    "og_description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 400,
      "description": "The social-share description. Null means `seo_description`, then `excerpt`."
    },
    "og_image_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "maxLength": 2048,
      "description": "The social-share image, an absolute http(s) URL. Null means `featured_image_url`."
    },
    "og_image_alt": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 500,
      "description": "Alt text for `og_image_url`. Null means `featured_image_alt`, then the title."
    },
    "custom_fields": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true,
      "description": "The values of the Site's custom article fields, keyed by field API id, sent WHOLE (what you\nsend replaces what is stored; null clears them). Each value is checked against\n`GET /content-types/article`; a bad one is `422` with `error.fields` naming it\n(`custom_fields.rating`).\n"
    }
  },
  "$defs": {
    "ArticleSourceWrite": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "url"
      ],
      "description": "Record where an article came from (typically on import). Private: never shown on the public\nblog. With `content` (the source page's text) Writavo measures originality itself and\nre-measures whenever the article body changes through the API; without it,\n`originality_pct` is kept as `reported`. The page is matched to a competitor on the Site by\n`competitor` or the URL's host. Send `source: null` to detach.\n",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "maxLength": 2048
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 500
        },
        "competitor": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 253,
          "description": "The competitor's domain."
        },
        "content": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 80000,
          "description": "The source page's text."
        },
        "originality_pct": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 100,
          "description": "A figure from the old system, kept as reported."
        },
        "target_keywords": {
          "type": "array",
          "maxItems": 50,
          "items": {
            "type": "string",
            "maxLength": 200
          }
        },
        "metrics": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "seo_score": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0
            },
            "organic_traffic": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0
            },
            "backlinks": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0
            },
            "referring_domains": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0
            },
            "ranking_keywords": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0
            },
            "top10_keywords": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0
            }
          }
        }
      }
    }
  }
}