Add additional Emails in Contacts via API V3

Hello,

How to add additional emails in contacts via API v3?

I tried:

{
“company”: “Biglytics”,
“secondaryEmails” : “teste@teste.com
}

But got the following error:

HTTP 400

{
“status”: “error”,
“message”: “Invalid input JSON on line 1, column 74: Cannot construct instance of `com.hubspot.inbounddb.publicobject.core.v2.SimplePublicObjectInput`, problem: Names for properties should be lowercase and have less than 100 characters. Invalid names: [secondaryEmails]”,
“correlationId”: “b5cb6f28-e8f0-4f31-8a1e-17cdd1fb8cb1”
}

I also tried:

{
“company”: “Biglytics”,
“hs_additional_emails” : “teste@teste.com
}

But got the following error:

HTTP 400

{
“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”: “55ed30da-f237-4401-8cb8-a6bf6ff2ae53”,
“category”: “VALIDATION_ERROR”
}

How can i create a contact and send a primary email and more secondary emails using the API?

Hi @RAlexandre ,

Based on this post, you want to use the following API to add, update or delete a secondary email.

Hi @Teun,

Thank you for the information.

I’m using Accounts Dashboard | HubSpot to test the endpoints using a token, is there anywhere i can test this API using the same token?

Hi @RAlexandre ,

Yes, you can pass the private app token in the header as well! What programming language are you using right now?

Hi @Teun ,

I’m using Java, i managed to test this in command line using curl, but i thought there would be somewhere online were i could test this.

Anyway, the solution worked.

Thanks

Awesome! Happy I could help.

I would like to thank you for the details in your question. I could not find the name of the property hs_additional_emails in the docs!

Is there actually a solution that doesn’t require a “legacy + developer preview” API?