{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendar-app/json-schema/sendar-app-batch-email-item-schema.json",
  "title": "BatchEmailItem",
  "description": "Supply subject and nonempty html and/or text, OR templateId with variables. Template mode forbids inline subject/html/text. Variables require templateId. Sender must belong to an authorized verified domain.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendar-app-openapi.json#/components/schemas/BatchEmailItem",
  "type": "object",
  "required": [
    "from",
    "to"
  ],
  "properties": {
    "from": {
      "type": "string",
      "minLength": 1
    },
    "to": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      },
      "maxItems": 50
    },
    "subject": {
      "type": "string",
      "minLength": 1,
      "description": "Required unless templateId is set."
    },
    "html": {
      "type": [
        "string",
        "null"
      ]
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "templateId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Send this item using a saved template. When set, subject, html, and text must be omitted."
    },
    "variables": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      },
      "description": "Values for the template's placeholders. Checked strictly. Only valid together with templateId."
    },
    "trackOpens": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Record opens for this item. Omit to use the account default."
    },
    "trackClicks": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Record link clicks for this item. Omit to use the account default."
    }
  }
}