<?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 Re: Create or update a contact in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/683851#M56161</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/438024"&gt;@MGabre&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the email address of the contact providing you append the "idProperty=email" parameter to your query string. This is documented &lt;A href="https://developers.hubspot.com/docs/api/crm/contacts" target="_blank" rel="noopener"&gt;here&lt;/A&gt; under "Unique identifiers and duplication". See below for a sample of a request to update the phone number of a known contact using their email address:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location --request PATCH 'https://api.hubapi.com/crm/v3/objects/contacts/{{email}}?idProperty=email' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "properties": {
        "phone": "2132323423"
    }
}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2022 11:28:00 GMT</pubDate>
    <dc:creator>coldrickjack</dc:creator>
    <dc:date>2022-08-23T11:28:00Z</dc:date>
    <item>
      <title>Create or update a contact</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/683814#M56157</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been using the createorupdate contact endpoint for posting contacts from another site into hubspot, using the email as identifier.&lt;/P&gt;&lt;P&gt;`&lt;A href="https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/${email}?hapikey=${API_KEY" target="_blank"&gt;https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/${email}?hapikey=${API_KEY&lt;/A&gt;}`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But now I need to migrate over to use the private app integration and I can't find a easy way to achive the same thing using the endpoints described here:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/contacts" target="_blank"&gt;https://developers.hubspot.com/docs/api/crm/contacts&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I use the create endpoint, I get an error if the contact with that email already exist, and if I use the update endpoint I need to know the internal ID of the contact in hubspot in order to be able to update it? And in my case I only have the email in the other posting site.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 09:42:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/683814#M56157</guid>
      <dc:creator>MGabre</dc:creator>
      <dc:date>2022-08-23T09:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create or update a contact</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/683851#M56161</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/438024"&gt;@MGabre&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the email address of the contact providing you append the "idProperty=email" parameter to your query string. This is documented &lt;A href="https://developers.hubspot.com/docs/api/crm/contacts" target="_blank" rel="noopener"&gt;here&lt;/A&gt; under "Unique identifiers and duplication". See below for a sample of a request to update the phone number of a known contact using their email address:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location --request PATCH 'https://api.hubapi.com/crm/v3/objects/contacts/{{email}}?idProperty=email' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "properties": {
        "phone": "2132323423"
    }
}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 11:28:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/683851#M56161</guid>
      <dc:creator>coldrickjack</dc:creator>
      <dc:date>2022-08-23T11:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create or update a contact</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/683953#M56172</link>
      <description>&lt;P&gt;Thank you! I missed that part with the idProperty. That worked for updating a contact by email.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But to achieve the createOrUpdate feature that was availalbe in the older API I guess I need to first try to POST the contact, and if I recieve a 409 error I need to do the PATCH request to update the contact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 14:19:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/683953#M56172</guid>
      <dc:creator>MGabre</dc:creator>
      <dc:date>2022-08-23T14:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create or update a contact</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/684012#M56176</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/438024"&gt;@MGabre&lt;/a&gt;&amp;nbsp;, that is correct the newer CRM APIs don't support a single endpoint for creating/updating records. You'd need to approach it with 2 separate requests in the manner you've described.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 15:31:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/684012#M56176</guid>
      <dc:creator>coldrickjack</dc:creator>
      <dc:date>2022-08-23T15:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create or update a contact</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/899392#M70032</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/438024"&gt;@MGabre&lt;/a&gt;&amp;nbsp;\&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/426475"&gt;@coldrickjack&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same issue you mentions here, I'm using the first time HubSpot API, and we need to develop for update and create contact via the API every day in the same endpoint and don't want to separate for 2 endpoints, do you solve it in some way?&lt;/P&gt;&lt;P&gt;I saw in the old version was the optopn to update and create for 1 contact&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/yonico@playtika.com" target="_blank"&gt;https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/XXXXX@XXX.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Many thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Sapir&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2024 00:25:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-or-update-a-contact/m-p/899392#M70032</guid>
      <dc:creator>SYakovian</dc:creator>
      <dc:date>2024-01-01T00:25:12Z</dc:date>
    </item>
  </channel>
</rss>

