Using Batch Create or Update Contacts and I receive the 202 accepted received but nothing is updated.
C# Code
private static void UpdateHubSpotContacts(StringBuilder sb)
{
var hapikey = "mykey";
var client = new RestClient("https://api.hubapi.com/");
var request = new RestRequest("contacts/v1/contact/batch/", Method.POST);
request.AddQueryParameter("hapikey", hapikey);
request.AddParameter("application/json", sb, ParameterType.RequestBody);
request.RequestFormat = DataFormat.Json;
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Console.ReadLine();
}
JSON
[
{
"email": "test1@test.com",
"Properties": [
{
"property": "firstname",
"value": "test1"
},
{
"property": "lastname",
"value": "tester1"
}
]
},{
"email": "test2@test.com",
"Properties": [
{
"property": "firstname",
"value": "test2"
},
{
"property": "lastname",
"value": "tester2"
}
]
},
{
"email": "test3@test.com",
"Properties": [
{
"property": "firstname",
"value": "test3"
},
{
"property": "lastname",
"value": "tester3"
}
]
}
]