{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sortance/json-schema/sortance-verify-response-schema.json",
  "title": "VerifyResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sortance-openapi.json#/components/schemas/VerifyResponse",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "The address you sent, echoed back. Never stored."
    },
    "verdict": {
      "type": "string",
      "enum": [
        "valid",
        "likely_valid",
        "risky",
        "likely_invalid",
        "invalid",
        "unknown"
      ],
      "description": "Compatibility field derived from bounce_probability. Prefer the probability."
    },
    "bounce_probability": {
      "type": "number",
      "description": "Calibrated against observed bounces: 0.31 means roughly 31 in 100."
    },
    "confidence_interval": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "minItems": 2,
      "maxItems": 2
    },
    "calibration": {
      "type": "string",
      "enum": [
        "prior",
        "fitted"
      ]
    },
    "recommendation": {
      "type": "string",
      "enum": [
        "send",
        "hold",
        "challenge",
        "drop"
      ],
      "description": "A policy suggestion, not a verdict."
    },
    "actor_class": {
      "type": "string",
      "enum": [
        "human_mailbox",
        "agent_mailbox",
        "relay_alias",
        "role_account",
        "shared",
        "unknown"
      ]
    },
    "mailbox_type": {
      "type": "string",
      "enum": [
        "corporate",
        "consumer",
        "role",
        "unknown"
      ]
    },
    "esp": {
      "type": "string",
      "enum": [
        "microsoft365",
        "google_workspace",
        "consumer_esp",
        "self_hosted",
        "unknown"
      ]
    },
    "email_type": {
      "type": "string",
      "enum": [
        "business",
        "free",
        "role",
        "disposable",
        "relay",
        "unknown"
      ],
      "description": "free is the consumer-provider class (Gmail, Outlook, Yahoo, …)."
    },
    "signals": {
      "type": "object",
      "properties": {
        "syntax": {
          "type": "string",
          "enum": [
            "pass",
            "fail"
          ]
        },
        "mx": {
          "type": "string",
          "enum": [
            "pass",
            "fail"
          ]
        },
        "disposable": {
          "type": "boolean"
        },
        "role_account": {
          "type": "boolean"
        },
        "catch_all": {
          "type": "boolean"
        },
        "relay_alias": {
          "type": "boolean"
        }
      }
    },
    "providers": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "verdict": {
            "type": "string"
          },
          "ms": {
            "type": "number"
          },
          "cost": {
            "type": "number"
          }
        }
      },
      "description": "Per-provider receipts. Empty when the local gate or the cache settled it."
    },
    "disagreement": {
      "type": "number",
      "description": "How far apart the providers landed. 0 = agreement."
    },
    "cache": {
      "type": "object",
      "properties": {
        "hit": {
          "type": "boolean"
        },
        "ttl_s": {
          "type": "integer"
        }
      }
    },
    "cost_usd": {
      "type": "number"
    },
    "latency_ms": {
      "type": "integer"
    },
    "trace_id": {
      "type": "string",
      "description": "vr_-prefixed. Quote it in /v1/outcome."
    },
    "reason": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "syntax_invalid",
            "address_blocklisted",
            "domain_blocklisted",
            "no_mx",
            "mx_unresolved",
            "disposable_domain",
            "disposable_suspected",
            "domain_allowlisted",
            "address_allowlisted"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "reasons": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "syntax_invalid",
          "address_blocklisted",
          "domain_blocklisted",
          "no_mx",
          "mx_unresolved",
          "disposable_domain",
          "disposable_suspected",
          "domain_allowlisted",
          "address_allowlisted"
        ]
      }
    },
    "degraded": {
      "type": "boolean",
      "description": "Present and true only when a provider failed and nothing else added evidence."
    },
    "identity_hash": {
      "type": "string",
      "description": "Per-account salted dedupe key for relay aliases."
    },
    "mailbox_checked": {
      "type": "boolean",
      "description": "True when a mailbox provider said whether the mailbox exists."
    },
    "score": {
      "type": "integer",
      "description": "0–100: how safe it is to let this address in. Higher is better."
    },
    "score_band": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "checks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CheckStep"
      },
      "description": "The checks that ran, in order."
    },
    "ai": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "skipped",
            "unavailable",
            "failed"
          ]
        },
        "model": {
          "type": "string",
          "enum": [
            "jev"
          ]
        },
        "address": {
          "type": "string",
          "enum": [
            "real",
            "fake",
            "uncertain"
          ]
        },
        "domain": {
          "type": "string",
          "enum": [
            "ok",
            "typo_like",
            "lookalike",
            "placeholder",
            "throwaway_like",
            "uncertain"
          ]
        },
        "cached": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "decision": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "enum": [
                "allow",
                "allow_with_flow",
                "review",
                "challenge",
                "deny"
              ]
            },
            "policy": {
              "type": "string"
            },
            "version": {
              "type": "integer"
            },
            "rule": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "null"
                }
              ]
            },
            "flow": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "reasons": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "request": {
      "anyOf": [
        {
          "$ref": "#/$defs/RequestInfo"
        },
        {
          "type": "null"
        }
      ]
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/UsageCounters"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "email",
    "verdict",
    "bounce_probability",
    "confidence_interval",
    "calibration",
    "recommendation",
    "actor_class",
    "mailbox_type",
    "esp",
    "email_type",
    "signals",
    "providers",
    "disagreement",
    "cache",
    "cost_usd",
    "latency_ms",
    "trace_id",
    "reason",
    "reasons"
  ],
  "$defs": {
    "CheckStep": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "syntax",
            "account_rules",
            "mx",
            "disposable",
            "email_type",
            "role",
            "catch_all",
            "mailbox",
            "ai",
            "score",
            "policy"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "pass",
            "fail",
            "warn",
            "info",
            "skip"
          ]
        },
        "detail": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "status",
        "detail"
      ]
    },
    "RequestInfo": {
      "type": "object",
      "properties": {
        "ip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "ip_version": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "region": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "region_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "continent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "timezone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "is_eu": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "asn": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "as_org": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "colo": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "user_agent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "source": {
          "type": "string",
          "enum": [
            "edge",
            "caller"
          ],
          "description": "caller when context.client supplied the end user's details."
        }
      }
    },
    "UsageCounters": {
      "type": "object",
      "properties": {
        "key": {
          "type": "object",
          "properties": {
            "minute": {
              "type": "integer"
            },
            "hour": {
              "type": "integer"
            },
            "day": {
              "type": "integer"
            }
          }
        },
        "ip": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "minute": {
                  "type": "integer"
                },
                "hour": {
                  "type": "integer"
                },
                "day": {
                  "type": "integer"
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "email": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "day": {
                  "type": "integer"
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "domain": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "hour": {
                  "type": "integer"
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "limits": {
          "type": "object",
          "properties": {
            "per_minute": {
              "type": "integer"
            },
            "remaining_minute": {
              "type": "integer"
            },
            "month_quota": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "month_used": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        }
      }
    }
  }
}