{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/forward-email/main/json-schema/forward-email-alias-input-schema.json",
  "title": "AliasInput",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/forward-email-openapi.json#/components/schemas/AliasInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Alias name (if not provided or if blank, then a random alias is generated)"
    },
    "recipients": {
      "oneOf": [
        {
          "type": "string",
          "description": "Line-break/space/comma separated string of valid email addresses, FQDNs, IPs, or webhook URLs"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "format": "email"
          },
          "description": "Array of valid recipients"
        }
      ],
      "description": "List of recipients. If not provided or empty, defaults to the requester's email"
    },
    "description": {
      "type": "string",
      "description": "Alias description"
    },
    "labels": {
      "oneOf": [
        {
          "type": "string",
          "description": "Line-break/space/comma separated string of labels"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of labels"
        }
      ]
    },
    "has_recipient_verification": {
      "type": "boolean",
      "description": "Require recipients to click verification link (defaults to domain setting)"
    },
    "is_enabled": {
      "type": "boolean",
      "description": "Whether to enable or disable this alias"
    },
    "error_code_if_disabled": {
      "type": "number",
      "enum": [
        250,
        421,
        550
      ],
      "description": "Error code if alias is disabled. Defaults to 250"
    },
    "has_imap": {
      "type": "boolean",
      "description": "Enable or disable IMAP storage for this alias"
    },
    "has_pgp": {
      "type": "boolean",
      "description": "Enable or disable OpenPGP encryption for this alias"
    },
    "public_key": {
      "type": "string",
      "description": "OpenPGP public key in ASCII Armor format"
    },
    "has_smime": {
      "type": "boolean",
      "description": "Enable or disable S/MIME encryption for this alias"
    },
    "smime_certificate": {
      "type": "string",
      "description": "S/MIME X.509 certificate in PEM format"
    },
    "has_wkd_disabled": {
      "type": "boolean",
      "description": "Whether WKD (Web Key Directory) public key lookup is disabled for this alias"
    },
    "max_quota": {
      "type": "string",
      "description": "Storage max quota (e.g. '1 GB')"
    },
    "vacation_responder_is_enabled": {
      "type": "boolean",
      "description": "Enable or disable vacation responder"
    },
    "vacation_responder_start_date": {
      "type": "string",
      "description": "Start date (e.g. 'YYYY-MM-DD') for vacation responder"
    },
    "vacation_responder_end_date": {
      "type": "string",
      "description": "End date (e.g. 'YYYY-MM-DD') for vacation responder"
    },
    "vacation_responder_subject": {
      "type": "string",
      "description": "Plaintext subject for vacation responder"
    },
    "vacation_responder_message": {
      "type": "string",
      "description": "Plaintext message for vacation responder"
    },
    "retention": {
      "type": "integer",
      "minimum": 0,
      "maximum": 365,
      "description": "Retention period in days (0-365) for Trash and Junk mailbox cleanup. Set to 0 to use automatic storage-based scaling."
    },
    "smtp_limit": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Per-alias daily SMTP outbound message limit. Set to 0 to use the domain-level limit."
    }
  }
}