{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mobilevalidate-com/json-schema/mobilevalidate-com-service-schema.json",
  "title": "Service",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mobilevalidate-com-openapi.yaml#/components/schemas/Service",
  "type": "object",
  "required": [
    "object",
    "code",
    "name",
    "platform",
    "family",
    "input_type",
    "result_kind",
    "realtime",
    "batch",
    "status",
    "prices"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "service"
    },
    "code": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "platform": {
      "type": "string",
      "description": "Descriptive platform name (no affiliation implied)."
    },
    "family": {
      "type": "string",
      "enum": [
        "messaging",
        "social",
        "apps",
        "network",
        "email",
        "finance"
      ]
    },
    "namespace": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "input_type": {
      "type": "string",
      "enum": [
        "phone",
        "email"
      ]
    },
    "result_kind": {
      "type": "string",
      "enum": [
        "boolean",
        "attributes"
      ]
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "attributes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "key",
          "type",
          "description"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "boolean",
              "enum",
              "integer"
            ]
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowed values (type enum)."
          },
          "min": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Inclusive lower bound (type integer)."
          },
          "max": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Inclusive upper bound (type integer)."
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "realtime": {
      "type": "boolean",
      "description": "Usable on POST /v1/lookup; otherwise bulk jobs only."
    },
    "batch": {
      "type": "boolean"
    },
    "modes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "realtime",
          "batch"
        ]
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "unavailable"
      ]
    },
    "beta": {
      "type": "boolean"
    },
    "countries": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "ISO alpha-2; empty = all countries."
    },
    "unsupported_countries": {
      "type": "object",
      "description": "Countries this check does not cover, per mode (ISO alpha-2, in addition to sanctioned countries). Numbers from them answer `unsupported_country` and are free; bulk jobs mark them before the job runs (estimate `unsupported_checks`). Example: iMessage does not cover mainland China (CN) numbers.\n",
      "properties": {
        "realtime": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "batch": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "prices": {
      "type": "object",
      "properties": {
        "realtime": {
          "oneOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "type": "null"
            }
          ]
        },
        "batch": {
          "$ref": "#/$defs/Money"
        }
      }
    },
    "unit": {
      "type": "string"
    }
  },
  "$defs": {
    "Money": {
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "string",
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "description": "Decimal USD amount."
        },
        "currency": {
          "type": "string",
          "enum": [
            "USD"
          ]
        }
      }
    }
  }
}