Following the documentation provided https://developers.hubspot.com/beta-docs/guides/api/crm/objects/contacts#secondary-emails , I attempted to add a secondary email to a contact but received an error.
Request: https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert
{
"inputs": [
{
"properties": {
"firstname": "Amanda",
"lastname": "Surname",
"phone": "+5511987654321",
"email": "amandaa@gmail.com",
"cpf": "86400815570",
"hs_additional_emails": "amanda@university.com.br"
},
"id": "141358",
"idProperty": "person_id"
}
]
}
Response:
{
"status": "error",
"message": "Property values were not valid: [{\"isValid\":false,\"message\":\"'hs_additional_emails' is a calculated property; its value cannot be set.\",\"error\":\"READ_ONLY_VALUE\",\"name\":\"hs_additional_emails\"}]",
"correlationId": "1631e284-3950-47ba-9755-b9f0b24ec197",
"category": "VALIDATION_ERROR"
}
Hey @VMendonça! Thanks for this example. I am getting the same response:
I want to invite some subject matter experts to see if they have any suggestions.
Hey @Teun, @MatthiasWeber, @HubSpot_Corey are we missing something in these requests? The documentation suggests this method, but we are getting this error.
Best,
Kennedy
Looks like another upsert bug!
Hi @VMendonça and thanks for the tag @kennedyp
The hs_additional_emails is actually depreciated and is no longer in use, unfortunately the API documentation has not been updated to reflect this yet.
Hi @HubSpot_Corey Thanks for the information. Is there an alternative way to add a secondary email to a contact through the API?
I couldn’t find anything in the documentation.
Thanks for this context @HubSpot_Corey -- marking this as a solution for now, but will get in touch with the related team.
Can you let us know an alternative way or estimation on when this will be fixed?