{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/smstunnel-io/json-schema/smstunnel-io-phone-number-lookup-schema.json",
  "title": "PhoneNumberLookup",
  "description": "Twilio's Lookup v2 PhoneNumber resource. SMSTunnel has no carrier data, so every data package is always `null`, also when `Fields` asks for it.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/smstunnel-io-openapi.json#/components/schemas/PhoneNumberLookup",
  "type": "object",
  "required": [
    "calling_country_code",
    "country_code",
    "phone_number",
    "national_format",
    "valid",
    "validation_errors",
    "caller_name",
    "sim_swap",
    "call_forwarding",
    "line_status",
    "line_type_intelligence",
    "identity_match",
    "reassigned_number",
    "sms_pumping_risk",
    "phone_number_quality_score",
    "pre_fill",
    "url"
  ],
  "properties": {
    "calling_country_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "country_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166 country."
    },
    "phone_number": {
      "type": "string",
      "description": "The number in E.164, or as far as it could be read."
    },
    "national_format": {
      "type": [
        "string",
        "null"
      ]
    },
    "valid": {
      "type": "boolean"
    },
    "validation_errors": {
      "type": [
        "array",
        "null"
      ],
      "description": "`null` for a valid number.",
      "items": {
        "type": "string",
        "enum": [
          "TOO_SHORT",
          "TOO_LONG",
          "INVALID_BUT_POSSIBLE",
          "INVALID_COUNTRY_CODE",
          "INVALID_LENGTH",
          "NOT_A_NUMBER"
        ]
      }
    },
    "caller_name": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "sim_swap": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "call_forwarding": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "line_status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "line_type_intelligence": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "identity_match": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "reassigned_number": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "sms_pumping_risk": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "phone_number_quality_score": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "pre_fill": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null
      ]
    },
    "url": {
      "type": "string",
      "format": "uri"
    }
  }
}