{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/templated-email/json-schema/templated-email-template-schema.json",
  "title": "Template",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/templated-email-openapi.yaml#/components/schemas/Template",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "exported"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "blank",
        "ai",
        "import",
        "library"
      ]
    },
    "htmlContent": {
      "type": [
        "string",
        "null"
      ]
    },
    "craftState": {
      "type": [
        "string",
        "null"
      ],
      "description": "JSON string of the block-based document. See the Template Document Reference\n(https://developer.templated.email/docs/guides/template-document) for the full block model.\n"
    },
    "editorMode": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "visual",
        "html"
      ]
    },
    "templateSettings": {
      "type": [
        "string",
        "null"
      ],
      "description": "JSON string of template-level settings"
    },
    "thumbnailUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}