{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/isbusinessemail/main/json-schema/isbusinessemail-check-result-schema.json",
  "title": "CheckResult",
  "x-generated": "2026-10-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/isbusinessemail-openapi.json#/components/schemas/CheckResult",
  "type": "object",
  "required": [
    "domain",
    "is_business",
    "category",
    "confidence",
    "recommendation",
    "reasons"
  ],
  "properties": {
    "email": {
      "type": [
        "string",
        "null"
      ],
      "description": "The address as sent (null for domain and URL checks)."
    },
    "url": {
      "type": "string",
      "description": "Only for URL checks: the website address as sent. Its host (without www.) is the checked domain."
    },
    "normalized_email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Lowercased, IDN-normalised, +tag removed."
    },
    "domain": {
      "type": [
        "string",
        "null"
      ]
    },
    "is_business": {
      "type": "boolean",
      "description": "True for business, education and government."
    },
    "category": {
      "type": "string",
      "enum": [
        "business",
        "personal",
        "disposable",
        "relay",
        "education",
        "government",
        "invalid",
        "unknown"
      ]
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "recommendation": {
      "type": "string",
      "enum": [
        "allow",
        "review",
        "block"
      ]
    },
    "policy": {
      "type": "string",
      "enum": [
        "b2b",
        "strict",
        "lenient"
      ]
    },
    "is_free_provider": {
      "type": "boolean"
    },
    "is_disposable": {
      "type": "boolean"
    },
    "is_relay": {
      "type": "boolean"
    },
    "is_role_account": {
      "type": "boolean"
    },
    "shared_inbox": {
      "type": "object",
      "description": "Hint that the address is a shared inbox: one mailbox several people answer from (a Microsoft 365 shared mailbox, a Google collaborative inbox, a helpdesk address) such as support@ or billing@. Only the name is evidence: 0.3 (low) on a match, 0 otherwise. Never changes the recommendation.",
      "properties": {
        "confidence": {
          "type": "number",
          "enum": [
            0,
            0.3,
            1
          ]
        },
        "match": {
          "type": [
            "string",
            "null"
          ],
          "description": "The word that matched, or googlegroups.com."
        }
      }
    },
    "group": {
      "type": "object",
      "description": "Hint that the address is a group that forwards to many members (a Google Group, a Microsoft 365 group or distribution list) such as team@ or all@. 0.3 (low) on a name match, 1 for @googlegroups.com, 0 otherwise. Never changes the recommendation.",
      "properties": {
        "confidence": {
          "type": "number",
          "enum": [
            0,
            0.3,
            1
          ]
        },
        "match": {
          "type": [
            "string",
            "null"
          ],
          "description": "The word that matched, or googlegroups.com."
        }
      }
    },
    "is_blocked": {
      "type": "boolean"
    },
    "is_new_domain": {
      "type": "boolean"
    },
    "is_lookalike": {
      "type": "boolean"
    },
    "has_subaddress": {
      "type": "boolean"
    },
    "did_you_mean": {
      "type": [
        "string",
        "null"
      ],
      "description": "Suggested domain for a likely typo."
    },
    "mail": {
      "type": "object",
      "properties": {
        "has_mx": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "provider": {
          "type": [
            "string",
            "null"
          ]
        },
        "mx": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "priority": {
                "type": "integer"
              },
              "host": {
                "type": "string"
              },
              "provider": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "spf": {
          "type": [
            "string",
            "null"
          ]
        },
        "dmarc_policy": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "none",
            "quarantine",
            "reject",
            null
          ]
        }
      }
    },
    "workspace": {
      "type": "object",
      "properties": {
        "google_workspace": {
          "type": "object",
          "properties": {
            "detected": {
              "type": "boolean"
            },
            "evidence": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "microsoft_365": {
          "type": "object",
          "properties": {
            "detected": {
              "type": "boolean"
            },
            "tenant_id": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            },
            "tenant_region": {
              "type": [
                "string",
                "null"
              ]
            },
            "auth": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "managed",
                "federated",
                null
              ]
            },
            "identity_provider": {
              "type": [
                "string",
                "null"
              ]
            },
            "evidence": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "other_suite": {
          "type": [
            "string",
            "null"
          ]
        },
        "pending": {
          "type": "boolean"
        }
      }
    },
    "integrations": {
      "type": "object",
      "properties": {
        "google_workspace_ready": {
          "type": "boolean"
        },
        "microsoft_365_ready": {
          "type": "boolean"
        }
      }
    },
    "domain_age_days": {
      "type": [
        "integer",
        "null"
      ]
    },
    "reasons": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "See https://isbusinessemail.com/docs/reason-codes"
    },
    "degraded": {
      "type": "boolean",
      "description": "DNS was unavailable; the verdict is from lists only."
    },
    "cached": {
      "type": "boolean"
    },
    "took_ms": {
      "type": "integer"
    },
    "request_id": {
      "type": "string"
    }
  }
}