Code on test page: public ActionResult OnGage() { Utilities.API.OnGage.Add_Contact("List_id", "Email", "Firstname", "Lastname", "Gender"); return Content("OK"); } OnGage API Class: public static void Add_Contact(string list_id, string email, string firstname, string lastname, string gender) { string json = "{ \"email\": \"" + email + "\", \"list_id\": \"" + list_id + "\", \"firstname\": \"" + firstname + "\", \"lastname\": \"" + lastname + "\", \"gender\": \"" + gender + "\" }"; GenericWebRequest.Send_POST_WebRequest(_url + "/v2/contacts", json, "application/json", "USERNAME", “PASSWORD“, "ACCOUNT CODE"); } GenericWebRequest Class: public static string Send_POST_WebRequest(string url, string POST_parameters, string contentType = "", string username = "", string password = "", string account_code = "") { string webResponce = string.Empty; try { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); webRequest.Method = "POST"; byte[] dataStream = Encoding.UTF8.GetBytes(POST_parameters); webRequest.ContentLength = dataStream.Length; if(contentType == "") webRequest.ContentType = "application/x-www-form-urlencoded"; else webRequest.ContentType = contentType; //if password protected if (username != "" && password != "") { if (account_code == "") webRequest.Credentials = new NetworkCredential(username, password); else { webRequest.Headers.Add("X_USERNAME", username); webRequest.Headers.Add("X_PASSWORD", password); webRequest.Headers.Add("X_ACCOUNT_CODE", account_code); } } // Send the data. Stream newStream = webRequest.GetRequestStream(); newStream.Write(dataStream, 0, dataStream.Length); newStream.Close(); WebResponse webResponse = webRequest.GetResponse(); using (StreamReader rd = new StreamReader(webResponse.GetResponseStream())) { webResponce = rd.ReadToEnd(); } return webResponce; } catch (WebException ex) { try { webResponce = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); Log.Logger.LogError("WebException while trying to do generic web (POST) request with the request url: " + url + " webresponce: " + webResponce, "Send_WebRequest", "GenericWebRequest", true); } catch (Exception e) { Log.Logger.LogError("Exception while trying to do generic web (POST) request with the request url: " + url, new System.Diagnostics.StackFrame(), e, true); } return webResponce; } catch (Exception ex) { Utilities.Log.Logger.LogError("Error while trying to do generic web (POST) request with the request url: " + url, new System.Diagnostics.StackFrame(), ex, true); return webResponce; } }