{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/conduyt-com/json-schema/conduyt-com-email-template-update-schema.json",
  "title": "EmailTemplateUpdate",
  "description": "Partial update: send only the fields to change. html requires bodyMode \"html\"; bodyMode \"html\" requires html;\nbodyMode \"blocks\" requires bodyHtml. Builder markers the request leaves out are kept from the stored template.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/conduyt-com-email-templates-api-openapi.yml#/components/schemas/EmailTemplateUpdate",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "bodyHtml": {
      "type": "string"
    },
    "bodyMode": {
      "type": "string",
      "enum": [
        "blocks",
        "html"
      ]
    },
    "html": {
      "type": "string",
      "maxLength": 102400
    },
    "category": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "isActive": {
      "type": "boolean"
    }
  },
  "dependentRequired": {
    "html": [
      "bodyMode"
    ]
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "bodyMode": {
            "const": "html"
          }
        },
        "required": [
          "bodyMode"
        ]
      },
      "then": {
        "required": [
          "html"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "bodyMode": {
            "const": "blocks"
          }
        },
        "required": [
          "bodyMode"
        ]
      },
      "then": {
        "required": [
          "bodyHtml"
        ],
        "not": {
          "required": [
            "html"
          ]
        }
      }
    }
  ]
}