{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dmarc-examiner-com/json-schema/dmarc-examiner-com-report-record-schema.json",
  "title": "ReportRecord",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dmarc-examiner-com-openapi.yaml#/components/schemas/ReportRecord",
  "type": "object",
  "required": [
    "id",
    "source_ip",
    "count",
    "disposition",
    "dkim_result",
    "spf_result",
    "header_from",
    "is_passing",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "source_ip": {
      "type": "string",
      "description": "IP address of the sending mail server. May be IPv4 or IPv6."
    },
    "count": {
      "type": "integer",
      "description": "Number of messages from this source with these results."
    },
    "disposition": {
      "type": "string",
      "enum": [
        "none",
        "quarantine",
        "reject"
      ],
      "description": "Action applied to the message."
    },
    "dkim_result": {
      "type": "string",
      "enum": [
        "none",
        "pass",
        "fail",
        "policy",
        "neutral",
        "temperror",
        "permerror"
      ],
      "description": "DKIM authentication result, as defined in RFC 7601 §2.7.1."
    },
    "spf_result": {
      "type": "string",
      "enum": [
        "none",
        "neutral",
        "pass",
        "fail",
        "softfail",
        "temperror",
        "permerror"
      ],
      "description": "SPF authentication result, as defined in RFC 7601 §2.7.2."
    },
    "header_from": {
      "type": "string",
      "description": "The From header domain."
    },
    "envelope_from": {
      "type": [
        "string",
        "null"
      ],
      "description": "The MAIL FROM domain."
    },
    "dkim_domain": {
      "type": [
        "string",
        "null"
      ],
      "description": "Domain used for DKIM signing."
    },
    "spf_domain": {
      "type": [
        "string",
        "null"
      ],
      "description": "Domain used for SPF check."
    },
    "is_passing": {
      "type": "boolean",
      "description": "True if both DKIM and SPF pass."
    },
    "geo": {
      "$ref": "#/$defs/GeoLocation"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "GeoLocation": {
      "type": [
        "object",
        "null"
      ],
      "description": "Geolocation data for the source IP. Null if lookup failed.",
      "properties": {
        "country": {
          "type": "string"
        },
        "country_code": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 code. Returns \"XX\" for private IPs."
        },
        "org": {
          "type": "string",
          "description": "ISP or organization name."
        },
        "asn": {
          "type": [
            "integer",
            "null"
          ]
        },
        "cidr": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}