{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsapp/json-schema/whatsapp-whats-app-business-phone-number-registration-request-schema.json",
  "title": "WhatsAppBusinessPhoneNumberRegistrationRequest",
  "description": "Request payload for registering a WhatsApp Business phone number",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whatsapp-phone-number-registration-api-openapi.yml#/components/schemas/WhatsAppBusinessPhoneNumberRegistrationRequest",
  "type": "object",
  "required": [
    "messaging_product",
    "pin"
  ],
  "properties": {
    "messaging_product": {
      "type": "string",
      "description": "Must be 'whatsapp' to indicate WhatsApp Business messaging product",
      "enum": [
        "whatsapp"
      ]
    },
    "pin": {
      "type": "string",
      "description": "6-digit PIN for two-step verification setup",
      "pattern": "^[0-9]{6}$",
      "minLength": 6,
      "maxLength": 6
    },
    "backup": {
      "$ref": "#/$defs/WhatsAppBusinessAccountBackup"
    },
    "data_localization_region": {
      "$ref": "#/$defs/WhatsAppDataLocalizationRegion"
    },
    "meta_store_retention_minutes": {
      "type": "integer",
      "description": "Message retention period in minutes (deprecated in v21+)",
      "minimum": 60,
      "maximum": 60
    }
  },
  "$defs": {
    "WhatsAppBusinessAccountBackup": {
      "type": "object",
      "description": "Backup data for migrating existing WhatsApp Business accounts",
      "properties": {
        "password": {
          "type": "string",
          "description": "Backup password for account migration"
        },
        "data": {
          "type": "string",
          "description": "Encrypted backup data for account migration"
        }
      }
    },
    "WhatsAppDataLocalizationRegion": {
      "type": "string",
      "description": "Data localization region for message storage (deprecated in v21+)",
      "enum": [
        "AE",
        "AU",
        "BH",
        "BR",
        "CA",
        "CH",
        "DE",
        "GB",
        "ID",
        "IN",
        "JP",
        "KR",
        "SG",
        "ZA"
      ]
    }
  }
}