<?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 Getting USER_DOES_NOT_HAVE_PERMISSIONS when creating email in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-USER-DOES-NOT-HAVE-PERMISSIONS-when-creating-email/m-p/1207704#M84748</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to create an email with associations via the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My POST to&amp;nbsp;&lt;A href="https://api.hubapi.com/crm/v3/objects/emails" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/emails&lt;/A&gt;:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "properties": {
    "hs_email_subject": "Hello",
    "hs_email_text": "Test1",
    "hs_timestamp": "2025-10-02T18:00:01+01:00",
    "hs_email_direction": "EMAIL",
    "hs_email_status": "SENT"
  },
  "associations": [
    {
      "to": {
        "id": 466992278730
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 198
        }
      ]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yields the following response:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "status": "error",
  "message": "one or more associations are not valid",
  "correlationId": "1008940b-2d9d-4074-902b-391d8ce2aac9",
  "errors": [
    {
      "context": {
        "validationResult": [
          "USER_DOES_NOT_HAVE_PERMISSIONS"
        ]
      }
    }
  ],
  "category": "BAD_REQUEST"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove the association property, the Hubspot API reports back that the email was created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the following scopes:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"oauth",
"crm.objects.contacts.read",
"crm.objects.contacts.write",
"crm.objects.companies.read",
"crm.objects.companies.write",
"crm.objects.deals.read",
"crm.objects.deals.write"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to successfully create contacts with associations using the payload below to&amp;nbsp;&lt;A href="https://api.hubapi.com/crm/v3/objects/contacts:" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/contacts&lt;/A&gt; so associations work, just not when doing from email to contact.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "properties": {
    "email": "someone@example.com",
    "firstname": "John",
    "lastname": "Doe"
  },
  "associations": [
    {
      "to": {
        "id": 238323633387
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 279
        }
      ]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Does anyone have a suggestion? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: solution found, apparently the legacy association ids work:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy" target="_blank"&gt;https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For emails it's the "Engagement to ..." that work.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Oct 2025 08:19:14 GMT</pubDate>
    <dc:creator>PR74</dc:creator>
    <dc:date>2025-10-03T08:19:14Z</dc:date>
    <item>
      <title>Getting USER_DOES_NOT_HAVE_PERMISSIONS when creating email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-USER-DOES-NOT-HAVE-PERMISSIONS-when-creating-email/m-p/1207704#M84748</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to create an email with associations via the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My POST to&amp;nbsp;&lt;A href="https://api.hubapi.com/crm/v3/objects/emails" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/emails&lt;/A&gt;:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "properties": {
    "hs_email_subject": "Hello",
    "hs_email_text": "Test1",
    "hs_timestamp": "2025-10-02T18:00:01+01:00",
    "hs_email_direction": "EMAIL",
    "hs_email_status": "SENT"
  },
  "associations": [
    {
      "to": {
        "id": 466992278730
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 198
        }
      ]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yields the following response:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "status": "error",
  "message": "one or more associations are not valid",
  "correlationId": "1008940b-2d9d-4074-902b-391d8ce2aac9",
  "errors": [
    {
      "context": {
        "validationResult": [
          "USER_DOES_NOT_HAVE_PERMISSIONS"
        ]
      }
    }
  ],
  "category": "BAD_REQUEST"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove the association property, the Hubspot API reports back that the email was created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the following scopes:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"oauth",
"crm.objects.contacts.read",
"crm.objects.contacts.write",
"crm.objects.companies.read",
"crm.objects.companies.write",
"crm.objects.deals.read",
"crm.objects.deals.write"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to successfully create contacts with associations using the payload below to&amp;nbsp;&lt;A href="https://api.hubapi.com/crm/v3/objects/contacts:" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/contacts&lt;/A&gt; so associations work, just not when doing from email to contact.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "properties": {
    "email": "someone@example.com",
    "firstname": "John",
    "lastname": "Doe"
  },
  "associations": [
    {
      "to": {
        "id": 238323633387
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 279
        }
      ]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Does anyone have a suggestion? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: solution found, apparently the legacy association ids work:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy" target="_blank"&gt;https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For emails it's the "Engagement to ..." that work.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 08:19:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-USER-DOES-NOT-HAVE-PERMISSIONS-when-creating-email/m-p/1207704#M84748</guid>
      <dc:creator>PR74</dc:creator>
      <dc:date>2025-10-03T08:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getting USER_DOES_NOT_HAVE_PERMISSIONS when creating email</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-USER-DOES-NOT-HAVE-PERMISSIONS-when-creating-email/m-p/1207777#M84750</link>
      <description>&lt;P&gt;Solution found, apparently the legacy association ids work:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy" target="_blank" rel="noopener noreferrer"&gt;https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For emails it's the "Engagement to ..." that work.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 12:05:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-USER-DOES-NOT-HAVE-PERMISSIONS-when-creating-email/m-p/1207777#M84750</guid>
      <dc:creator>PR74</dc:creator>
      <dc:date>2025-10-03T12:05:45Z</dc:date>
    </item>
  </channel>
</rss>

