{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-android/json-schema/google-android-enrollment-token-schema.json",
  "title": "EnrollmentToken",
  "description": "A token used to enroll a device.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-android-androidenterprise-enrollment-tokens-api-openapi.yml#/components/schemas/EnrollmentToken",
  "properties": {
    "googleAuthenticationOptions": {
      "$ref": "#/$defs/EnrollmentTokenGoogleAuthenticationOptions",
      "description": "[Optional] Provides options related to Google authentication during the enrollment."
    },
    "enrollmentTokenType": {
      "type": "string",
      "description": "[Required] The type of the enrollment token.",
      "enum": [
        "enrollmentTokenTypeUnspecified",
        "userlessDevice",
        "userDevice"
      ]
    },
    "token": {
      "type": "string",
      "description": "The token value that's passed to the device and authorizes the device to enroll. This is a read-only field generated by the server."
    },
    "duration": {
      "type": "string",
      "description": "[Optional] The length of time the enrollment token is valid, ranging from 1 minute to [`Durations.MAX_VALUE`](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE), approximately 10,000 years. If not specified, the default duration is 1 hour. In the JSON REST API, this is represented as a string (e.g., `3600s`).",
      "format": "google-duration"
    }
  },
  "type": "object",
  "$defs": {
    "EnrollmentTokenGoogleAuthenticationOptions": {
      "properties": {
        "requiredAccountEmail": {
          "description": "[Optional] Specifies the managed Google account that the user must use during enrollment.`AuthenticationRequirement` must be set to`REQUIRED` if this field is set.",
          "type": "string"
        },
        "authenticationRequirement": {
          "type": "string",
          "description": "[Optional] Specifies whether user should authenticate with Google during enrollment. This setting, if specified,`GoogleAuthenticationSettings` specified for the enterprise resource is ignored for devices enrolled with this token.",
          "enum": [
            "authenticationRequirementUnspecified",
            "optional",
            "required"
          ]
        }
      },
      "type": "object",
      "description": "Options for Google authentication during the enrollment."
    }
  }
}