<?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: Error while create contact note in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/776664#M62757</link>
    <description>&lt;P data-unlink="true"&gt;The error is still there even after setting the 'associationTypeId' to 201. Any solution on this?&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2023 13:12:17 GMT</pubDate>
    <dc:creator>RHZaman</dc:creator>
    <dc:date>2023-03-31T13:12:17Z</dc:date>
    <item>
      <title>Error while create contact note</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/758011#M61548</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;I am trying to create a note for a contact using a API request but it gives following response&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;{
    "status": "error",
    "message": "invalid from object type 0-46 for associations to be created. expected: 0-1",
    "correlationId": "da755ba0-b9e5-40e7-b3ef-97c870f7018e",
    "category": "VALIDATION_ERROR"
} &lt;/PRE&gt;&lt;DIV class=""&gt;&lt;BR /&gt;this is how my request look like&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;{
"properties": {
     "hs_timestamp": "2023-02-12T15:48:22Z",
     "hs_note_body": "test note body"
},
   "associations": [
      {
        "to": {
          "id": 123 // customer id
        },
        "types": [
        {
            "associationCategory": "HUBSPOT_DEFINED",
            "associationTypeId": 201
        } ]
     }
    ]
}&lt;/PRE&gt;&lt;DIV class=""&gt;any idea about what's going wrong here&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 Feb 2023 20:23:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/758011#M61548</guid>
      <dc:creator>JAndrus8</dc:creator>
      <dc:date>2023-02-17T20:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error while create contact note</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/766452#M62091</link>
      <description>&lt;P&gt;I have&amp;nbsp;&lt;STRONG&gt;exactly&lt;/STRONG&gt; the same issue.&lt;/P&gt;&lt;P&gt;When making a request to&amp;nbsp;&lt;A href="https://api.hubapi.com/crm/v4/associations/contact/note/labels," target="_blank"&gt;https://api.hubapi.com/crm/v4/associations/contact/note/labels,&lt;/A&gt;&amp;nbsp;I get the following response.&lt;/P&gt;&lt;PRE&gt;{
    "results": [
        {
            "category": "HUBSPOT_DEFINED",
            "typeId": 201,
            "label": null
        }
    ]
}&lt;/PRE&gt;&lt;P&gt;So, I have used &lt;STRONG&gt;201&lt;/STRONG&gt; as the association type ID like you. Still, I am getting this validation error.&lt;/P&gt;&lt;P&gt;Any chance we can get some help on this?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 12:01:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/766452#M62091</guid>
      <dc:creator>sbrandes</dc:creator>
      <dc:date>2023-03-09T12:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error while create contact note</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/767872#M62193</link>
      <description>&lt;P&gt;Hey I was able to find the solution for this.&lt;/P&gt;&lt;P&gt;You need to use association typeId as 201 instead of 202&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 14:07:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/767872#M62193</guid>
      <dc:creator>JAndrus8</dc:creator>
      <dc:date>2023-03-13T14:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error while create contact note</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/776664#M62757</link>
      <description>&lt;P data-unlink="true"&gt;The error is still there even after setting the 'associationTypeId' to 201. Any solution on this?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 13:12:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/776664#M62757</guid>
      <dc:creator>RHZaman</dc:creator>
      <dc:date>2023-03-31T13:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error while create contact note</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/790119#M63724</link>
      <description>&lt;P data-unlink="true"&gt;using `&lt;SPAN&gt;"associationTypeId"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;201`&lt;/SPAN&gt;&amp;nbsp;didn't work for me either, even though that's the `typeId` returned from&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;EM&gt;`GET &lt;A href="https://api.hubapi.com/crm/v4/associations/contact/note/labels" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v4/associations/contact/note/labels&lt;/A&gt;`&lt;/EM&gt;.&lt;/DIV&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;STRIKE&gt;But when I set it to&amp;nbsp;`"associationTypeId": 202` it randomly worked... 🤷 no idea why as `202` is NOT correct; I just randomly tried that number 🤦&lt;/STRIKE&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;STRONG&gt;I figured out why&amp;nbsp;`&lt;SPAN&gt;"associationTypeId"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;202` worked:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;The Associations url needs to be specified correctly; the &lt;EM&gt;`{fromObjectType}`&lt;/EM&gt; and &lt;EM&gt;`{toObjectType}`&lt;/EM&gt; parts needs to be in the correct order. Since we're associating a&amp;nbsp;note to a&amp;nbsp;contactthe URL to find the correct ID is (notice that &lt;EM&gt;`/note`&lt;/EM&gt; comes before &lt;EM&gt;`/contact`&lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;EM&gt;`GET &lt;A href="https://api.hubapi.com/crm/v4/associations/note/contact/labels" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v4/associations/note/contact/labels&lt;/A&gt;`&lt;/EM&gt;.&lt;/DIV&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;This returns:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "results": [
        {
            "category": "HUBSPOT_DEFINED",
            "typeId": 202,
            "label": null
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;So in order to get the failed POST request to create a note on a contact you have to do the following:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "properties": {
        "hs_timestamp": "2023-02-12T15:48:22Z",
        "hs_note_body": "test note body"
    },
    "associations": [
        {
            "to": {
                "id": 123 // customer id
            },
            "types": [
                {
                    "associationCategory": "HUBSPOT_DEFINED",
                    "associationTypeId": 202 // note to contact typeId
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 15:16:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/790119#M63724</guid>
      <dc:creator>Skipio-CRey</dc:creator>
      <dc:date>2023-05-05T15:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error while create contact note</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/886290#M69371</link>
      <description>&lt;P&gt;This put me on the right track for a very similar problem, thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 10:02:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/886290#M69371</guid>
      <dc:creator>lennart-sve</dc:creator>
      <dc:date>2023-11-29T10:02:15Z</dc:date>
    </item>
  </channel>
</rss>

