{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/email-spam-tester-com/json-schema/email-spam-tester-com-mailtester-api-tools-header-out-schema.json",
  "title": "HeaderOut",
  "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/mailtester__api__tools__HeaderOut",
  "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"
    },
    "signatures_verified": {
      "type": "boolean",
      "title": "Signatures Verified",
      "description": "Always false: there is no body, so DKIM and ARC signatures are read, not verified. Pass and fail come from the receiver's Authentication-Results."
    },
    "summary": {
      "$ref": "#/$defs/HeaderSummary"
    },
    "hops": {
      "items": {
        "$ref": "#/$defs/HeaderHop"
      },
      "type": "array",
      "title": "Hops"
    },
    "delivery": {
      "$ref": "#/$defs/HeaderDelivery"
    },
    "delivering_ip": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Delivering Ip"
    },
    "auth": {
      "$ref": "#/$defs/HeaderAuth"
    },
    "alignment": {
      "$ref": "#/$defs/HeaderAlignment"
    },
    "dkim_signatures": {
      "items": {
        "$ref": "#/$defs/DkimSignature"
      },
      "type": "array",
      "title": "Dkim Signatures"
    },
    "arc": {
      "$ref": "#/$defs/HeaderArc"
    },
    "list_unsubscribe": {
      "$ref": "#/$defs/HeaderUnsubscribe"
    },
    "spam": {
      "items": {
        "$ref": "#/$defs/SpamHeader"
      },
      "type": "array",
      "title": "Spam"
    },
    "fields": {
      "items": {
        "$ref": "#/$defs/HeaderField"
      },
      "type": "array",
      "title": "Fields"
    }
  },
  "type": "object",
  "required": [
    "tool",
    "query",
    "checked_at",
    "duration_ms",
    "status",
    "findings",
    "signatures_verified",
    "summary",
    "hops",
    "delivery",
    "delivering_ip",
    "auth",
    "alignment",
    "dkim_signatures",
    "arc",
    "list_unsubscribe",
    "spam",
    "fields"
  ],
  "$defs": {
    "AlignedDkim": {
      "properties": {
        "d": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "D"
        },
        "s": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "S"
        },
        "verified": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Verified",
          "description": "From the receiver's verdict; null when it says nothing about this signature."
        },
        "aligned": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "strict",
                "relaxed"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Aligned"
        }
      },
      "type": "object",
      "required": [
        "d",
        "s",
        "verified",
        "aligned"
      ],
      "title": "AlignedDkim"
    },
    "AlignedDmarc": {
      "properties": {
        "result": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Result"
        },
        "policy": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Policy"
        },
        "disposition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Disposition"
        }
      },
      "type": "object",
      "required": [
        "result",
        "policy",
        "disposition"
      ],
      "title": "AlignedDmarc"
    },
    "AlignedSpf": {
      "properties": {
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Domain"
        },
        "result": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Result"
        },
        "aligned": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "strict",
                "relaxed"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Aligned"
        }
      },
      "type": "object",
      "required": [
        "domain",
        "result",
        "aligned"
      ],
      "title": "AlignedSpf"
    },
    "ArcSet": {
      "properties": {
        "i": {
          "type": "integer",
          "title": "I"
        },
        "cv": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cv"
        },
        "seal_d": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Seal D"
        },
        "seal_s": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Seal S"
        },
        "ams_d": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ams D"
        },
        "ams_s": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ams S"
        },
        "authserv_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authserv Id"
        }
      },
      "type": "object",
      "required": [
        "i",
        "cv",
        "seal_d",
        "seal_s",
        "ams_d",
        "ams_s",
        "authserv_id"
      ],
      "title": "ArcSet"
    },
    "AuthOther": {
      "properties": {
        "authserv_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authserv Id"
        },
        "results": {
          "items": {
            "$ref": "#/$defs/AuthResult"
          },
          "type": "array",
          "title": "Results"
        },
        "header": {
          "type": "string",
          "title": "Header"
        }
      },
      "type": "object",
      "required": [
        "authserv_id",
        "results",
        "header"
      ],
      "title": "AuthOther"
    },
    "AuthResult": {
      "properties": {
        "method": {
          "type": "string",
          "title": "Method"
        },
        "result": {
          "type": "string",
          "title": "Result"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason"
        },
        "props": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Props"
        },
        "comment": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Comment"
        }
      },
      "type": "object",
      "required": [
        "method",
        "result",
        "reason",
        "props",
        "comment"
      ],
      "title": "AuthResult"
    },
    "AuthResults": {
      "properties": {
        "authserv_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Authserv Id"
        },
        "results": {
          "items": {
            "$ref": "#/$defs/AuthResult"
          },
          "type": "array",
          "title": "Results"
        }
      },
      "type": "object",
      "required": [
        "authserv_id",
        "results"
      ],
      "title": "AuthResults"
    },
    "DkimSignature": {
      "properties": {
        "d": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "D"
        },
        "s": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "S"
        },
        "a": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "A"
        },
        "c": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "C"
        },
        "h": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "H"
        },
        "l": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "L"
        },
        "t": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "T"
        },
        "x": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "X"
        },
        "i": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "I"
        }
      },
      "type": "object",
      "required": [
        "d",
        "s",
        "a",
        "c",
        "h",
        "l",
        "t",
        "x",
        "i"
      ],
      "title": "DkimSignature"
    },
    "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"
    },
    "HeaderAlignment": {
      "properties": {
        "from_domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From Domain"
        },
        "dkim": {
          "items": {
            "$ref": "#/$defs/AlignedDkim"
          },
          "type": "array",
          "title": "Dkim"
        },
        "spf": {
          "$ref": "#/$defs/AlignedSpf"
        },
        "dmarc": {
          "$ref": "#/$defs/AlignedDmarc"
        }
      },
      "type": "object",
      "required": [
        "from_domain",
        "dkim",
        "spf",
        "dmarc"
      ],
      "title": "HeaderAlignment"
    },
    "HeaderArc": {
      "properties": {
        "instances": {
          "type": "integer",
          "title": "Instances"
        },
        "valid_structure": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Valid Structure",
          "description": "Numbering, completeness and cv= only; no signature is verified."
        },
        "sets": {
          "items": {
            "$ref": "#/$defs/ArcSet"
          },
          "type": "array",
          "title": "Sets"
        }
      },
      "type": "object",
      "required": [
        "instances",
        "valid_structure",
        "sets"
      ],
      "title": "HeaderArc"
    },
    "HeaderAuth": {
      "properties": {
        "verdict": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuthResults"
            },
            {
              "type": "null"
            }
          ],
          "description": "The topmost Authentication-Results: the receiver's own."
        },
        "other": {
          "items": {
            "$ref": "#/$defs/AuthOther"
          },
          "type": "array",
          "title": "Other",
          "description": "Every other Authentication-Results, written before the receiver and not to be trusted."
        }
      },
      "type": "object",
      "required": [
        "verdict",
        "other"
      ],
      "title": "HeaderAuth"
    },
    "HeaderDelivery": {
      "properties": {
        "first": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "First"
        },
        "last": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last"
        },
        "total_s": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total S"
        },
        "date_skew_s": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date Skew S",
          "description": "First Received time minus the Date header."
        },
        "hops": {
          "type": "integer",
          "title": "Hops"
        }
      },
      "type": "object",
      "required": [
        "first",
        "last",
        "total_s",
        "date_skew_s",
        "hops"
      ],
      "title": "HeaderDelivery"
    },
    "HeaderField": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "value": {
          "type": "string",
          "title": "Value"
        }
      },
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "title": "HeaderField"
    },
    "HeaderHop": {
      "properties": {
        "index": {
          "type": "integer",
          "title": "Index",
          "description": "1 is the oldest hop: the list runs from the sender to the receiver."
        },
        "from_host": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From Host"
        },
        "from_rdns": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From Rdns"
        },
        "from_ip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From Ip"
        },
        "by_host": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "By Host"
        },
        "with": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "With"
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "for": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "For"
        },
        "tls": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tls",
          "description": "null for hops inside one provider, where the header says nothing either way."
        },
        "tls_detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tls Detail"
        },
        "timestamp": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timestamp"
        },
        "delay_s": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Delay S",
          "description": "Seconds since the previous hop's timestamp; Received dates have one-second precision."
        },
        "clock_skew": {
          "type": "boolean",
          "title": "Clock Skew"
        },
        "raw": {
          "type": "string",
          "title": "Raw"
        }
      },
      "type": "object",
      "required": [
        "index",
        "from_host",
        "from_rdns",
        "from_ip",
        "by_host",
        "with",
        "id",
        "for",
        "tls",
        "tls_detail",
        "timestamp",
        "delay_s",
        "clock_skew",
        "raw"
      ],
      "title": "HeaderHop"
    },
    "HeaderSummary": {
      "properties": {
        "from": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From"
        },
        "from_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From Name"
        },
        "from_domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From Domain"
        },
        "return_path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Return Path"
        },
        "return_path_domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Return Path Domain"
        },
        "to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "To"
        },
        "subject": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Subject",
          "description": "MIME encoded-words decoded."
        },
        "date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date",
          "description": "The Date header, ISO 8601 UTC."
        },
        "message_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message Id"
        },
        "message_id_domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message Id Domain"
        }
      },
      "type": "object",
      "required": [
        "from",
        "from_name",
        "from_domain",
        "return_path",
        "return_path_domain",
        "to",
        "subject",
        "date",
        "message_id",
        "message_id_domain"
      ],
      "title": "HeaderSummary"
    },
    "HeaderUnsubscribe": {
      "properties": {
        "present": {
          "type": "boolean",
          "title": "Present"
        },
        "https": {
          "type": "boolean",
          "title": "Https"
        },
        "mailto": {
          "type": "boolean",
          "title": "Mailto"
        },
        "one_click": {
          "type": "boolean",
          "title": "One Click"
        },
        "signed": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Signed",
          "description": "Listed in h= of one DKIM signature (with List-Unsubscribe-Post when present)."
        }
      },
      "type": "object",
      "required": [
        "present",
        "https",
        "mailto",
        "one_click",
        "signed"
      ],
      "title": "HeaderUnsubscribe"
    },
    "SpamHeader": {
      "properties": {
        "header": {
          "type": "string",
          "title": "Header"
        },
        "engine": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Engine"
        },
        "flag": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Flag"
        },
        "score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Score"
        },
        "threshold": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Threshold"
        },
        "value": {
          "type": "string",
          "title": "Value"
        }
      },
      "type": "object",
      "required": [
        "header",
        "engine",
        "flag",
        "score",
        "threshold",
        "value"
      ],
      "title": "SpamHeader"
    }
  }
}