{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendmux-ai/json-schema/sendmux-ai-create-mailbox-draft-schema.json",
  "title": "CreateMailboxDraft",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openapi-app.json#/components/schemas/CreateMailboxDraft",
  "additionalProperties": false,
  "properties": {
    "attachments": {
      "description": "Attachments and inline images.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "blob_id": {
            "description": "An attachment uploaded to this mailbox.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "content_id": {
            "description": "Content ID referenced by an inline image.",
            "maxLength": 998,
            "minLength": 1,
            "type": "string"
          },
          "content_type": {
            "description": "Attachment media type.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "disposition": {
            "description": "Whether the attachment appears within the message.",
            "enum": [
              "attachment",
              "inline"
            ],
            "type": "string"
          },
          "filename": {
            "description": "Attachment filename.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "size_bytes": {
            "description": "Attachment size in bytes; verified when saved.",
            "maximum": 7500000,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "blob_id",
          "filename",
          "content_type",
          "size_bytes"
        ],
        "type": "object"
      },
      "maxItems": 10,
      "type": "array"
    },
    "bcc": {
      "description": "Hidden copied recipients.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address.",
            "format": "email",
            "maxLength": 254,
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "maxItems": 50,
      "type": "array"
    },
    "cc": {
      "description": "Visible copied recipients.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address.",
            "format": "email",
            "maxLength": 254,
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "maxItems": 50,
      "type": "array"
    },
    "custom_headers": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom X-* headers. Writes reject X-SES-TENANT, X-SES-CONFIGURATION-SET and X-SES-MESSAGE-TAGS case-insensitively. On updates, omit this field to preserve saved headers, or pass {} to clear them.",
      "type": "object"
    },
    "from": {
      "additionalProperties": false,
      "description": "Authorised sender; defaults to this inbox.",
      "properties": {
        "email": {
          "description": "Email address.",
          "format": "email",
          "maxLength": 254,
          "type": "string"
        },
        "name": {
          "description": "Display name.",
          "maxLength": 255,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "email"
      ],
      "type": "object"
    },
    "html_body": {
      "description": "HTML body, preserved when saved.",
      "maxLength": 1000000,
      "type": "string"
    },
    "reply_to": {
      "description": "Authorised reply addresses; defaults to this inbox.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address.",
            "format": "email",
            "maxLength": 254,
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "maxItems": 20,
      "type": "array"
    },
    "reply_to_message_id": {
      "description": "Message in this inbox to reply to; thread headers are snapshotted.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "source": {
      "additionalProperties": false,
      "description": "Source for this draft. Adoption requires Idempotency-Key. Explicit content fields override prepared defaults.",
      "properties": {
        "action": {
          "description": "Prepare a reply, reply-all, forward or adopt an existing draft. Source content and attachments are saved with the draft.",
          "enum": [
            "reply",
            "reply_all",
            "forward",
            "adopt"
          ],
          "type": "string"
        },
        "message_id": {
          "description": "Source message in this inbox.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "message_id",
        "action"
      ],
      "type": "object"
    },
    "subject": {
      "description": "Subject; may be empty.",
      "maxLength": 998,
      "type": "string"
    },
    "text_body": {
      "description": "Plain-text body.",
      "maxLength": 1000000,
      "type": "string"
    },
    "to": {
      "description": "Primary recipients; at most 50 total across To, Cc and Bcc.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "description": "Email address.",
            "format": "email",
            "maxLength": 254,
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "maxItems": 50,
      "type": "array"
    }
  },
  "type": "object"
}