code: func (api OrganizationsAPI) CreateOrganizationDns(w http.ResponseWriter, r *http.Request) {
  	globalID := mux.Vars(r)["globalid"]
  
  	dns := DnsAddress{}
  
  	if err := json.NewDecoder(r.Body).Decode(&dns); err != nil {
  		http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
  		return
  	}
  
  	if !dns.Validate() {
  		log.Debug("Invalid DNS name: ", dns.Name)
  		http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
  		return
  	}
  	orgMgr := organization.NewManager(r)
  	organisation, err := orgMgr.GetByName(globalID)
  	if err != nil {
  		if err == mgo.ErrNotFound {
  			http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
  		} else {
  			handleServerError(w, "getting organization", err)
  		}
  		return
  	}
  	for _, d := range organisation.DNS {
  		if dns.Name == d {
  			http.Error(w, http.StatusText(http.StatusConflict), http.StatusConflict)
  			return
  		}
  	}
  	err = orgMgr.AddDNS(organisation, dns.Name)
  
  	if handleServerError(w, "adding DNS name", err) {
  		return
  	}
  
  	w.Header().Set("Content-Type", "application/json")
  
  	w.WriteHeader(http.StatusCreated)
  	json.NewEncoder(w).Encode(dns)
  }
docs: // CreateOrganizationDns is the handler for POST /organizations/{globalid}/dns
  // Adds a dns address to an organization