code: func (c *SMS) Send(msg *SMSMessage) (*MessageResponse, error) {
  	if len(msg.From) <= 0 {
  		return nil, errors.New("Invalid From field specified")
  	}
  
  	if len(msg.To) <= 0 {
  		return nil, errors.New("Invalid To field specified")
  	}
  
  	if len(msg.ClientReference) > 40 {
  		return nil, errors.New("Client reference too long")
  	}
  
  	var messageResponse *MessageResponse
  
  	switch msg.Type {
  	case Text:
  	case Unicode:
  		if len(msg.Text) <= 0 {
  			return nil, errors.New("Invalid message text")
  		}
  	case Binary:
  		if len(msg.UDH) == 0 || len(msg.Body) == 0 {
  			return nil, errors.New("Invalid binary message")
  		}
  
  	case WAPPush:
  		if len(msg.URL) == 0 || len(msg.Title) == 0 {
  			return nil, errors.New("Invalid WAP Push parameters")
  		}
  	}
  	if !c.client.useOauth {
  		msg.apiKey = c.client.apiKey
  		msg.apiSecret = c.client.apiSecret
  	}
  
  	var r *http.Request
  	buf, err := json.Marshal(msg)
  	if err != nil {
  		return nil, errors.New("invalid message struct - unable to convert to JSON")
  	}
  	b := bytes.NewBuffer(buf)
  	r, _ = http.NewRequest("POST", apiRoot+"/sms/json", b)
  
  	r.Header.Add("Accept", "application/json")
  	r.Header.Add("Content-Type", "application/json")
  
  	resp, err := c.client.HTTPClient.Do(r)
  
  	if err != nil {
  		return nil, err
  	}
  	defer resp.Body.Close()
  
  	body, _ := ioutil.ReadAll(resp.Body)
  
  	err = json.Unmarshal(body, &messageResponse)
  	if err != nil {
  		return nil, err
  	}
  	return messageResponse, nil
  }
docs: // Send the message using the specified SMS client.