func NewCustomField(name, _type, apiKey string) (*CustomField, error) {
	byteArr, err := json.Marshal(CustomField{
		Name: name,
		Type: _type,
	})
	if err != nil {
		return nil, err
	}

	response, err := SendPOSTRequest(apiKey, "/contactdb/custom_fields", string(byteArr))
	if err != nil {
		return nil, err
	}

	customField := &CustomField{}
	err = json.Unmarshal(response, customField)
	if err != nil {
		return nil, err
	}

	return customField, nil
}
// NewCustomField creates a new custom field. (POST)
NewCustomField creates a new custom field. (POST)
// NewCustomField creates a new custom field . ( POST )
func NewCustomField(name, _type, apiKey string) (*CustomField, error) {
	byteArr, err := json.Marshal(CustomField{
		Name: name,
		Type: _type,
	})
	if err != nil {
		return nil, err
	}
	response, err := SendPOSTRequest(apiKey, "/contactdb/custom_fields", string(byteArr))
	if err != nil {
		return nil, err
	}
	customField := &CustomField{}
	err = json.Unmarshal(response, customField)
	if err != nil {
		return nil, err
	}
	return customField, nil
}
func NewCustomField ( name , _type , apiKey string ) ( * CustomField , error ) { byteArr , err := json . Marshal ( CustomField { Name : name , Type : _type , } ) if err != nil { return nil , err } response , err := SendPOSTRequest ( apiKey , " " , string ( byteArr ) ) if err != nil { return nil , err } customField := & CustomField { } err = json . Unmarshal ( response , customField ) if err != nil { return nil , err } return customField , nil }
NewCustomField creates a new custom field.
NewCustomField creates a new custom field .