{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/groundmail-dev/json-schema/groundmail-dev-update-template-request-schema.json",
  "title": "UpdateTemplateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/groundmail-dev-templates-api-openapi.yml#/components/schemas/UpdateTemplateRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "format": {
      "type": "string",
      "enum": [
        "html",
        "blocks"
      ]
    },
    "preheader": {
      "type": [
        "string",
        "null"
      ]
    },
    "html": {
      "type": [
        "string",
        "null"
      ]
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "design": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "alias": {
      "type": [
        "string",
        "null"
      ]
    },
    "variables": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "unsubscribe_enabled": {
      "type": "boolean"
    },
    "category": {
      "type": "string",
      "enum": [
        "transactional",
        "product"
      ],
      "description": "`newsletter` is rejected with a `validation_error`: templates are for transactional and product email. Approved accounts send newsletters with `category: newsletter` on `POST /emails`."
    },
    "folder": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 64,
      "description": "Move it to this folder, matched by name (any case) and created when it does not exist. `null` or an empty string takes it out of any folder."
    }
  }
}