{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/email-spam-tester-com/json-schema/email-spam-tester-com-mx-out-schema.json",
  "title": "MxOut",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/email-spam-tester-com-openapi.json#/components/schemas/MxOut",
  "properties": {
    "tool": {
      "type": "string",
      "title": "Tool"
    },
    "query": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Query",
      "description": "The inputs after normalisation."
    },
    "checked_at": {
      "type": "string",
      "title": "Checked At",
      "description": "When the lookups ran, ISO 8601 UTC."
    },
    "duration_ms": {
      "type": "integer",
      "title": "Duration Ms"
    },
    "status": {
      "type": "string",
      "enum": [
        "pass",
        "warn",
        "fail",
        "error"
      ],
      "title": "Status",
      "description": "Overall verdict. \"error\" means the check could not complete (timeout, SERVFAIL); it is never \"pass\" when a lookup the verdict needs failed."
    },
    "findings": {
      "items": {
        "$ref": "#/$defs/Finding"
      },
      "type": "array",
      "title": "Findings"
    },
    "records": {
      "items": {
        "$ref": "#/$defs/MxRecord"
      },
      "type": "array",
      "title": "Records",
      "description": "Sorted by preference, then host."
    },
    "implicit": {
      "type": "boolean",
      "title": "Implicit",
      "description": "No MX: senders use the domain's own address records (RFC 5321 §5.1)."
    },
    "implicit_addresses": {
      "$ref": "#/$defs/MxAddresses"
    },
    "null_mx": {
      "type": "boolean",
      "title": "Null Mx",
      "description": "The domain publishes MX 0 . (RFC 7505)."
    },
    "mta_sts": {
      "$ref": "#/$defs/MxHint"
    },
    "tls_rpt": {
      "$ref": "#/$defs/MxHint"
    }
  },
  "type": "object",
  "required": [
    "tool",
    "query",
    "checked_at",
    "duration_ms",
    "status",
    "findings",
    "records",
    "implicit",
    "implicit_addresses",
    "null_mx",
    "mta_sts",
    "tls_rpt"
  ],
  "$defs": {
    "Finding": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "Stable identifier, e.g. spf.too_many_lookups. The English template for every code is in /i18n/tools/findings.en.json on the website."
        },
        "level": {
          "type": "string",
          "enum": [
            "pass",
            "info",
            "warn",
            "fail",
            "error"
          ],
          "title": "Level"
        },
        "params": {
          "additionalProperties": true,
          "type": "object",
          "title": "Params",
          "description": "Values the message is built from."
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "The English sentence, params filled in."
        }
      },
      "type": "object",
      "required": [
        "code",
        "level",
        "params",
        "message"
      ],
      "title": "Finding"
    },
    "MxAddresses": {
      "properties": {
        "a": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "A"
        },
        "aaaa": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Aaaa"
        }
      },
      "type": "object",
      "required": [
        "a",
        "aaaa"
      ],
      "title": "MxAddresses"
    },
    "MxHint": {
      "properties": {
        "record": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Record"
        }
      },
      "type": "object",
      "required": [
        "record"
      ],
      "title": "MxHint"
    },
    "MxRecord": {
      "properties": {
        "preference": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Preference"
        },
        "host": {
          "type": "string",
          "title": "Host",
          "description": "Exchange host, lowercased; \"\" for a null MX."
        },
        "cname": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cname",
          "description": "Where a CNAME at the host pointed."
        },
        "addresses": {
          "$ref": "#/$defs/MxAddresses"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "not_found",
            "no_address",
            "private",
            "error",
            "ip_literal",
            "null"
          ],
          "title": "Status"
        },
        "provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider",
          "description": "Who runs the host, when the name says so."
        }
      },
      "type": "object",
      "required": [
        "preference",
        "host",
        "cname",
        "addresses",
        "status",
        "provider"
      ],
      "title": "MxRecord"
    }
  }
}