{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentisend-com/json-schema/agentisend-com-post-broadcasts-body-schema.json",
  "title": "PostBroadcastsBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentisend-com-broadcasts-api-openapi.yml#/components/schemas/PostBroadcastsBody",
  "properties": {
    "content": {
      "anyOf": [
        {
          "properties": {
            "blocks": {
              "description": "Blocks, in order. At least one.",
              "items": {
                "anyOf": [
                  {
                    "properties": {
                      "body": {
                        "description": "The block text. Placeholders use {{name}}.",
                        "maxLength": 524288,
                        "type": "string"
                      },
                      "kind": {
                        "const": "text",
                        "description": "A text block.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "body"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "html": {
                        "description": "HTML for this block.",
                        "maxLength": 524288,
                        "type": "string"
                      },
                      "kind": {
                        "const": "raw",
                        "description": "HTML inserted as written.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "html"
                    ],
                    "type": "object"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            "mode": {
              "const": "block",
              "description": "block, markdown or html.",
              "type": "string"
            }
          },
          "required": [
            "mode",
            "blocks"
          ],
          "type": "object"
        },
        {
          "properties": {
            "mode": {
              "description": "markdown or html.",
              "enum": [
                "markdown",
                "html"
              ],
              "type": "string"
            },
            "source": {
              "description": "The template source. At most 512 KB when writing.",
              "maxLength": 524288,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "mode",
            "source"
          ],
          "type": "object"
        }
      ],
      "description": "Same as html, sent as {mode: \"html\", source}."
    },
    "from_address": {
      "description": "Same as from.",
      "maxLength": 320,
      "minLength": 3,
      "type": "string"
    },
    "name": {
      "description": "A name for your own reference. Omit it to use the subject.",
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "previewText": {
      "description": "Resend Node SDK name for preview_text.",
      "maxLength": 500,
      "type": "string"
    },
    "preview_text": {
      "description": "The line an inbox shows after the subject. Hidden at the top of the HTML; not shown in the body.",
      "maxLength": 500,
      "type": "string"
    },
    "replyTo": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      ],
      "description": "Resend Node SDK name for reply_to."
    },
    "reply_to": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      ],
      "description": "Reply-To on every message. One address or a list, checked like POST /emails."
    },
    "scheduled_at": {
      "description": "When to send. With send: true, an ISO 8601 time or a phrase such as \"in 1 hour\". Without send, an ISO 8601 time: the broadcast is saved as scheduled.",
      "minLength": 1,
      "type": "string"
    },
    "segment_id": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "type": "string"
    },
    "send": {
      "description": "Send the broadcast as soon as it is created. With scheduled_at it is scheduled instead. Defaults to false: the broadcast stays a draft.",
      "type": "boolean"
    },
    "subject": {
      "maxLength": 998,
      "minLength": 1,
      "type": "string"
    },
    "template_id": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "type": "string"
    },
    "text": {
      "description": "The plain-text body, sent as the plain part of every message. Placeholders work as in html. Omit it to have one derived from the body; an empty string sends no plain-text part.",
      "maxLength": 1000000,
      "type": "string"
    },
    "topicId": {
      "description": "Resend Node SDK name for topic_id.",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "type": "string"
    },
    "topic_id": {
      "description": "A topic on this account. Contacts who unsubscribed from it are skipped, and each message carries a one-click unsubscribe for this topic.",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "type": "string"
    }
  },
  "required": [
    "from_address",
    "segment_id"
  ],
  "type": "object"
}