{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendmux-ai/json-schema/sendmux-ai-update-mailbox-draft-schema.json",
  "title": "UpdateMailboxDraft",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openapi-app.json#/components/schemas/UpdateMailboxDraft",
  "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"
    },
    "expected_revision": {
      "description": "The revision that was reviewed; a stale value returns conflict.",
      "exclusiveMinimum": 0,
      "type": "integer"
    },
    "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"
    },
    "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"
    }
  },
  "required": [
    "expected_revision"
  ],
  "type": "object"
}