<?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: Set Contact Owner with Create or Update API in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/572091#M27272</link>
    <description>&lt;P&gt;I ended up figuring it out, it was because my email was pulling as undefined in the request_url&lt;BR /&gt;&lt;BR /&gt;`&lt;A href="https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/${email}?hapikey=${API_KEY" target="_blank" rel="noopener"&gt;https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/${email}?hapikey=${API_KEY&lt;/A&gt;}`&lt;BR /&gt;&lt;BR /&gt;I thought that would throw an error. Surprisingly, it doesn't. It let the function run and even created a new contact with the payload data, but it wouldn't add any properties other than first name, last name, company, and email.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Feb 2022 22:35:11 GMT</pubDate>
    <dc:creator>Brownstephen101</dc:creator>
    <dc:date>2022-02-08T22:35:11Z</dc:date>
    <item>
      <title>Set Contact Owner with Create or Update API</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/571926#M27268</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, does anyone know if it's possible to set the owner of a contact using the Create or Update contact api? I'm not sure if it's a bug, I am creating a contact and company and then associating them, and as part of the payload for each, it checks if there is an owner query parameter and sets the owner if there is. It is working in all regards, but for some reason the owner is not being set on the contact record (it is working for the company).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I logged the data being sent for the contact, it is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{"properties":[{"property":"firstname","value":"Stephen"},{"property":"lastname","value":"Brown"},{"property":"email","value":"stephen+test2@impulsecreative.com"},{"property":"company","value":"testfdas"},{"property":"hubspot_owner_id","value":"87349627"}]}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;All properties other than hubspot_owner_id are being set without issue. I should note that there are no errors that are being caught.&lt;/SPAN&gt;&lt;SPAN&gt;Any help would be appreciated&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 19:00:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/571926#M27268</guid>
      <dc:creator>Brownstephen101</dc:creator>
      <dc:date>2022-02-08T19:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Contact Owner with Create or Update API</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/571950#M27269</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/191804"&gt;@Brownstephen101&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have not tested this on the v1 endpoint that it appears that you are using.&amp;nbsp; I will in a minute &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;, but&lt;/P&gt;
&lt;P&gt;I did just verify that it works when patching via the &lt;A href="https://developers.hubspot.com/docs/api/crm/contacts" target="_blank" rel="noopener"&gt;v3 endpoint&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;my call (I removed the other properties, but obviously, you can add them back):&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;A href="https://api.hubapi.com/crm/v3/objects/contacts/58951?hapikey=" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/contacts/58951?hapikey=&lt;/A&gt;&lt;SPAN class="resolvedVariable"&gt;{{hapikey}}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "properties":{
        "hubspot_owner_id": "49773289"
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 19:29:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/571950#M27269</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-02-08T19:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Contact Owner with Create or Update API</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/571957#M27270</link>
      <description>&lt;P&gt;Follow up -- tested with the v1 endpoint and had no issue there either &lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Can you confirm which endpoint you are using and also that the owner id is correct?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 19:35:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/571957#M27270</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-02-08T19:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Contact Owner with Create or Update API</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/572091#M27272</link>
      <description>&lt;P&gt;I ended up figuring it out, it was because my email was pulling as undefined in the request_url&lt;BR /&gt;&lt;BR /&gt;`&lt;A href="https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/${email}?hapikey=${API_KEY" target="_blank" rel="noopener"&gt;https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/${email}?hapikey=${API_KEY&lt;/A&gt;}`&lt;BR /&gt;&lt;BR /&gt;I thought that would throw an error. Surprisingly, it doesn't. It let the function run and even created a new contact with the payload data, but it wouldn't add any properties other than first name, last name, company, and email.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 22:35:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Set-Contact-Owner-with-Create-or-Update-API/m-p/572091#M27272</guid>
      <dc:creator>Brownstephen101</dc:creator>
      <dc:date>2022-02-08T22:35:11Z</dc:date>
    </item>
  </channel>
</rss>

