{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animam-ai/json-schema/animam-ai-create-corpus-body-schema.json",
  "title": "CreateCorpusBody",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animam-ai-openapi.json#/components/schemas/CreateCorpusBody",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "description": "Full body of the entry."
    },
    "summary": {
      "type": "string",
      "maxLength": 500,
      "description": "Short summary surfaced in prompt; full content fetched on-demand via EXPLORE_CORPUS."
    },
    "segmentSlug": {
      "type": "string"
    },
    "priority": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "isActive": {
      "type": "boolean"
    },
    "externalId": {
      "type": "string",
      "maxLength": 255,
      "description": "Idempotency key from caller (e.g. wp-post-42). Upserts on conflict."
    },
    "source": {
      "type": "string",
      "maxLength": 50
    },
    "sourceUrl": {
      "type": "string",
      "maxLength": 500,
      "format": "uri"
    },
    "locale": {
      "type": "string",
      "maxLength": 10,
      "pattern": "^[a-z]{2}(-[a-zA-Z]{2})?$/i",
      "description": "2-letter ISO language code of the entry (en, fr, es, …). Used to scope retrieval per visitor locale on multilingual sites."
    }
  },
  "required": [
    "title",
    "content"
  ]
}