Result Response

When you send a validation request to the OnSefy API, you receive a JSON response that includes a summary, flagged risk patterns, and per-field diagnostics. This section walks through how to read and act on that output.


🔹Sample Response

{
  "status": true,
  "summary": {
    "risk_level": 0,
    "verify_label": "Legit",
    "risk_score": 1.68,
    "score_confidence": "70%",
    "engine": "NeonShield"
  },
  "risk_patterns": [
    "user_agent_flag"
  ],
  "parameters": {
    "name": {
      "data": "Nkosi Mokoena"
    },
    "user_agent": {
      "field_name": "user_agent",
      "error_code": 42,
      "os": "Bot",
      "device": "Virtual Other",
      "message": "Bot detected"
    },
    "email": {
      "data": "nkosim@webmail.co.za"
    },
    "phone": {
      "data": "+27731234567",
      "country_code_digit": 27,
      "country_code": "ZA"
    },
    "ip": {
      "ip": "105.224.101.129",
      "data": "105.224.101.129",
      "country": "South Africa",
      "country_code": "ZA"
    }
  },
  "transaction_id": "44de328f-3132-4911-85ab-38194edc914a",
  "timestamp": "2025-05-18T14:31:14.445139+00:00"
}

🔹Summary Section

FieldTypeDescription
risk_levelint0 = Legit, 1 = Suspicious, 2 = Fraud
verify_labelstringLabel representing risk: Legit, Suspicious, or Fraud
risk_scorefloatScore from 0–10, higher = higher risk
score_confidencestringYou can use in decison making like same score with low confidence (50-99%)
enginestringInternal AI engine used to analyze input (NeonShield)

🔹Risk Patterns

Pattern NameExplanation
phone_flagPhone failed format or known spam pattern
phone_ip_mismatchPhone number country and IP country don’t match
name_email_similarityName and email appear synthetically similar or generic

These patterns help you understand why the score was generated and take actions based on trust logic.


🔹Response Parameters

Phone

{
  "field_name": "phone",
  "error_code": 32,
  "country_code": "NA",
  "message": "Invalid phone number format."
}
  • error_code 32: Format issue or unknown international format.
  • country_code: NA indicates that the country couldn’t be detected from the number.

Email

{
  "data": "user@gmail.com"
}
  • Email is valid, but may be flagged in deeper checks in advanced analysis.

IP

{
  "ip": "35.242.177.6",
  "data": "35.242.177.6",
  "country": "United Kingdom",
  "country_code": "GB"
}
  • IP Metadata is used to match against VPNs, countries, attack lists, etc.
  • Use alongside phone/email to check for mismatches.

Name

{
  "field_name": "name",
  "error_code": 24,
  "data": "John Doe",
  "message": "Blocked due to suspicious name."
}
  • Names “John Doe” is suspicious due to high abuse frequency.
  • error_code 24: Flagged name pattern.

User Agent

{
  "os": "Mac OS X",
  "device": "Mac"
}
  • Parsed user agent details help identify bots or unusual environments.

Transaction Metadata

FieldDescription
transaction_idUnique identifier per request
timestampISO UTC time of when the request was processed

Notes

  • A response of "status": true confirms a successful API call.
  • Use risk scores and labels to build adaptive fraud flows (manual review, block, allow).