{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsapp/json-schema/whatsapp-phone-number-settings-response-schema.json",
  "title": "PhoneNumberSettingsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whatsapp-settings-api-openapi.yml#/components/schemas/PhoneNumberSettingsResponse",
  "type": "object",
  "properties": {
    "calling": {
      "$ref": "#/$defs/CallingSettingsResponse"
    },
    "payload_encryption": {
      "$ref": "#/$defs/PayloadEncryptionSettingsResponse"
    },
    "storage_configuration": {
      "$ref": "#/$defs/StorageConfigurationSettingsResponse"
    }
  },
  "required": [
    "calling",
    "storage_configuration"
  ],
  "$defs": {
    "AudioSettingsResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Audio calling status"
        }
      }
    },
    "CallHoursSettings": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Call hours feature status"
        },
        "timezone": {
          "type": "string",
          "description": "Timezone for call hours"
        },
        "day_of_week_start": {
          "type": "string",
          "description": "Start day of the week"
        }
      },
      "required": [
        "status"
      ]
    },
    "CallIconsSettings": {
      "type": "object",
      "properties": {
        "restrict_to_user_countries": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of countries where call icons are restricted"
        }
      }
    },
    "CallingRestrictionsResponse": {
      "type": "object",
      "properties": {
        "restrictions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Type of restriction"
              },
              "expiration": {
                "type": "integer",
                "format": "int64",
                "description": "Expiration timestamp for the restriction"
              }
            }
          }
        }
      }
    },
    "CallingSettingsResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Current calling feature status"
        },
        "call_icon_visibility": {
          "type": "string",
          "enum": [
            "visible",
            "hidden"
          ],
          "description": "Current call icon visibility setting"
        },
        "ip_addresses": {
          "type": "object",
          "properties": {
            "default": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Default IP addresses for calling"
            }
          },
          "required": [
            "default"
          ]
        },
        "callback_permission_status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Callback permission status"
        },
        "srtp_key_exchange_protocol": {
          "type": "string",
          "enum": [
            "DTLS-SRTP",
            "SDES-SRTP"
          ],
          "description": "SRTP key exchange protocol (optional)"
        },
        "call_hours": {
          "$ref": "#/$defs/CallHoursSettings"
        },
        "call_icons": {
          "$ref": "#/$defs/CallIconsSettings"
        },
        "sip": {
          "$ref": "#/$defs/SipSettingsResponse"
        },
        "video": {
          "$ref": "#/$defs/VideoSettingsResponse"
        },
        "audio": {
          "$ref": "#/$defs/AudioSettingsResponse"
        },
        "restrictions": {
          "$ref": "#/$defs/CallingRestrictionsResponse"
        }
      },
      "required": [
        "status",
        "call_icon_visibility",
        "ip_addresses",
        "callback_permission_status"
      ]
    },
    "PayloadEncryptionSettingsResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Payload encryption status"
        },
        "client_encryption_key_fingerprint": {
          "type": "string",
          "description": "Client encryption key fingerprint (when encryption is enabled)"
        },
        "cloud_encryption_key": {
          "type": "string",
          "description": "Cloud encryption key (when encryption is enabled)"
        }
      },
      "required": [
        "status"
      ]
    },
    "SipServerInfo": {
      "type": "object",
      "properties": {
        "app_id": {
          "type": "string",
          "description": "Application ID for SIP server"
        },
        "hostname": {
          "type": "string",
          "description": "SIP server hostname"
        },
        "port": {
          "type": "integer",
          "description": "SIP server port (optional)"
        },
        "password": {
          "type": "string",
          "description": "SIP password (only included when include_sip_credentials=true)"
        }
      },
      "required": [
        "app_id",
        "hostname"
      ]
    },
    "SipSettingsResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "SIP calling status"
        },
        "servers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SipServerInfo"
          },
          "description": "SIP server configuration"
        }
      },
      "required": [
        "status"
      ]
    },
    "StorageConfigurationSettingsResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "default",
            "in_country_storage_enabled"
          ],
          "description": "Data storage configuration status"
        },
        "data_localization_region": {
          "type": "string",
          "description": "Data localization region (when in-country storage is enabled)"
        }
      },
      "required": [
        "status"
      ]
    },
    "VideoSettingsResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "Video calling status"
        }
      },
      "required": [
        "status"
      ]
    }
  }
}