{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/verifly-email/json-schema/verifly-email-verification-result-schema.json",
  "title": "VerificationResult",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/verifly-email-openapi.json#/components/schemas/VerificationResult",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Normalized (lowercased/trimmed) email."
    },
    "email_original": {
      "type": "string",
      "description": "Present only when the input differed from the normalized email."
    },
    "is_valid": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "result": {
      "type": "string",
      "enum": [
        "deliverable",
        "undeliverable",
        "risky",
        "unknown"
      ],
      "description": "Overall verdict."
    },
    "reason": {
      "type": "string",
      "description": "Human-readable explanation of the verdict."
    },
    "details": {
      "$ref": "#/$defs/VerificationDetails"
    },
    "recommendation": {
      "type": "string",
      "enum": [
        "safe_to_send",
        "risky",
        "do_not_send"
      ]
    },
    "credits_charged": {
      "type": "boolean",
      "description": "True if this verification consumed a credit."
    },
    "credits": {
      "$ref": "#/$defs/Credits"
    }
  },
  "required": [
    "success",
    "email",
    "is_valid",
    "result",
    "reason",
    "details",
    "recommendation",
    "credits_charged",
    "credits"
  ],
  "$defs": {
    "Credits": {
      "type": "object",
      "properties": {
        "used": {
          "type": "integer",
          "minimum": 0,
          "description": "Credits charged by this request."
        },
        "remaining": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "used",
        "remaining"
      ]
    },
    "VerificationDetails": {
      "type": "object",
      "properties": {
        "syntax_valid": {
          "type": "boolean"
        },
        "domain_exists": {
          "type": "boolean"
        },
        "mx_records": {
          "type": "boolean"
        },
        "smtp_valid": {
          "type": "boolean"
        },
        "is_disposable": {
          "type": "boolean"
        },
        "is_role_account": {
          "type": "boolean"
        },
        "is_catch_all": {
          "type": "boolean"
        },
        "is_free_provider": {
          "type": "boolean"
        },
        "provider": {
          "type": "string",
          "description": "Mail provider / domain."
        }
      },
      "required": [
        "syntax_valid",
        "domain_exists",
        "mx_records",
        "smtp_valid",
        "is_disposable",
        "is_role_account",
        "is_catch_all",
        "is_free_provider",
        "provider"
      ]
    }
  }
}