{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentisend-com/json-schema/agentisend-com-post-emails-body-schema.json",
  "title": "PostEmailsBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentisend-com-emails-api-openapi.yml#/components/schemas/PostEmailsBody",
  "properties": {
    "attachments": {
      "description": "Files to attach. At most 100, and 40 MB of base64 content together.",
      "items": {
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "properties": {
                  "data": {
                    "description": "The file bytes, each from 0 to 255.",
                    "items": {
                      "maximum": 255,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "type": {
                    "const": "Buffer",
                    "description": "Buffer, when the file is a Node buffer sent as JSON.",
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "data"
                ],
                "type": "object"
              },
              {
                "items": {
                  "maximum": 255,
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              }
            ],
            "description": "Base64 text, a byte array, or a Buffer. Provide content or path."
          },
          "contentId": {
            "description": "Same as content_id. content_id wins if both are sent.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "contentType": {
            "description": "Same as content_type. content_type wins if both are sent.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "content_id": {
            "description": "Referenced from HTML as cid: this value, for an inline image.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "content_type": {
            "description": "Media type, such as application/pdf. No parameters.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "filename": {
            "description": "File name shown to the recipient.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "path": {
            "description": "https URL of a hosted file. Fetched when the send is accepted.",
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      },
      "maxItems": 100,
      "type": "array"
    },
    "bcc": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      ],
      "description": "Blind copy recipients."
    },
    "cc": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      ],
      "description": "Copy recipients."
    },
    "expires_at": {
      "description": "When a held send stops waiting for a person. At most 7 days ahead. Ignored when the send is not held.",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "type": "string"
    },
    "from": {
      "description": "Sender. A verified domain, or the onboarding address while a domain is still pending. Optional only when the template has a default sender; a from here overrides it.",
      "minLength": 1,
      "type": "string"
    },
    "headers": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Extra headers. Names that this API sets itself are replaced.",
      "propertyNames": {
        "type": "string"
      },
      "type": "object"
    },
    "html": {
      "description": "HTML body. Provide html, text, or a template.",
      "maxLength": 10485760,
      "type": "string"
    },
    "replyTo": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      ],
      "description": "Same as reply_to. reply_to wins if both are sent."
    },
    "reply_to": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      ],
      "description": "Reply-To addresses. Overrides the template default when a template is sent."
    },
    "scheduledAt": {
      "description": "Resend Node SDK name for scheduled_at.",
      "minLength": 1,
      "type": "string"
    },
    "scheduled_at": {
      "description": "ISO 8601 or a short phrase (\"in 1 hour\", \"tomorrow 9am\"). Max 30 days ahead.",
      "minLength": 1,
      "type": "string"
    },
    "subject": {
      "description": "Required unless template or template_id names a published template that has a subject. Overrides the template subject when both exist.",
      "maxLength": 998,
      "minLength": 1,
      "type": "string"
    },
    "tags": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "propertyNames": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "items": {
            "properties": {
              "name": {
                "description": "Tag name. Letters, digits, _ and -, up to 256 characters.",
                "type": "string"
              },
              "value": {
                "description": "Tag value. Same characters, up to 256 characters.",
                "type": "string"
              }
            },
            "required": [
              "name",
              "value"
            ],
            "type": "object"
          },
          "type": "array"
        }
      ],
      "description": "Tags as an object of name to value, or a list of {name, value}."
    },
    "template": {
      "description": "A published template, instead of html or text.",
      "properties": {
        "id": {
          "description": "Published template id or alias.",
          "maxLength": 200,
          "minLength": 1,
          "type": "string"
        },
        "variables": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "description": "Values for the template placeholders. A string or a number per name.",
          "propertyNames": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "required": [
        "id"
      ],
      "type": "object"
    },
    "template_id": {
      "description": "Id or alias of the published template to render, instead of html or text.",
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "template_values": {
      "additionalProperties": {},
      "description": "Values for the template placeholders.",
      "propertyNames": {
        "type": "string"
      },
      "type": "object"
    },
    "text": {
      "description": "Plain-text body. Provide html, text, or a template.",
      "maxLength": 10485760,
      "type": "string"
    },
    "timezone": {
      "description": "Time zone for a scheduled_at phrase such as \"tomorrow 9am\". An ISO time ignores this. Example: America/Los_Angeles. Omitted phrases are read in UTC.",
      "minLength": 1,
      "type": "string"
    },
    "to": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        }
      ],
      "description": "Recipients. One address or a list."
    },
    "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": "Subscription topic. Recipients who opted out of it are not sent this message.",
      "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": [
    "to"
  ],
  "type": "object"
}