code: public void savePersonalFavorite(Target target, String category) throws WorkspaceApiException {
          TargetspersonalfavoritessaveData data = new TargetspersonalfavoritessaveData();
          data.setCategory(category);
          data.setTarget(toInformation(target));
          PersonalFavoriteData favData = new PersonalFavoriteData();
          favData.setData(data);
          
          try {
              ApiSuccessResponse resp = targetsApi.savePersonalFavorite(favData);
              Util.throwIfNotOk(resp);
          }
          catch(ApiException ex) {
              throw new WorkspaceApiException("Cannot save personal favorites", ex);
          }
      }
docs: Save a target to the agent's personal favorites in the specified category.
  @param target The target to save.
  @param category The agent's personal favorites category.