{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/modoboa/json-schema/modoboa-save-email-schema.json",
  "title": "SaveEmail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/modoboa-webmail-api-openapi.yml#/components/schemas/SaveEmail",
  "type": "object",
  "properties": {
    "sender": {
      "type": "string",
      "format": "email"
    },
    "subject": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "to": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      }
    },
    "cc": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      }
    },
    "bcc": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      }
    },
    "in_reply_to": {
      "type": "string"
    },
    "references": {
      "type": "string"
    },
    "body_format": {
      "$ref": "#/$defs/BodyFormatEnum"
    },
    "mailid": {
      "type": "integer"
    }
  },
  "required": [
    "sender"
  ],
  "$defs": {
    "BodyFormatEnum": {
      "enum": [
        "plain",
        "html"
      ],
      "type": "string",
      "description": "* `plain` - text\n* `html` - html"
    }
  }
}