I’ve been trying to add a contact to HubSpot via my test portal from some .NET code on my development server using one of the two following APIs (where xxx is the API key I was assigned last week):
Additionally, the following attributes have been assigned to my webRequest:
webRequest.Method = “POST”;
webRequest.ContentType = “application/json”;
I’ve tried passing the JSON to HubSpot as a serialized string like so (prior to serialization):
However, testing has resulted in the following response: The remote server returned an error: (400) Bad Request.
Thinking that perhaps the above string was JSON-format challenged, I tested it at JSONLint.com where it came back as valid JSON. I therefore am finding myself at a loss for where I’m going astray and would be most appreciative of any assistance you could provide.