code: func (api OrganizationsAPI) UpdateAPIKey(w http.ResponseWriter, r *http.Request) {
  	globalID := mux.Vars(r)["globalid"]
  	oldLabel := mux.Vars(r)["label"]
  
  	apiKey := APIKey{}
  
  	if err := json.NewDecoder(r.Body).Decode(&apiKey); err != nil {
  		http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
  		return
  	}
  	// set a fake secret or override the existing secret for the validator. The secret
  	// is ignored anyway when updating the apikey
  	apiKey.Secret = "dummysecret"
  	if !apiKey.Validate() {
  		log.Debug("Invalid api key: ", apiKey)
  		http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
  		return
  	}
  
  	mgr := oauthservice.NewManager(r)
  	c, err := mgr.GetClient(globalID, oldLabel)
  	if handleServerError(w, "getting old api key", err) {
  		return
  	}
  	if c == nil {
  		http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
  		return
  	}
  	err = mgr.UpdateClient(globalID, oldLabel, apiKey.Label, apiKey.CallbackURL, apiKey.ClientCredentialsGrantType)
  
  	if err != nil && db.IsDup(err) {
  		log.Debug("Duplicate label")
  		http.Error(w, http.StatusText(http.StatusConflict), http.StatusConflict)
  		return
  	}
  
  	if err != nil {
  		log.Error("Error renaming api secret label", err.Error())
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  
  	w.WriteHeader(http.StatusOK)
  }
docs: // UpdateAPIKey is the handler for PUT /organizations/{globalid}/apikeys/{label}
  // Updates the label or other properties of a key.