<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Update Secondary Email v3 API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/680544#M55859</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am currently migrating out hub spot integration to the new API. I have created an app, and replaced the old nodejs module with the new that you have provided on your api page. I replaced some of or logic that writes contacts into hubspot.&lt;BR /&gt;&lt;BR /&gt;However, I cannot find any way to add or update the secondary mail of our contacts over the new API.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I searched the documentation but could not find anything about it.&lt;BR /&gt;&lt;BR /&gt;Can I still use the v1 endpoint without the nodejs package ?&lt;BR /&gt;Will it also be shut down, or will it stay after the 30th november 2022?&lt;BR /&gt;If yes, how to retrieve the secondary email over the nodejs package? What property name to use?&lt;BR /&gt;&lt;BR /&gt;I hope you will be able to help us&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 15:36:05 GMT</pubDate>
    <dc:creator>ArminK</dc:creator>
    <dc:date>2022-08-15T15:36:05Z</dc:date>
    <item>
      <title>Update Secondary Email v3 API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/680544#M55859</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am currently migrating out hub spot integration to the new API. I have created an app, and replaced the old nodejs module with the new that you have provided on your api page. I replaced some of or logic that writes contacts into hubspot.&lt;BR /&gt;&lt;BR /&gt;However, I cannot find any way to add or update the secondary mail of our contacts over the new API.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I searched the documentation but could not find anything about it.&lt;BR /&gt;&lt;BR /&gt;Can I still use the v1 endpoint without the nodejs package ?&lt;BR /&gt;Will it also be shut down, or will it stay after the 30th november 2022?&lt;BR /&gt;If yes, how to retrieve the secondary email over the nodejs package? What property name to use?&lt;BR /&gt;&lt;BR /&gt;I hope you will be able to help us&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 15:36:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/680544#M55859</guid>
      <dc:creator>ArminK</dc:creator>
      <dc:date>2022-08-15T15:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Update Secondary Email v3 API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/680705#M55865</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/434275"&gt;@ArminK&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Quick questions to help the community better understand what you've already tried.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Specifically, which endpoints are you currently using?&lt;/LI&gt;
&lt;LI&gt;Is it one of the Secondary Endpoints listed here? &lt;A href="https://legacydocs.hubspot.com/docs/preview/preview-overview" target="_blank"&gt;Developer Preview — Secondary Email Addresses&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;For adding, updating, and deleting a secondary email address, the above endpoints are the current option&lt;/LI&gt;
&lt;LI&gt;If you only need to &lt;STRONG&gt;get&lt;/STRONG&gt; the secondary email addresses, you can use&amp;nbsp;&lt;LI-CODE lang="markup"&gt; the hs_additional_emails property ​&lt;/LI-CODE&gt;to list the primary and secondary addresses in other calls to the Contact endpoints&lt;BR /&gt;&lt;BR /&gt;Quick example (I used cURL, but the NodeJS example works as well)&lt;BR /&gt;Endpoint&amp;nbsp;&lt;LI-CODE lang="markup"&gt;GET/crm/v3/objects/contacts/{contactId}​&lt;/LI-CODE&gt;Request&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/objects/contacts/551?properties=hs_additional_emails&amp;amp;archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​&lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;HTTP 200

{
  "id": "551",
  "properties": {
    "createdate": "2022-08-11T23:27:36.511Z",
    "hs_additional_emails": "ihatethefood@cat.com;younewcatboss@cat.com",
    "hs_object_id": "551",
    "lastmodifieddate": "2022-08-15T20:37:13.785Z"
  },
  "createdAt": "2022-08-11T23:27:36.511Z",
  "updatedAt": "2022-08-15T20:37:13.785Z",
  "archived": false
}&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The Developer Preview — Secondary Email Addresses endpoints already work with OAuth and Private Apps. Please be aware these endpoints are all part of the developer preview program and are subject to the following:&lt;/P&gt;
&lt;P&gt;“&lt;SPAN&gt;This endpoint is part of our&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://legacydocs.hubspot.com/docs/preview/preview-overview?hsLang=en" target="_blank"&gt;developer preview program&lt;/A&gt;&lt;SPAN&gt;, and should be considered as a non-stable release that will be subject to bugs and breaking changes while under development. Please take this into account as you build against a release. Please subscribe to our&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://legacydocs.hubspot.com/changelog?hsLang=en" target="_blank"&gt;changelog&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for updates.&lt;/SPAN&gt;”&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 22:02:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/680705#M55865</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2022-08-15T22:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Update Secondary Email v3 API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/680865#M55879</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for your help. I managed to get it working.&lt;BR /&gt;&lt;BR /&gt;In the old integration with api keys, we used the nodejs package hubspot 2.3.14. This package has a method add a secondary mail, so i could go with:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import Hubspot from 'hubspot';

export const updateContactSecondaryMail = async (
  hubspot: Hubspot,
  contactMail: string,
  secondMail: string
) =&amp;gt; {
  const { vid } = await hubspot.contacts.getByEmail(contactMail);
  return hubspot.contacts.addSecondaryEmail(vid, secondMail);
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the new node package&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63720"&gt;@hubspot&lt;/a&gt;/api-client does not have this property. So I wanted to know if I can use the API endpoint from the&lt;SPAN&gt;&amp;nbsp;Developer Preview — Secondary Email Addresses endpoints, and if it is usable with OAuth.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;It would be nice if the new node package would have a method to add a secondary email address or something similar. I now had to use axios:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import { Client } from '@hubspot/api-client';
import Axios from 'axios';

export const addSecondaryMail = async (
  client: Client,
  contactId: string,
  secondaryEmail: string
) =&amp;gt; {
  const axios = Axios.create({
    baseURL: 'https://api.hubapi.com/contacts/v1/secondary-email/',
    headers: {
      Authorization: `Bearer ${client.config.accessToken}`,
      'Content-Type': 'application/json',
    },
  });

  return axios.put(
      `/${contactId}/email/${encodeURIComponent(secondaryEmail)}`
    );
};&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I now just wanted to know will this solution work after you shut down the api key authentification method on 30 november 2022 ?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 09:49:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/680865#M55879</guid>
      <dc:creator>ArminK</dc:creator>
      <dc:date>2022-08-16T09:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Update Secondary Email v3 API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/764462#M61929</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know an other method for add a secondary email with the Api V3 ? Use a&amp;nbsp;non-stable endPoint isn't recommande for an app in production..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Adrien,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 10:02:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/764462#M61929</guid>
      <dc:creator>AdrienWeo</dc:creator>
      <dc:date>2023-03-06T10:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update Secondary Email v3 API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/842220#M66981</link>
      <description>&lt;P&gt;Is there a solution which doesn't reference a "Legacy" + "Devloper Preview" API - there doesn't seem to be anything in the API v3 doco for this!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 05:07:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/842220#M66981</guid>
      <dc:creator>CAS-FHQ</dc:creator>
      <dc:date>2023-08-30T05:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Update Secondary Email v3 API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/1030776#M76053</link>
      <description>&lt;P&gt;HubSpot, can you please reply to this post and inform us when managing additional emails through the live API version will be possible? It is not sufficient to rely on a non-stable depreciated API end point.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 11:17:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-Secondary-Email-v3-API/m-p/1030776#M76053</guid>
      <dc:creator>mortenstaal</dc:creator>
      <dc:date>2024-08-22T11:17:32Z</dc:date>
    </item>
  </channel>
</rss>

