{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/withverifa-com/json-schema/withverifa-com-check-schema.json",
  "title": "Check",
  "description": "A screening check or risk report. The `result` field structure varies by check type:\n\n**AML checks** (sanction, pep, adverse_media, warning): `result` contains `match_count`, `highest_score`, and provider metadata.\n**Risk checks** (email_risk, phone_risk, ip_risk): `result` contains `risk_score` (0-100), `risk_level` (low/medium/high/critical), and signal-specific fields.\n**Enhanced checks** (email_risk_enhanced, phone_risk_enhanced, address_validation, ssn_verification): `result` contains provider-specific detailed analysis.\n\nFor PEP checks, additional top-level fields `pep_risk_tier` and `pep_recommended_action` are included when available.\n",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/withverifa-com-openapi.yml#/components/schemas/Check",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "check_type": {
      "$ref": "#/$defs/CheckCheckType",
      "description": "The type of check. Categories:\n- **AML**: `sanction`, `pep`, `adverse_media`, `warning` — screen against global sanctions, PEP, and adverse-media watchlists\n- **Risk**: `email_risk`, `phone_risk`, `ip_risk` — lightweight risk scoring\n- **Enhanced**: `email_risk_enhanced`, `phone_risk_enhanced`, `address_validation`, `ssn_verification` — deep provider-backed analysis\n"
    },
    "status": {
      "$ref": "#/$defs/CheckStatus",
      "description": "Check status. `pending` = still processing, `clear` = no matches/low risk,\n`hit` = matches found or high risk, `error` = provider failure.\n"
    },
    "has_match": {
      "type": "boolean",
      "description": "Whether the check found any matches or flagged risk."
    },
    "hit_count": {
      "type": "integer",
      "description": "Number of screening hits found (AML checks) or 0/1 for risk checks."
    },
    "provider": {
      "type": [
        "string",
        "null"
      ],
      "description": "Sanitized provider category for the check (e.g.,\n`aml_screening`, `email_risk`, `phone_risk`, `address_verification`).\nRaw vendor identifiers are scrubbed at the API boundary — the\nunderlying vendor name is never exposed to API clients.\n"
    },
    "session_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Associated session ID, if the check was triggered as part of a verification session."
    },
    "identity_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Associated identity ID, if the check is linked to a known identity."
    },
    "external_ref": {
      "type": [
        "string",
        "null"
      ],
      "description": "Your external reference for the subject."
    },
    "monitoring_enabled": {
      "type": "boolean",
      "description": "Whether ongoing monitoring is enabled for this check (AML only)."
    },
    "is_sandbox": {
      "type": "boolean",
      "description": "Whether this check was created in sandbox mode (uses test data)."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Custom tags attached to this check."
    },
    "batch_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Batch ID if this check was created via the bulk endpoint."
    },
    "pep_risk_tier": {
      "$ref": "#/$defs/CheckPepRiskTier",
      "description": "PEP risk classification tier. Only present for `pep` check type."
    },
    "pep_recommended_action": {
      "type": [
        "string",
        "null"
      ],
      "description": "Recommended action based on PEP risk tier. Only present for `pep` check type."
    },
    "redacted_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When check data was redacted (GDPR). Only present if redacted."
    },
    "last_checked_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "result": {
      "oneOf": [
        {
          "$ref": "#/$defs/CheckResult"
        },
        {
          "type": "null"
        }
      ],
      "description": "Provider result data. Structure varies by check type:\n- **AML**: `{match_count, highest_score, ...}`\n- **Risk**: `{risk_score, risk_level, deliverable, fraud_score, ...}`\n- **Enhanced**: Provider-specific detailed analysis object\n"
    },
    "hits": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ScreeningHit"
      },
      "description": "Screening hits (matches). Only included when fetching check detail."
    }
  },
  "$defs": {
    "CheckCheckType": {
      "type": "string",
      "enum": [
        "sanction",
        "pep",
        "adverse_media",
        "warning",
        "email_risk",
        "phone_risk",
        "ip_risk",
        "email_risk_enhanced",
        "phone_risk_enhanced",
        "address_validation",
        "ssn_verification"
      ],
      "description": "The type of check. Categories:\n- **AML**: `sanction`, `pep`, `adverse_media`, `warning` — screen against global sanctions, PEP, and adverse-media watchlists\n- **Risk**: `email_risk`, `phone_risk`, `ip_risk` — lightweight risk scoring\n- **Enhanced**: `email_risk_enhanced`, `phone_risk_enhanced`, `address_validation`, `ssn_verification` — deep provider-backed analysis\n",
      "title": "CheckCheckType"
    },
    "CheckPepRiskTier": {
      "type": "string",
      "enum": [
        "tier_1",
        "tier_2",
        "tier_3",
        "tier_4"
      ],
      "description": "PEP risk classification tier. Only present for `pep` check type.",
      "title": "CheckPepRiskTier"
    },
    "CheckResult": {
      "type": "object",
      "properties": {},
      "description": "Provider result data. Structure varies by check type:\n- **AML**: `{match_count, highest_score, ...}`\n- **Risk**: `{risk_score, risk_level, deliverable, fraud_score, ...}`\n- **Enhanced**: Provider-specific detailed analysis object\n",
      "title": "CheckResult"
    },
    "CheckStatus": {
      "type": "string",
      "enum": [
        "pending",
        "clear",
        "hit",
        "error"
      ],
      "description": "Check status. `pending` = still processing, `clear` = no matches/low risk,\n`hit` = matches found or high risk, `error` = provider failure.\n",
      "title": "CheckStatus"
    },
    "ScreeningHit": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "matched_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the matched entity from the watchlist."
        },
        "name_similarity": {
          "type": "number",
          "format": "double",
          "description": "Name similarity score between 0.0 and 1.0."
        },
        "dob_match": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the date of birth matched, if provided."
        },
        "combined_score": {
          "type": "number",
          "format": "double",
          "description": "Combined match score factoring name, DOB, and other signals."
        },
        "hit_source": {
          "type": [
            "string",
            "null"
          ],
          "description": "Source list or database that produced this hit (e.g., OFAC, UN, EU)."
        },
        "hit_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Type of match (e.g., sanction, pep, adverse_media, warning)."
        },
        "provider_ref": {
          "type": [
            "string",
            "null"
          ],
          "description": "Provider's unique reference for this entity."
        },
        "deceased": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the matched entity is deceased (if known)."
        },
        "is_false_positive": {
          "type": "boolean",
          "description": "Whether this hit has been dismissed as a false positive."
        },
        "pep_details": {
          "oneOf": [
            {
              "$ref": "#/$defs/ScreeningHitPepDetails"
            },
            {
              "type": "null"
            }
          ],
          "description": "PEP-specific enrichment. Only present for PEP hits."
        },
        "sanction_details": {
          "oneOf": [
            {
              "$ref": "#/$defs/ScreeningHitSanctionDetails"
            },
            {
              "type": "null"
            }
          ],
          "description": "Sanction-specific enrichment. Only present for sanction hits."
        },
        "adverse_media_details": {
          "oneOf": [
            {
              "$ref": "#/$defs/ScreeningHitAdverseMediaDetails"
            },
            {
              "type": "null"
            }
          ],
          "description": "Adverse media enrichment. Only present for adverse_media hits."
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "created_at"
      ],
      "description": "A screening match found during an AML check. Includes similarity scoring,\nsource information, and type-specific enrichment (e.g., `pep_details`,\n`sanction_details`, `adverse_media_details`).\n",
      "title": "ScreeningHit"
    },
    "ScreeningHitAdverseMediaDetails": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScreeningHitAdverseMediaDetailsSourcesItems"
          }
        }
      },
      "description": "Adverse media enrichment. Only present for adverse_media hits.",
      "title": "ScreeningHitAdverseMediaDetails"
    },
    "ScreeningHitAdverseMediaDetailsSourcesItems": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "date": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "title": "ScreeningHitAdverseMediaDetailsSourcesItems"
    },
    "ScreeningHitPepDetails": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "positions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScreeningHitPepDetailsPositionsItems"
          }
        },
        "associates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScreeningHitPepDetailsAssociatesItems"
          }
        },
        "pep_class": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "description": "PEP-specific enrichment. Only present for PEP hits.",
      "title": "ScreeningHitPepDetails"
    },
    "ScreeningHitPepDetailsAssociatesItems": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "relationship": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "title": "ScreeningHitPepDetailsAssociatesItems"
    },
    "ScreeningHitPepDetailsPositionsItems": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "from": {
          "type": [
            "string",
            "null"
          ]
        },
        "to": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "title": "ScreeningHitPepDetailsPositionsItems"
    },
    "ScreeningHitSanctionDetails": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "list_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "program": {
          "type": [
            "string",
            "null"
          ]
        },
        "listed_on": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "description": "Sanction-specific enrichment. Only present for sanction hits.",
      "title": "ScreeningHitSanctionDetails"
    }
  }
}