{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/layercall-com/json-schema/layercall-com-phone-result-schema.json",
  "title": "PhoneResult",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/layercall-com-openapi.json#/components/schemas/PhoneResult",
  "type": "object",
  "required": [
    "phone",
    "risk_score",
    "verdict"
  ],
  "properties": {
    "phone": {
      "type": "string"
    },
    "risk_score": {
      "$ref": "#/$defs/RiskScore"
    },
    "verdict": {
      "$ref": "#/$defs/Verdict"
    },
    "parse_status": {
      "type": "string",
      "enum": [
        "ok",
        "country_required",
        "impossible",
        "invalid_pattern"
      ],
      "description": "Distinguishes 'you omitted country' from 'this number is bad'."
    },
    "signals": {
      "type": "object",
      "properties": {
        "syntax_valid": {
          "type": "boolean"
        },
        "is_possible": {
          "type": "boolean"
        },
        "is_voip": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "In a range the national plan reserves for VoIP. null where the plan has no VoIP range (+1 US, India, Germany and others) or the number is only fixed-line-or-mobile: unknown, not no."
        },
        "is_premium_rate": {
          "type": "boolean"
        },
        "is_toll_free": {
          "type": "boolean"
        },
        "assigned_area_code": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "NANP only. null when not applicable."
        }
      }
    },
    "number": {
      "type": "object",
      "properties": {
        "e164": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "request_id": {
      "type": "string"
    },
    "processing_time_sec": {
      "type": "number"
    },
    "first_seen": {
      "nullable": true
    },
    "times_seen": {
      "type": "integer"
    },
    "abuse_reports": {
      "type": "integer"
    },
    "billable_lookups": {
      "type": "integer"
    }
  },
  "$defs": {
    "RiskScore": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "0 = clean, 100 = certain fraud."
    },
    "Verdict": {
      "type": "string",
      "enum": [
        "allow",
        "review",
        "block"
      ],
      "description": "Recommended action. Thresholds move with `strictness`."
    }
  }
}