{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dmarc-examiner-com/json-schema/dmarc-examiner-com-report-schema.json",
  "title": "Report",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dmarc-examiner-com-openapi.yaml#/components/schemas/Report",
  "type": "object",
  "required": [
    "id",
    "domain_id",
    "external_report_id",
    "reporter_org_name",
    "reporter_email",
    "date_range_begin",
    "date_range_end",
    "policy_domain",
    "policy_p",
    "policy_pct",
    "total_records",
    "pass_rate",
    "received_at",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "domain_id": {
      "type": "string",
      "format": "uuid"
    },
    "domain_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "external_report_id": {
      "type": "string",
      "description": "Report ID assigned by the reporting organization."
    },
    "reporter_org_name": {
      "type": "string",
      "description": "Name of the organization that generated the report."
    },
    "reporter_email": {
      "type": "string",
      "format": "email",
      "description": "Contact email of the reporting organization."
    },
    "date_range_begin": {
      "type": "string",
      "format": "date-time",
      "description": "Start of the reporting period (ISO 8601)."
    },
    "date_range_end": {
      "type": "string",
      "format": "date-time",
      "description": "End of the reporting period (ISO 8601)."
    },
    "policy_domain": {
      "type": "string"
    },
    "policy_p": {
      "type": "string",
      "enum": [
        "none",
        "quarantine",
        "reject"
      ],
      "description": "DMARC policy for the domain."
    },
    "policy_sp": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "none",
        "quarantine",
        "reject"
      ],
      "description": "DMARC policy for subdomains. Falls back to `policy_p` when null."
    },
    "policy_adkim": {
      "type": "string",
      "enum": [
        "r",
        "s"
      ],
      "description": "DKIM alignment mode (r=relaxed, s=strict)."
    },
    "policy_aspf": {
      "type": "string",
      "enum": [
        "r",
        "s"
      ],
      "description": "SPF alignment mode (r=relaxed, s=strict)."
    },
    "policy_pct": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Percentage of messages to which the policy applies."
    },
    "total_records": {
      "type": "integer",
      "description": "Total number of email messages in the report."
    },
    "pass_rate": {
      "type": "number",
      "format": "float",
      "description": "Percentage of messages passing both DKIM and SPF (0-100, 1 decimal)."
    },
    "received_at": {
      "type": "string",
      "format": "date-time"
    },
    "processed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}