code: public BoxCollaboration.Info collaborate(String email, BoxCollaboration.Role role) {
          JsonObject accessibleByField = new JsonObject();
          accessibleByField.add("login", email);
          accessibleByField.add("type", "user");
  
          return this.collaborate(accessibleByField, role, null, null);
      }
docs: Adds a collaborator to this folder. An email will be sent to the collaborator if they don't already have a Box
  account.
  
  @param email the email address of the collaborator to add.
  @param role  the role of the collaborator.
  @return info about the new collaboration.