code: func (c *Client) SendMailV31(data *MessagesV31) (*ResultsV31, error) {
  	url := c.apiBase + ".1/send"
  	req, err := createRequest("POST", url, data, nil)
  	if err != nil {
  		return nil, err
  	}
  
  	req.Header.Set("Content-Type", "application/json")
  	req.SetBasicAuth(c.APIKeyPublic(), c.APIKeyPrivate())
  
  	r, err := c.httpClient.SendMailV31(req)
  	if err != nil {
  		return nil, err
  	}
  
  	decoder := json.NewDecoder(r.Body)
  
  	switch r.StatusCode {
  	case http.StatusOK:
  
  		var res ResultsV31
  		if err := decoder.Decode(&res); err != nil {
  			return nil, err
  		}
  		return &res, nil
  
  	case http.StatusBadRequest, http.StatusForbidden:
  
  		var apiFeedbackErr APIFeedbackErrorsV31
  		if err := decoder.Decode(&apiFeedbackErr); err != nil {
  			return nil, err
  		}
  		return nil, &apiFeedbackErr
  
  	default:
  
  		var errInfo ErrorInfoV31
  		if err := decoder.Decode(&errInfo); err != nil {
  			return nil, err
  		}
  		return nil, &errInfo
  	}
  }
docs: // SendMailV31 sends a mail to the send API v3.1