{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whoisfreaks/json-schema/whoisfreaks-domain-reputation-response-schema.json",
  "title": "DomainReputationResponse",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whoisfreaks-domain-reputation-api-openapi.yml#/components/schemas/DomainReputationResponse",
  "type": "object",
  "properties": {
    "input": {
      "$ref": "#/$defs/DomainReputationInput"
    },
    "assessed_at": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "processing_time_ms": {
      "type": "integer"
    },
    "risk_category": {
      "$ref": "#/$defs/RiskCategory"
    },
    "dga_score": {
      "$ref": "#/$defs/DgaScore"
    },
    "trust_signals": {
      "$ref": "#/$defs/TrustSignals"
    },
    "intelligence": {
      "$ref": "#/$defs/ReputationIntelligence"
    },
    "evidence_summary": {
      "$ref": "#/$defs/EvidenceSummary"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": true,
  "$defs": {
    "DgaFeatures": {
      "type": "object",
      "properties": {
        "domain_length": {
          "type": "integer"
        },
        "vowel_consonant_ratio": {
          "type": "number"
        },
        "ngram_perplexity": {
          "type": "number"
        },
        "shannon_entropy": {
          "type": "number"
        },
        "digit_letter_ratio": {
          "type": "number"
        },
        "consonant_streak_max": {
          "type": "integer"
        },
        "tld_in_known_dga_set": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    },
    "DgaScore": {
      "type": "object",
      "properties": {
        "score": {
          "type": "number"
        },
        "is_dga": {
          "type": "boolean"
        },
        "model": {
          "type": "string"
        },
        "features": {
          "$ref": "#/$defs/DgaFeatures"
        },
        "interpretation": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "DomainReputationInput": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "EvidenceSummary": {
      "type": "object",
      "properties": {
        "why_flagged": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": true
    },
    "PivotMatch": {
      "type": "object",
      "properties": {
        "pivot": {
          "type": "string"
        },
        "pivot_type": {
          "type": "string"
        },
        "total_related_threats": {
          "type": "integer"
        },
        "confidence": {
          "type": "number"
        }
      },
      "additionalProperties": true
    },
    "RelatedIoc": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "confidence": {
          "type": "number"
        }
      },
      "additionalProperties": true
    },
    "ReputationIndicators": {
      "type": "object",
      "properties": {
        "is_newly_registered": {
          "type": "boolean"
        },
        "uses_free_extension": {
          "type": "boolean"
        },
        "uses_free_ssl": {
          "type": "boolean"
        },
        "has_privacy_whois": {
          "type": "boolean"
        },
        "ssl_age_days": {
          "type": "integer"
        },
        "has_dmarc": {
          "type": "boolean"
        },
        "has_spf": {
          "type": "boolean"
        },
        "redirects_externally": {
          "type": "boolean"
        },
        "javascript_obfuscated": {
          "type": "boolean"
        },
        "domain_age_days": {
          "type": "integer"
        },
        "registrar": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "ReputationIntelligence": {
      "type": "object",
      "properties": {
        "ioc_type": {
          "type": "string"
        },
        "ioc_value": {
          "type": "string"
        },
        "related_iocs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RelatedIoc"
          }
        },
        "feed_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stix_pattern": {
          "type": "string"
        },
        "recommended_action": {
          "type": "string"
        },
        "first_seen": {
          "type": "string"
        },
        "last_seen": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "ReputationSignal": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "weight": {
          "type": "integer"
        },
        "polarity": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "evidence": {
          "type": "string"
        },
        "confidence": {
          "type": "number"
        }
      },
      "additionalProperties": true
    },
    "ReputationSignals": {
      "type": "object",
      "properties": {
        "positive": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReputationSignal"
          }
        },
        "negative": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReputationSignal"
          }
        },
        "neutral": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReputationSignal"
          }
        }
      },
      "additionalProperties": true
    },
    "RiskCategory": {
      "type": "object",
      "properties": {
        "verdict": {
          "type": "string"
        },
        "confidence": {
          "type": "number"
        },
        "primary_threat": {
          "type": "string"
        },
        "severity": {
          "type": "string"
        },
        "threat_types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ThreatSource"
          }
        },
        "pivot_matches": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PivotMatch"
          }
        }
      },
      "additionalProperties": true
    },
    "ThreatSource": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "indicator": {
          "type": "string"
        },
        "threat_type": {
          "type": "string"
        },
        "confidence": {
          "type": "number"
        },
        "first_seen": {
          "type": "string"
        },
        "last_seen": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "TrustSignals": {
      "type": "object",
      "properties": {
        "trust_score": {
          "type": "integer"
        },
        "trust_band": {
          "type": "string"
        },
        "signals": {
          "$ref": "#/$defs/ReputationSignals"
        },
        "indicators": {
          "$ref": "#/$defs/ReputationIndicators"
        }
      },
      "additionalProperties": true
    }
  }
}