{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/proxymail-qa/json-schema/proxymail-qa-email-checks-schema.json",
  "title": "EmailChecks",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/proxymail-qa-openapi.json#/components/schemas/EmailChecks",
  "type": "object",
  "properties": {
    "address": {
      "type": "string"
    },
    "email": {
      "type": "object",
      "description": "Which email was checked, without its content.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "received_at": {
          "type": "string",
          "format": "date-time"
        },
        "service": {
          "type": [
            "string",
            "null"
          ]
        },
        "service_domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "code",
            "link",
            null
          ],
          "description": "Its main code or link."
        },
        "subtype": {
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "auth",
            "transactional",
            "marketing",
            null
          ],
          "description": "Sign-in, transactional or marketing; null for an email from before types."
        }
      }
    },
    "passed": {
      "type": "boolean",
      "description": "No check failed. Warnings don't count."
    },
    "failed": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "check": {
            "type": "string",
            "enum": [
              "spf",
              "dkim",
              "dmarc",
              "shared_sender",
              "local_links",
              "plain_http",
              "expected_host",
              "link_site",
              "expiry",
              "coupon_expiry",
              "plain_text",
              "size",
              "images_only",
              "layout",
              "expected_text",
              "language",
              "arrival_time",
              "expected_attachment",
              "list_unsubscribe",
              "one_click_unsubscribe",
              "unsubscribe_link",
              "preheader",
              "after_unsubscribe",
              "offer_reuse",
              "coupon_result",
              "marketing_consent",
              "prechecked_consent",
              "double_opt_in",
              "unsubscribe_deadline",
              "postal_address",
              "sender_identity",
              "minor_marketing",
              "harmful_attachment",
              "spam_risk",
              "misleading_subject",
              "ad_label"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pass",
              "fail",
              "warn",
              "skip"
            ]
          },
          "detail": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "description": "spam_risk only: the spam score out of 10, adding up the markers below. 5 or more fails (likely rejected or sent to spam); 1.5 or more warns."
          },
          "markers": {
            "type": "array",
            "description": "spam_risk only: what makes up the score, most points first, such as no_dkim or shortener.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "points": {
                  "type": "number"
                }
              }
            }
          }
        }
      }
    }
  }
}