{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UserAuthenticationMethod",
  "title": "UserAuthenticationMethod",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "type",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the authentication method (auto generated)"
    },
    "type": {
      "$ref": "#/components/schemas/AuthenticationMethodTypeEnum"
    },
    "confirmed": {
      "type": "boolean",
      "description": "The authentication method status"
    },
    "name": {
      "type": "string",
      "description": "A human-readable label to identify the authentication method",
      "maxLength": 20
    },
    "authentication_methods": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UserAuthenticationMethodProperties"
      }
    },
    "preferred_authentication_method": {
      "$ref": "#/components/schemas/PreferredAuthenticationMethodEnum"
    },
    "link_id": {
      "type": "string",
      "description": "The ID of a linked authentication method. Linked authentication methods will be deleted together."
    },
    "phone_number": {
      "type": "string",
      "description": "Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice."
    },
    "email": {
      "type": "string",
      "description": "Applies to email and email-verification authentication methods only. The email address used to send verification messages."
    },
    "key_id": {
      "type": "string",
      "description": "Applies to webauthn authentication methods only. The ID of the generated credential."
    },
    "public_key": {
      "type": "string",
      "description": "Applies to webauthn authentication methods only. The public key."
    },
    "created_at": {
      "type": "string",
      "description": "Authenticator creation date",
      "format": "date-time"
    },
    "enrolled_at": {
      "type": "string",
      "description": "Enrollment date",
      "format": "date-time"
    },
    "last_auth_at": {
      "type": "string",
      "description": "Last authentication",
      "format": "date-time"
    },
    "credential_device_type": {
      "type": "string",
      "description": "Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. \"single_device\" credentials cannot be backed up and synced to another device, \"multi_device\" credentials can be backed up if enabled by the end-user."
    },
    "credential_backed_up": {
      "type": "boolean",
      "description": "Applies to passkeys only. Whether the credential was backed up."
    },
    "identity_user_id": {
      "type": "string",
      "description": "Applies to passkeys only. The ID of the user identity linked with the authentication method."
    },
    "user_agent": {
      "type": "string",
      "description": "Applies to passkeys only. The user-agent of the browser used to create the passkey."
    },
    "aaguid": {
      "type": "string",
      "description": "Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier."
    },
    "relying_party_identifier": {
      "type": "string",
      "description": "Applies to webauthn/passkey authentication methods only. The credential's relying party identifier."
    }
  }
}