{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/forward-email/main/json-schema/forward-email-domain-schema.json",
  "title": "Domain",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/forward-email-openapi.json#/components/schemas/Domain",
  "type": "object",
  "properties": {
    "domain_updates": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "has_pending_domain_updates": {
      "type": "boolean"
    },
    "has_newsletter": {
      "type": "boolean"
    },
    "ignore_mx_check": {
      "type": "boolean"
    },
    "allow_subdomain_forwarding": {
      "description": "Allow wildcard subdomain forwarding. When enabled on a paid plan (Enhanced Protection or Team), any subdomain that has no DNS records of its own inherits the forwarding configuration published at this domain’s root (apex). Verified ownership is required: the apex must publish a forward-email-site-verification record matching this domain. This setting does not apply to the free plan.",
      "type": "boolean"
    },
    "has_delivery_logs": {
      "type": "boolean"
    },
    "retention_days": {
      "type": "integer"
    },
    "has_regex": {
      "type": "boolean"
    },
    "has_catchall": {
      "type": "boolean"
    },
    "allowlist": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "denylist": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "restricted_alias_names": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "has_adult_content_protection": {
      "type": "boolean"
    },
    "has_phishing_protection": {
      "type": "boolean"
    },
    "has_executable_protection": {
      "type": "boolean"
    },
    "has_virus_protection": {
      "type": "boolean"
    },
    "is_catchall_regex_disabled": {
      "type": "boolean"
    },
    "has_smtp": {
      "type": "boolean"
    },
    "is_smtp_suspended": {
      "type": "boolean"
    },
    "plan": {
      "type": "string"
    },
    "max_recipients_per_alias": {
      "type": "integer"
    },
    "alias_default_smtp_limit": {
      "type": "integer",
      "description": "Default daily SMTP sending limit applied to newly created aliases on this domain. Set to 0 to disable (aliases will use the domain-wide limit). Cannot exceed the domain's effective SMTP limit.",
      "minimum": 0,
      "default": 0
    },
    "smtp_port": {
      "type": "string"
    },
    "members": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "invites": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "name": {
      "type": "string"
    },
    "has_mx_record": {
      "type": "boolean"
    },
    "has_txt_record": {
      "type": "boolean"
    },
    "has_dkim_record": {
      "type": "boolean"
    },
    "has_return_path_record": {
      "type": "boolean"
    },
    "has_dmarc_record": {
      "type": "boolean"
    },
    "has_strict_dmarc": {
      "type": "boolean"
    },
    "has_spf_record": {
      "type": "boolean"
    },
    "has_autoconfig_record": {
      "type": "boolean"
    },
    "has_autodiscover_record": {
      "type": "boolean"
    },
    "has_recipient_verification": {
      "type": "boolean"
    },
    "has_custom_verification": {
      "type": "boolean"
    },
    "has_custom_s3": {
      "type": "boolean",
      "description": "Whether this domain uses custom S3-compatible storage for backups"
    },
    "s3_endpoint": {
      "type": "string",
      "description": "Custom S3-compatible endpoint URL (e.g. https://s3.us-east-1.amazonaws.com, https://<accountid>.r2.cloudflarestorage.com)"
    },
    "s3_region": {
      "type": "string",
      "description": "S3 region (e.g. us-east-1, auto). Defaults to auto if not specified."
    },
    "s3_bucket": {
      "type": "string",
      "description": "S3 bucket name for storing backups. The bucket must already exist."
    },
    "require_tls_inbound": {
      "type": "boolean",
      "description": "When enabled, reject inbound emails not sent over TLS"
    },
    "verification_record": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string",
      "enum": [
        "domain"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "storage_used": {
      "type": "integer"
    },
    "storage_used_by_aliases": {
      "type": "integer"
    },
    "storage_quota": {
      "type": "integer"
    },
    "smtp_dns_records": {
      "type": "object",
      "properties": {
        "dkim": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          }
        },
        "return_path": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          }
        },
        "dmarc": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          }
        }
      }
    },
    "zone_file": {
      "type": "string",
      "description": "Every DNS record the domain needs (MX, verification, SPF, DKIM, Return-Path, DMARC, and autodiscovery) as a zone file to import into a DNS provider. Only included when a domain is retrieved or created, for domain admins."
    },
    "link": {
      "type": "string",
      "format": "uri"
    }
  }
}