code: func (s *MacroService) CreateMacro(ctx context.Context, m *platform.Macro) error {
  	if err := m.Valid(); err != nil {
  		return kerrors.InvalidDataf(err.Error())
  	}
  
  	url, err := newURL(s.Addr, macroPath)
  	if err != nil {
  		return err
  	}
  
  	octets, err := json.Marshal(m)
  	if err != nil {
  		return err
  	}
  
  	req, err := http.NewRequest("POST", url.String(), bytes.NewReader(octets))
  	if err != nil {
  		return err
  	}
  
  	req.Header.Set("Content-Type", "application/json")
  	SetToken(s.Token, req)
  
  	hc := newClient(url.Scheme, s.InsecureSkipVerify)
  
  	resp, err := hc.Do(req)
  	if err != nil {
  		return err
  	}
  
  	if err := CheckError(resp, true); err != nil {
  		return err
  	}
  
  	return json.NewDecoder(resp.Body).Decode(m)
  }
docs: // CreateMacro creates a new macro and assigns it an platform.ID