code: @POST
      @Consumes(MediaType.APPLICATION_JSON)
      public Response profile(@Context HttpServletRequest request, Profile profile) {
  
          Account account = AccountResolver.INSTANCE.getAccount(request);
  
          if (account != null) {
              account.setGivenName(profile.getGivenName());
              account.setSurname(profile.getSurname());
              account.getCustomData().put("favoriteColor", profile.getFavoriteColor());
              account.save();
          }
  
          return Response
                  .status(200)
                  .build();
      }
docs: Saves a profile information to a Stormpath account. Sets a Users first and last name, as well as updating a
  custom metadata field <code>favoriteColor</code>.
  @param request The current request.
  @param profile The profile to be saved.
  @return Always returns a Response 200.