{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-recaptcha/json-schema/google-recaptcha-google-cloud-recaptchaenterprise-v1-key-schema.json",
  "title": "GoogleCloudRecaptchaenterpriseV1Key",
  "description": "A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-recaptcha-projects-api-openapi.yml#/components/schemas/GoogleCloudRecaptchaenterpriseV1Key",
  "properties": {
    "universalSettings": {
      "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1UniversalKeySettings",
      "description": "Settings for keys that are configured through their Policy."
    },
    "labels": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "description": "Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels)."
    },
    "iosSettings": {
      "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1IOSKeySettings",
      "description": "Settings for keys that can be used by iOS apps."
    },
    "displayName": {
      "type": "string",
      "description": "Required. Human-readable display name of this key. Modifiable by user."
    },
    "name": {
      "description": "Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.",
      "type": "string"
    },
    "webSettings": {
      "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1WebKeySettings",
      "description": "Settings for keys that can be used by websites."
    },
    "testingOptions": {
      "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1TestingOptions",
      "description": "Optional. Options for user acceptance testing."
    },
    "expressSettings": {
      "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1ExpressKeySettings",
      "description": "Settings for keys that can be used by reCAPTCHA Express."
    },
    "wafSettings": {
      "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1WafSettings",
      "description": "Optional. Settings for Web Application Firewall (WAF)."
    },
    "androidSettings": {
      "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1AndroidKeySettings",
      "description": "Settings for keys that can be used by Android apps."
    },
    "createTime": {
      "type": "string",
      "readOnly": true,
      "format": "google-datetime",
      "description": "Output only. The timestamp corresponding to the creation of this key."
    }
  },
  "type": "object",
  "$defs": {
    "GoogleCloudRecaptchaenterpriseV1AndroidKeySettings": {
      "properties": {
        "allowedPackageNames": {
          "description": "Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "supportNonGoogleAppStoreDistribution": {
          "type": "boolean",
          "description": "Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store."
        },
        "allowAllPackageNames": {
          "description": "Optional. If set to true, allowed_package_names are not enforced.",
          "type": "boolean"
        }
      },
      "description": "Settings specific to keys that can be used by Android apps.",
      "type": "object"
    },
    "GoogleCloudRecaptchaenterpriseV1AppleDeveloperId": {
      "type": "object",
      "properties": {
        "teamId": {
          "type": "string",
          "description": "Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application."
        },
        "keyId": {
          "description": "Required. The Apple developer key ID (10-character string).",
          "type": "string"
        },
        "privateKey": {
          "description": "Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.",
          "type": "string"
        }
      },
      "description": "Contains fields that are required to perform Apple-specific integrity checks."
    },
    "GoogleCloudRecaptchaenterpriseV1ExpressKeySettings": {
      "type": "object",
      "properties": {},
      "description": "Settings specific to keys that can be used for reCAPTCHA Express."
    },
    "GoogleCloudRecaptchaenterpriseV1IOSKeySettings": {
      "description": "Settings specific to keys that can be used by iOS apps.",
      "type": "object",
      "properties": {
        "allowAllBundleIds": {
          "description": "Optional. If set to true, allowed_bundle_ids are not enforced.",
          "type": "boolean"
        },
        "allowedBundleIds": {
          "description": "Optional. iOS bundle IDs of apps allowed to use the key. Example: 'com.companyname.productname.appname' Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "appleDeveloperId": {
          "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1AppleDeveloperId",
          "description": "Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app."
        }
      }
    },
    "GoogleCloudRecaptchaenterpriseV1TestingOptions": {
      "type": "object",
      "description": "Options for user acceptance testing.",
      "properties": {
        "testingScore": {
          "description": "Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.",
          "format": "float",
          "type": "number"
        },
        "testingChallenge": {
          "type": "string",
          "description": "Optional. For challenge-based keys only (`CHECKBOX`, `INVISIBLE`), all challenge requests for this site do not show a challenge if `NOCAPTCHA`, or show an unsolvable challenge if `UNSOLVABLE_CHALLENGE`.",
          "enum": [
            "TESTING_CHALLENGE_UNSPECIFIED",
            "NOCAPTCHA",
            "UNSOLVABLE_CHALLENGE"
          ]
        }
      }
    },
    "GoogleCloudRecaptchaenterpriseV1UniversalKeySettings": {
      "properties": {},
      "description": "Settings for keys that are configured through their Policy.",
      "type": "object"
    },
    "GoogleCloudRecaptchaenterpriseV1WafSettings": {
      "properties": {
        "wafFeature": {
          "enum": [
            "WAF_FEATURE_UNSPECIFIED",
            "CHALLENGE_PAGE",
            "SESSION_TOKEN",
            "ACTION_TOKEN",
            "EXPRESS"
          ],
          "type": "string",
          "description": "Required. The Web Application Firewall (WAF) feature for which this key is enabled."
        },
        "wafService": {
          "type": "string",
          "description": "Required. The Web Application Firewall (WAF) service that uses this key.",
          "enum": [
            "WAF_SERVICE_UNSPECIFIED",
            "CA",
            "FASTLY",
            "CLOUDFLARE",
            "AKAMAI"
          ]
        }
      },
      "type": "object",
      "description": "Settings specific to keys that can be used for WAF (Web Application Firewall)."
    },
    "GoogleCloudRecaptchaenterpriseV1WebKeySettings": {
      "properties": {
        "integrationType": {
          "enum": [
            "INTEGRATION_TYPE_UNSPECIFIED",
            "SCORE",
            "CHECKBOX",
            "INVISIBLE",
            "POLICY_BASED_CHALLENGE"
          ],
          "description": "Required. Describes how this key is integrated with the website.",
          "type": "string"
        },
        "allowAmpTraffic": {
          "description": "Optional. If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.",
          "type": "boolean"
        },
        "allowAllDomains": {
          "description": "Optional. If set to true, it means allowed_domains are not enforced.",
          "type": "boolean"
        },
        "allowedDomains": {
          "description": "Optional. Domains or subdomains of websites allowed to use the key. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "challengeSecurityPreference": {
          "enum": [
            "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED",
            "USABILITY",
            "BALANCE",
            "SECURITY"
          ],
          "description": "Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX (defaults to BALANCE), INVISIBLE (defaults to USABILITY), or POLICY_BASED_CHALLENGE (defaults to USABILITY).",
          "type": "string"
        },
        "challengeSettings": {
          "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings",
          "description": "Optional. Challenge settings."
        }
      },
      "description": "Settings specific to keys that can be used by websites.",
      "type": "object"
    },
    "GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings": {
      "description": "Per-action challenge settings.",
      "type": "object",
      "properties": {
        "scoreThreshold": {
          "format": "float",
          "type": "number",
          "description": "Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive)."
        }
      }
    },
    "GoogleCloudRecaptchaenterpriseV1WebKeySettingsChallengeSettings": {
      "type": "object",
      "description": "Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered.",
      "properties": {
        "defaultSettings": {
          "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings",
          "description": "Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`)."
        },
        "actionSettings": {
          "additionalProperties": {
            "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1WebKeySettingsActionSettings"
          },
          "description": "Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.",
          "type": "object"
        }
      }
    }
  }
}