{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/transmitly-io/json-schema/transmitly-io-broadcast-input-schema.json",
  "title": "BroadcastInput",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/transmitly-io-openapi.json#/components/schemas/BroadcastInput",
  "type": "object",
  "required": [
    "name",
    "from"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "audience_id": {
      "type": "string",
      "description": "Omit to target all contacts"
    },
    "template_id": {
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "from_name": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "html": {
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "track_opens": {
      "type": "boolean"
    },
    "track_clicks": {
      "type": "boolean"
    },
    "variant_b_subject": {
      "type": "string",
      "description": "Optional B variant subject; empty falls back to A"
    },
    "variant_b_html": {
      "type": "string"
    },
    "variant_b_text": {
      "type": "string"
    },
    "variant_split_percent": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99,
      "default": 50
    },
    "winner_enabled": {
      "type": "boolean",
      "description": "Requires a B variant and matching tracking"
    },
    "winner_metric": {
      "type": "string",
      "enum": [
        "open",
        "click"
      ],
      "default": "open"
    },
    "winner_wait_minutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440,
      "default": 240
    },
    "winner_test_percent": {
      "type": "integer",
      "minimum": 5,
      "maximum": 50,
      "default": 20
    },
    "segment_id": {
      "type": "string",
      "description": "Target a saved segment; overrides audience_id"
    },
    "topic": {
      "type": "string",
      "description": "Optional preference topic; contacts opted out of it are excluded"
    },
    "variant_c_subject": {
      "type": "string"
    },
    "variant_c_html": {
      "type": "string"
    },
    "variant_c_text": {
      "type": "string"
    },
    "variant_c_split_percent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 99
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    }
  }
}