Hi All,
I’m new to Hubspot. I’m trying to POST some contact records from our database into Hubspot using Hubspot API. It works with the basic property such as the contact last name, first name, email, phone, address, etc. However, when I added the status property, it failed with the following message:
“Response Body: {“validationResults”:[{“isValid”:false,“message”:“1 was not one of the allowed options: [label: \“Active\”\nvalue: \“active\”\nread_only: true\n, label: \“Inactive\”\nvalue: \“inactive\”\nread_only: true\n]”,“error”:“INVALID_OPTION”,“name”:“hs_content_membership_status”}],“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“5ae5251d-f999-485a-b9c8-a5f92007c4e5”,“requestId”:“32dfc68887aaf82880cb58ec7f2980ee”}”
Here is the sample JSON record:
{
“properties”: [
{
“property”: “FirstName”,
“value”: “ABC”
},
{
“property”: “LastName”,
“value”: “XYZ”
},
{
“property”: “Email”,
“value”: “ABCXYZ@gmail.com”
},
{
“property”: “Address”,
“value”: “54 Peirce Rd”
},
{
“property”: “City”,
“value”: “Waltham”
},
{
“property”: “State”,
“value”: “MA”
},
{
“property”: “zip”,
“value”: “02420”
},
{
“property”: “hs_content_membership_status”,
“value”: “1”
}
]
}
Here is the API that I use:
https://api.hubapi.com/contacts/v1/contact
Can someone tell me how to properly code the status property for posting?
Thanks,
Allan