{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsapp/json-schema/whatsapp-whats-app-account-number-schema.json",
  "title": "WhatsAppAccountNumber",
  "description": "WhatsApp Account Number details and configuration",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whatsapp-business-messaging-api-openapi.yml#/components/schemas/WhatsAppAccountNumber",
  "type": "object",
  "required": [
    "id",
    "display_phone_number",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the WhatsApp Account Number"
    },
    "display_phone_number": {
      "type": "string",
      "description": "Phone number in international format for display purposes"
    },
    "verified_name": {
      "type": "string",
      "description": "Business name verified for this phone number"
    },
    "status": {
      "$ref": "#/$defs/WhatsAppAccountNumberStatus"
    },
    "quality_rating": {
      "$ref": "#/$defs/WhatsAppPhoneNumberQualityRating"
    },
    "country_code": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 country code"
    },
    "country_dial_code": {
      "type": "string",
      "description": "Country dialing code"
    },
    "code_verification_status": {
      "$ref": "#/$defs/WhatsAppCodeVerificationStatus"
    },
    "name_status": {
      "$ref": "#/$defs/WhatsAppDisplayNameStatus"
    },
    "messaging_limit_tier": {
      "type": "string",
      "description": "Current messaging limit tier for the account number",
      "enum": [
        "TIER_50",
        "TIER_250",
        "TIER_1K",
        "TIER_10K",
        "TIER_100K",
        "TIER_UNLIMITED"
      ]
    },
    "account_mode": {
      "$ref": "#/$defs/WhatsAppBusinessSandboxEligibility"
    },
    "certificate": {
      "type": "string",
      "description": "Business certificate information for the account number"
    },
    "is_official_business_account": {
      "type": "boolean",
      "description": "Whether this is an official business account"
    }
  },
  "$defs": {
    "WhatsAppAccountNumberStatus": {
      "type": "string",
      "description": "Current status of the WhatsApp Account Number",
      "enum": [
        "CONNECTED",
        "DISCONNECTED",
        "UNVERIFIED",
        "PENDING",
        "FLAGGED",
        "RESTRICTED"
      ]
    },
    "WhatsAppBusinessSandboxEligibility": {
      "type": "string",
      "description": "Account mode indicating sandbox or live environment",
      "enum": [
        "LIVE",
        "SANDBOX"
      ]
    },
    "WhatsAppCodeVerificationStatus": {
      "type": "string",
      "description": "Two-step verification status for the phone number",
      "enum": [
        "VERIFIED",
        "UNVERIFIED"
      ]
    },
    "WhatsAppDisplayNameStatus": {
      "type": "string",
      "description": "Status of the display name associated with the phone number",
      "enum": [
        "APPROVED",
        "AVAILABLE_WITHOUT_REVIEW",
        "DECLINED",
        "EXPIRED",
        "PENDING_REVIEW",
        "NONE"
      ]
    },
    "WhatsAppPhoneNumberQualityRating": {
      "type": "string",
      "description": "Quality rating based on message delivery and user feedback",
      "enum": [
        "GREEN",
        "YELLOW",
        "RED",
        "NA"
      ]
    }
  }
}