Can't add additional email to existing contact using python api client

TPressey
Member

I'm wanting to add an email to an existing contact that already has a primary email associated with them via the python hubspot client.

 

Right now, im able to add properties to an existing contact by doing

-  

self.api_client.crm.contacts.basic_api.update(
contact_id, simple_public_object_input=update_data
)
where the update data is a dict of properties i want to update/add. But I don't know what the acceptable property name of additional email is through the api. I've tried 'additional_email', 'hs_additional_email', 'secondary_email'. None of them seem to work.
0 Upvotes
1 Accepted solution
zach_threadint
Solution
Guide

Hi @TPressey 👋

The correct property name for additional email address(es) belonging to a Contact is "hs_additional_emails". However, it is set by HubSpot as "read only". There are some legacy API endpoints that you might consider using (see below). Note that you may want to consider using Python's "requests" module to interact with those legacy APIs, as HubSpot's Python Client will likely not offer support for them.

  1. Add a secondary email address
  2. Updated a secondary email address

I hope this proves useful. Please let me know if you have any follow-up questions.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


View solution in original post

1 Reply 1
zach_threadint
Solution
Guide

Hi @TPressey 👋

The correct property name for additional email address(es) belonging to a Contact is "hs_additional_emails". However, it is set by HubSpot as "read only". There are some legacy API endpoints that you might consider using (see below). Note that you may want to consider using Python's "requests" module to interact with those legacy APIs, as HubSpot's Python Client will likely not offer support for them.

  1. Add a secondary email address
  2. Updated a secondary email address

I hope this proves useful. Please let me know if you have any follow-up questions.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.